pico_synth_sandbox¶
A CircuitPython library designed for the pico_synth_sandbox device to provide hardware abstraction and a number of additional audio synthesis features.
Features¶
Device-level settings using
settings.toml
file to generate audio driver, display, MIDI, and other hardware objectsKeyboard handling for key priority and voice allocation
pico_synth_sandbox.arpeggiator.Arpeggiator
andpico_synth_sandbox.sequencer.Sequencer
classes based onpico_synth_sandbox.timer.Timer
class with support for bpm, step, and gatepico_synth_sandbox.waveform generators to quickly create numpy arrays
Voice based structure to simplify note and parameter management among multiple
synthio.Note
instancesMultiple
pico_synth_sandbox.voice.Voice
types available:Fully featured oscillator (
pico_synth_sandbox.voice.oscillator.Oscillator
) with glide, pitch bend, frequency lfo (vibrato), amplitude envelope and lfo (tremolo), filter envelope and lfo, and panning lfoAnalog-based
pico_synth_sandbox.voice.drum.Drum
voices:pico_synth_sandbox.voice.drum.Kick
,pico_synth_sandbox.voice.drum.Snare
,pico_synth_sandbox.voice.drum.ClosedHat
andpico_synth_sandbox.voice.drum.OpenHat
pico_synth_sandbox.voice.sample.Sample
voice with WAV audio file support, auto-tuning, and all aforementedpico_synth_sandbox.voice.oscillator.Oscillator
features
Time-based synthio helpers for advanced block inputs (
pico_synth_sandbox.synth.LerpBlockInput
andpico_synth_sandbox.synth.AREnvelope
)pico_synth_sandbox.microphone.Microphone
level monitoring and trigger-based recordingGeneral audio helper functions such as FFT, resampling, and normalization
Table of Contents¶
- Global Functions
- Asynchronous Task Management
- Board Abstraction
- Display Management
- Rotary Encoders
- Audio Output
Audio
Audio.configure()
Audio.get_bits_per_sample()
Audio.get_buffer_size()
Audio.get_channel_count()
Audio.get_level()
Audio.get_sample_rate()
Audio.get_voice_count()
Audio.is_muted()
Audio.is_playing()
Audio.mute()
Audio.play()
Audio.set_bits_per_sample()
Audio.set_buffer_size()
Audio.set_channel_count()
Audio.set_level()
Audio.set_sample_rate()
Audio.set_voice_count()
Audio.stop()
Audio.toggle_mute()
Audio.unmute()
I2SAudio
I2SAudio.configure()
I2SAudio.get_bits_per_sample()
I2SAudio.get_buffer_size()
I2SAudio.get_channel_count()
I2SAudio.get_level()
I2SAudio.get_sample_rate()
I2SAudio.get_voice_count()
I2SAudio.is_muted()
I2SAudio.is_playing()
I2SAudio.mute()
I2SAudio.play()
I2SAudio.set_bits_per_sample()
I2SAudio.set_buffer_size()
I2SAudio.set_channel_count()
I2SAudio.set_level()
I2SAudio.set_sample_rate()
I2SAudio.set_voice_count()
I2SAudio.stop()
I2SAudio.toggle_mute()
I2SAudio.unmute()
PWMAudio
PWMAudio.configure()
PWMAudio.get_bits_per_sample()
PWMAudio.get_buffer_size()
PWMAudio.get_channel_count()
PWMAudio.get_level()
PWMAudio.get_sample_rate()
PWMAudio.get_voice_count()
PWMAudio.is_muted()
PWMAudio.is_playing()
PWMAudio.mute()
PWMAudio.play()
PWMAudio.set_bits_per_sample()
PWMAudio.set_buffer_size()
PWMAudio.set_channel_count()
PWMAudio.set_level()
PWMAudio.set_sample_rate()
PWMAudio.set_voice_count()
PWMAudio.stop()
PWMAudio.toggle_mute()
PWMAudio.unmute()
get_audio_driver()
- Microphone
- MIDI Communication
- Keyboard
DebouncerKey
Key
Keyboard
Keyboard.MODE_HIGH
Keyboard.MODE_LAST
Keyboard.MODE_LOW
Keyboard.NUM_MODES
Keyboard.append()
Keyboard.get()
Keyboard.get_active_voices()
Keyboard.get_inactive_voices()
Keyboard.get_max_voices()
Keyboard.get_mode()
Keyboard.get_notes()
Keyboard.get_sustain()
Keyboard.get_voices()
Keyboard.has_active_voice()
Keyboard.has_inactive_voices()
Keyboard.has_note()
Keyboard.has_notes()
Keyboard.remove()
Keyboard.set_arpeggiator()
Keyboard.set_key_press()
Keyboard.set_key_release()
Keyboard.set_max_voices()
Keyboard.set_mode()
Keyboard.set_sustain()
Keyboard.set_voice_press()
Keyboard.set_voice_release()
Keyboard.update()
Note
Voice
get_keyboard_driver()
- Direct Capacitive Touch Keyboard
TouchKeyboard
TouchKeyboard.MODE_HIGH
TouchKeyboard.MODE_LAST
TouchKeyboard.MODE_LOW
TouchKeyboard.NUM_MODES
TouchKeyboard.append()
TouchKeyboard.get()
TouchKeyboard.get_active_voices()
TouchKeyboard.get_inactive_voices()
TouchKeyboard.get_max_voices()
TouchKeyboard.get_mode()
TouchKeyboard.get_notes()
TouchKeyboard.get_sustain()
TouchKeyboard.get_voices()
TouchKeyboard.has_active_voice()
TouchKeyboard.has_inactive_voices()
TouchKeyboard.has_note()
TouchKeyboard.has_notes()
TouchKeyboard.remove()
TouchKeyboard.set_arpeggiator()
TouchKeyboard.set_key_press()
TouchKeyboard.set_key_release()
TouchKeyboard.set_max_voices()
TouchKeyboard.set_mode()
TouchKeyboard.set_sustain()
TouchKeyboard.set_voice_press()
TouchKeyboard.set_voice_release()
TouchKeyboard.update()
TouchPad
- TTP229 Capacitive Touch Keyboard
TonTouchKeyboard
TonTouchKeyboard.MODE_HIGH
TonTouchKeyboard.MODE_LAST
TonTouchKeyboard.MODE_LOW
TonTouchKeyboard.NUM_MODES
TonTouchKeyboard.append()
TonTouchKeyboard.get()
TonTouchKeyboard.get_active_voices()
TonTouchKeyboard.get_inactive_voices()
TonTouchKeyboard.get_max_voices()
TonTouchKeyboard.get_mode()
TonTouchKeyboard.get_notes()
TonTouchKeyboard.get_sustain()
TonTouchKeyboard.get_voices()
TonTouchKeyboard.has_active_voice()
TonTouchKeyboard.has_inactive_voices()
TonTouchKeyboard.has_note()
TonTouchKeyboard.has_notes()
TonTouchKeyboard.remove()
TonTouchKeyboard.set_arpeggiator()
TonTouchKeyboard.set_key_press()
TonTouchKeyboard.set_key_release()
TonTouchKeyboard.set_max_voices()
TonTouchKeyboard.set_mode()
TonTouchKeyboard.set_sustain()
TonTouchKeyboard.set_voice_press()
TonTouchKeyboard.set_voice_release()
TonTouchKeyboard.update()
TonTouchPad
- Timing
Timer
Timer.STEP_DOTTED_QUARTER
Timer.STEP_EIGHTH
Timer.STEP_HALF
Timer.STEP_QUARTER
Timer.STEP_SIXTEENTH
Timer.STEP_THIRTYSECOND
Timer.STEP_TRIPLET
Timer.STEP_WHOLE
Timer.disable()
Timer.enable()
Timer.get_bpm()
Timer.get_gate()
Timer.get_steps()
Timer.is_enabled()
Timer.set_bpm()
Timer.set_enabled()
Timer.set_gate()
Timer.set_press()
Timer.set_release()
Timer.set_step()
Timer.set_steps()
Timer.toggle()
Timer.update()
- Monophonic Arpeggiator
Arpeggiator
Arpeggiator.STEP_DOTTED_QUARTER
Arpeggiator.STEP_EIGHTH
Arpeggiator.STEP_HALF
Arpeggiator.STEP_QUARTER
Arpeggiator.STEP_SIXTEENTH
Arpeggiator.STEP_THIRTYSECOND
Arpeggiator.STEP_TRIPLET
Arpeggiator.STEP_WHOLE
Arpeggiator.disable()
Arpeggiator.enable()
Arpeggiator.get_bpm()
Arpeggiator.get_gate()
Arpeggiator.get_steps()
Arpeggiator.is_enabled()
Arpeggiator.set_bpm()
Arpeggiator.set_enabled()
Arpeggiator.set_gate()
Arpeggiator.set_press()
Arpeggiator.set_release()
Arpeggiator.set_step()
Arpeggiator.set_steps()
Arpeggiator.toggle()
Arpeggiator.update()
- Multi-Track Sequencer
Sequencer
Sequencer.STEP_DOTTED_QUARTER
Sequencer.STEP_EIGHTH
Sequencer.STEP_HALF
Sequencer.STEP_QUARTER
Sequencer.STEP_SIXTEENTH
Sequencer.STEP_THIRTYSECOND
Sequencer.STEP_TRIPLET
Sequencer.STEP_WHOLE
Sequencer.disable()
Sequencer.enable()
Sequencer.get_bpm()
Sequencer.get_gate()
Sequencer.get_length()
Sequencer.get_note()
Sequencer.get_position()
Sequencer.get_steps()
Sequencer.get_track()
Sequencer.get_tracks()
Sequencer.has_note()
Sequencer.is_enabled()
Sequencer.remove_note()
Sequencer.set_bpm()
Sequencer.set_enabled()
Sequencer.set_gate()
Sequencer.set_length()
Sequencer.set_note()
Sequencer.set_press()
Sequencer.set_release()
Sequencer.set_step()
Sequencer.set_steps()
Sequencer.set_tracks()
Sequencer.toggle()
Sequencer.update()
- Waveform Generator
- Synthesizer
- Synthesizer Voices
AREnvelope
LerpBlockInput
Voice
- Oscillator Voice
- Analog Drum Voices
ClosedHat
ClosedHat.get_blocks()
ClosedHat.get_notes()
ClosedHat.press()
ClosedHat.release()
ClosedHat.set_envelope_attack_level()
ClosedHat.set_filter()
ClosedHat.set_filter_frequency()
ClosedHat.set_filter_resonance()
ClosedHat.set_filter_type()
ClosedHat.set_frequencies()
ClosedHat.set_level()
ClosedHat.set_time()
ClosedHat.set_times()
ClosedHat.set_velocity_amount()
ClosedHat.set_waveforms()
ClosedHat.update()
Drum
Drum.get_blocks()
Drum.get_notes()
Drum.press()
Drum.release()
Drum.set_envelope_attack_level()
Drum.set_filter()
Drum.set_filter_frequency()
Drum.set_filter_resonance()
Drum.set_filter_type()
Drum.set_frequencies()
Drum.set_level()
Drum.set_times()
Drum.set_velocity_amount()
Drum.set_waveforms()
Drum.update()
Hat
Hat.get_blocks()
Hat.get_notes()
Hat.press()
Hat.release()
Hat.set_envelope_attack_level()
Hat.set_filter()
Hat.set_filter_frequency()
Hat.set_filter_resonance()
Hat.set_filter_type()
Hat.set_frequencies()
Hat.set_level()
Hat.set_time()
Hat.set_times()
Hat.set_velocity_amount()
Hat.set_waveforms()
Hat.update()
Kick
Kick.get_blocks()
Kick.get_notes()
Kick.press()
Kick.release()
Kick.set_envelope_attack_level()
Kick.set_filter()
Kick.set_filter_frequency()
Kick.set_filter_resonance()
Kick.set_filter_type()
Kick.set_frequencies()
Kick.set_level()
Kick.set_times()
Kick.set_velocity_amount()
Kick.set_waveforms()
Kick.update()
OpenHat
OpenHat.get_blocks()
OpenHat.get_notes()
OpenHat.press()
OpenHat.release()
OpenHat.set_envelope_attack_level()
OpenHat.set_filter()
OpenHat.set_filter_frequency()
OpenHat.set_filter_resonance()
OpenHat.set_filter_type()
OpenHat.set_frequencies()
OpenHat.set_level()
OpenHat.set_time()
OpenHat.set_times()
OpenHat.set_velocity_amount()
OpenHat.set_waveforms()
OpenHat.update()
Snare
Snare.get_blocks()
Snare.get_notes()
Snare.press()
Snare.release()
Snare.set_envelope_attack_level()
Snare.set_filter()
Snare.set_filter_frequency()
Snare.set_filter_resonance()
Snare.set_filter_type()
Snare.set_frequencies()
Snare.set_level()
Snare.set_times()
Snare.set_velocity_amount()
Snare.set_waveforms()
Snare.update()
- Sampler Voice
Sample
Sample.get_blocks()
Sample.get_duration()
Sample.get_notes()
Sample.load()
Sample.load_from_file()
Sample.press()
Sample.release()
Sample.set_filter()
Sample.set_filter_frequency()
Sample.set_filter_resonance()
Sample.set_filter_type()
Sample.set_level()
Sample.set_loop()
Sample.set_velocity_amount()
Sample.unload()
Sample.update()
- Menu System