Class that handles initializing all of the hardware specific to the Desmodus Versio hardware.
Helper funtions are also in place to provide easy access to built-in controls and peripherals.
More...
Class that handles initializing all of the hardware specific to the Desmodus Versio hardware.
Helper funtions are also in place to provide easy access to built-in controls and peripherals.
#include <daisy_versio.h>
Public Types | |
| enum | AV_LEDS { LED_0 , LED_1 , LED_2 , LED_3 , LED_LAST } |
| enum | AV_KNOBS { KNOB_0 , KNOB_1 , KNOB_2 , KNOB_3 , KNOB_4 , KNOB_5 , KNOB_6 , KNOB_LAST } |
| enum | AV_TOGGLE3 { SW_0 , SW_1 , SW_LAST } |
Public Member Functions | |
| DaisyVersio () | |
| ~DaisyVersio () | |
| void | Init (bool boost=false) |
| void | DelayMs (size_t del) |
| void | StartAudio (AudioHandle::InterleavingAudioCallback cb) |
| void | StartAudio (AudioHandle::AudioCallback cb) |
| void | ChangeAudioCallback (AudioHandle::InterleavingAudioCallback cb) |
| void | ChangeAudioCallback (AudioHandle::AudioCallback cb) |
| void | StopAudio () |
| void | SetAudioBlockSize (size_t size) |
| size_t | AudioBlockSize () |
| void | SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate) |
| float | AudioSampleRate () |
| float | AudioCallbackRate () |
| void | StartAdc () |
| void | StopAdc () |
| void | ProcessAnalogControls () |
| void | ProcessAllControls () |
| bool | SwitchPressed () |
| bool | Gate () |
| void | SetLed (size_t idx, float red, float green, float blue) |
| float | GetKnobValue (int idx) |
| void | UpdateLeds () |
| void | UpdateExample () |
Public Attributes | |
| DaisySeed | seed |
| RgbLed | leds [LED_LAST] |
| AnalogControl | knobs [KNOB_LAST] |
| Switch | tap |
| GateIn | gate |
| Switch3 | sw [SW_LAST] |
|
inline |
|
inline |
| size_t daisy::DaisyVersio::AudioBlockSize | ( | ) |
Returns the number of samples per channel in a block of audio.
| float daisy::DaisyVersio::AudioCallbackRate | ( | ) |
Returns the rate in Hz that the Audio callback is called
| float daisy::DaisyVersio::AudioSampleRate | ( | ) |
Returns the audio sample rate in Hz as a floating point number.
| void daisy::DaisyVersio::ChangeAudioCallback | ( | AudioHandle::AudioCallback | cb | ) |
Switch callback functions
| cb | New non-interleaved callback function. |
| void daisy::DaisyVersio::ChangeAudioCallback | ( | AudioHandle::InterleavingAudioCallback | cb | ) |
Switch callback functions
| cb | New interleaved callback function. |
| void daisy::DaisyVersio::DelayMs | ( | size_t | del | ) |
Wait some ms before going on.
| del | Delay time in ms. |
| bool daisy::DaisyVersio::Gate | ( | ) |
Returns true if gate in is HIGH
| float daisy::DaisyVersio::GetKnobValue | ( | int | idx | ) |
Get Knob Value, float from 0.0f to 1.0f
| void daisy::DaisyVersio::Init | ( | bool | boost = false | ) |
Initializes the Versio, and all of its hardware.
|
inline |
Does what it says
| void daisy::DaisyVersio::ProcessAnalogControls | ( | ) |
Normalize ADC CV input. Call this once per main loop update to normalize CV input to range (0.0f, 1.0f)
| void daisy::DaisyVersio::SetAudioBlockSize | ( | size_t | size | ) |
Sets the number of samples processed per channel by the audio callback.
| void daisy::DaisyVersio::SetAudioSampleRate | ( | SaiHandle::Config::SampleRate | samplerate | ) |
Updates the Audio Sample Rate, and reinitializes. Audio must be stopped for this to work.
| void daisy::DaisyVersio::SetLed | ( | size_t | idx, |
| float | red, | ||
| float | green, | ||
| float | blue ) |
Set an LED (idx < 4) to a color
| void daisy::DaisyVersio::StartAdc | ( | ) |
Start analog to digital conversion.
| void daisy::DaisyVersio::StartAudio | ( | AudioHandle::AudioCallback | cb | ) |
Starts the callback
| cb | Non-interleaved callback function |
| void daisy::DaisyVersio::StartAudio | ( | AudioHandle::InterleavingAudioCallback | cb | ) |
Starts the callback
| cb | Interleaved callback function |
| void daisy::DaisyVersio::StopAdc | ( | ) |
Stop converting ADCs
| void daisy::DaisyVersio::StopAudio | ( | ) |
Stops the audio if it is running.
| bool daisy::DaisyVersio::SwitchPressed | ( | ) |
Returns true if momentary switch is pressed
| void daisy::DaisyVersio::UpdateExample | ( | ) |
| void daisy::DaisyVersio::UpdateLeds | ( | ) |
Update LED PWM state. Call this once per main loop update to correctly display led colors
| GateIn daisy::DaisyVersio::gate |
| AnalogControl daisy::DaisyVersio::knobs[KNOB_LAST] |
| DaisySeed daisy::DaisyVersio::seed |
| Switch daisy::DaisyVersio::tap |