Skip to main content

potatoslicer-client

Multi-engine audio synthesis library for Python. Procedural audio from JSON song data — no audio files required.

Install

pip install potatoslicer-client

Quick Start

from potatoslicer.player import PotatoslicerPlayer

player = PotatoslicerPlayer()
player.start()
player.load_file("path/to/song.json")
player.play()
player.set_volume(0.3)
player.stop()
player.shutdown()

Sound Engines

Five synthesis providers, mixable in a single song:

Provider Type Description
cadenza Waveform Pulse, square, triangle, saw, noise with ADSR, vibrato, detune
famiwave Pulse/Triangle/Noise 4-bit quantized duty cycles, triangle staircase, LFSR noise
supergausskit Gaussian Interp BRR-style synthesis with gaussian filter, echo/delay
nightfm 4-Op FM 8 algorithms, per-operator ADSR, feedback, frequency multipliers
wav_sampler Sample WAV playback with pitch shifting, loop modes, trim

Song Format

Songs are JSON files. Each instrument picks its engine via the type field:

{
  "title": "My Song",
  "tempo": 140,
  "rows_per_beat": 4,
  "order": [0, 1, 0, 2],
  "instruments": {
    "kick":  { "type": "cadenza", "waveform": "pulse", "attack": 0.001 },
    "bass":  { "type": "famiwave", "channel_type": "triangle" },
    "lead":  { "type": "nightfm", "algorithm": 4, "feedback": 3 },
    "pad":   { "type": "supergausskit", "echo_delay": 80 }
  },
  "patterns": {
    "0": [
      [{"channel": 0, "note": "C-1", "instrument": "kick"}],
      [], [], []
    ]
  }
}

Architecture

PotatoslicerPlayer
  → PotatoslicerEngine
    → Sequencer (tracker-style pattern playback, Bresenham timing)
    → Synth (voice pool, per-channel rendering)
      → Providers (Cadenza, Famiwave, SuperGaussKit, NightFM, WavSampler)
    → Mixer (sum + tanh soft clip)
    → ActivityTracker (per-channel levels, FFT spectrum)
  → BufferedAudioDevice (threaded ring buffer → speakers)

API Reference

player = PotatoslicerPlayer(sample_rate=48000, num_voices=20)
player.start()                    # start audio device
player.load_file("song.json")    # load from file
player.load(song_dict)           # load from dict
player.play(loop=True)           # start playback
player.stop()                    # stop playback
player.set_volume(0.5)           # master volume 0.0-1.0
player.export_wav("out.wav")     # offline render to WAV
player.export_midi("out.mid")    # export as MIDI
player.shutdown()                # clean up audio device

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

potatoslicer_client-0.1.1.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

potatoslicer_client-0.1.1-py3-none-any.whl (81.4 kB view details)

Uploaded Python 3

File details

Details for the file potatoslicer_client-0.1.1.tar.gz.

File metadata

  • Download URL: potatoslicer_client-0.1.1.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for potatoslicer_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 959d60cdfaae9cf4ab7f67faad6cb93db4733ae89a1cb57bf96df1a64717fd34
MD5 0f2cbab09ff3bc48c07de427f8742529
BLAKE2b-256 2d1c964fcc6befdca88ee8001a77adfa055a350ab99578340f4ae432018fd701

See more details on using hashes here.

File details

Details for the file potatoslicer_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for potatoslicer_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21555c6953c6fa5a4179c6f29783b53e5cca1549495f95e7ce4bdedd1ed65bc8
MD5 7642ec32584ac2ca787905af5af3deb8
BLAKE2b-256 641a5ff24fc58c73ca6d0f398ae988880c885c8ef3f03bed3ee019beb782d32b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page