API Reference
relic_synthiota
Helper library for Synthiota
Author(s): Cooper Dalrymple
Implementation Notes
Hardware:
1 x Synthiota PCB
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
todbot’s TMIDI library: https://github.com/todbot/CircuitPython_TMIDI
Adafruit’s Debouncer library: https://github.com/adafruit/Adafruit_CircuitPython_Debouncer
Adafruit’s DisplayIO SH1106 library: https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1106
Adafruit’s MPR121 library: https://github.com/adafruit/Adafruit_CircuitPython_MPR121
Adafruit’s NeoPixel library: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel
- class relic_synthiota.Slider(pads: list, wrap: bool = False, offset: int = 0, scale: int = None, pull: digitalio.Pull | None = None)
Simple capacitive touch slider made from three pads attached to an MPR121.
Create a Slider object using the provided MPR121 channels.
- Parameters:
pads – A list of 3 adafruit_mpr121.MPR121_Channel objects
wrap – Whether or not to wrap the value in a “circular” fashion
offset – An offset that will be applied to the slider value from 0 to 1
scale – The size of each pad, defaults to 0.333.
pull – Specify external pull resistor type. If
None, assume pull-down or chip-specific implementation that does not require a pull.
- class relic_synthiota.Synthiota(voice_count: int = 1, sample_rate: int = _DEFAULT_SAMPLE_RATE, channel_count: int = _DEFAULT_CHANNEL_COUNT, buffer_size: int = _DEFAULT_BUFFER_SIZE)
Helper library for Synthiota.
Setup hardware resources including audio output, midi usb/uart, touch inputs, display, neopixels, encoder, and potentiometers.
- Parameters:
- property audio: audiobusio.I2SOut
The I2S audio output object.
- property display: SH1106
The display bus object.
- property down_button: adafruit_debouncer.Button
The object for the down button.
- property encoder: rotaryio.IncrementalEncoder
The incremental encoder object.
- property encoder_button: adafruit_debouncer.Button
The object for the encoder button.
- get_midi_messages() Tuple[Message | None]
Read all available messages from both the USB and UART MIDI ports.
- property leds: neopixel.NeoPixel
The neopixel driver which controls all 27 leds on the device.
- property left_slider_leds: adafruit_pixelbuf.PixelReturnSequence | None
The NeoPixels above the left slider from left to right.
- property mixer: audiomixer.Mixer
The audio output mixer. Use this object to attach your audio sources.
- property mode_leds: adafruit_pixelbuf.PixelReturnSequence | None
The mode NeoPixels in the order of edit, mode, and play.
- property pot_leds: adafruit_pixelbuf.PixelReturnSequence | None
The NeoPixels corresponding to each of the 8 potentiometer from left-to-right.
- property right_slider_leds: adafruit_pixelbuf.PixelReturnSequence | None
The NeoPixels above the right slider from left to right.
- property sample_rate: int
How quickly samples are played through the audio output in Hertz (cycles per second)
- send_midi_message(message: Message) None
Send a message to both the USB and UART MIDI ports.
- Parameters:
message – The MIDI message you would like to send.
- property step_leds: adafruit_pixelbuf.PixelReturnSequence | None
The NeoPixels for each step touch pad in left-to-right order from bottom-left to top-right.
- property touched_steps: Tuple[bool | None]
The state of all 16 step touch pads in left-to-right order from bottom-left to top-right.
- property up_button: adafruit_debouncer.Button
The object for the up button.