Class that handles initializing all of the hardware specific to the Daisy Patch Board.
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 Daisy Patch Board.
Helper funtions are also in place to provide easy access to built-in controls and peripherals.
#include <daisy_pod.h>
Public Types | |
| enum | Sw { BUTTON_1 , BUTTON_2 , BUTTON_LAST } |
| enum | Knob { KNOB_1 , KNOB_2 , KNOB_LAST } |
Public Member Functions | |
| DaisyPod () | |
| ~DaisyPod () | |
| 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 | SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate) |
| float | AudioSampleRate () |
| void | SetAudioBlockSize (size_t blocksize) |
| size_t | AudioBlockSize () |
| float | AudioCallbackRate () |
| void | StartAdc () |
| void | StopAdc () |
| void | ProcessAnalogControls () |
| void | ProcessAllControls () |
| float | GetKnobValue (Knob k) |
| void | ProcessDigitalControls () |
| void | ClearLeds () |
| void | UpdateLeds () |
Public Attributes | |
| DaisySeed | seed |
| Encoder | encoder |
| AnalogControl | knob1 |
| AnalogControl | knob2 |
| AnalogControl * | knobs [KNOB_LAST] |
| Switch | button1 |
| Switch | button2 |
| Switch * | buttons [BUTTON_LAST] |
| RgbLed | led1 |
| RgbLed | led2 |
| MidiUartHandler | midi |
| enum daisy::DaisyPod::Sw |
|
inline |
|
inline |
| size_t daisy::DaisyPod::AudioBlockSize | ( | ) |
Returns the number of samples per channel in a block of audio.
| float daisy::DaisyPod::AudioCallbackRate | ( | ) |
Returns the rate in Hz that the Audio callback is called
| float daisy::DaisyPod::AudioSampleRate | ( | ) |
Returns the audio sample rate in Hz as a floating point number.
| void daisy::DaisyPod::ChangeAudioCallback | ( | AudioHandle::AudioCallback | cb | ) |
Switch callback functions
| cb | New multichannel callback function. |
| void daisy::DaisyPod::ChangeAudioCallback | ( | AudioHandle::InterleavingAudioCallback | cb | ) |
Switch callback functions
| cb | New interleaved callback function. |
| void daisy::DaisyPod::ClearLeds | ( | ) |
Reset Leds
| void daisy::DaisyPod::DelayMs | ( | size_t | del | ) |
Wait for a bit
| del | Time to wait in ms. |
| float daisy::DaisyPod::GetKnobValue | ( | Knob | k | ) |
&
| void daisy::DaisyPod::Init | ( | bool | boost = false | ) |
Init related stuff.
|
inline |
Process Analog and Digital Controls
| void daisy::DaisyPod::ProcessAnalogControls | ( | ) |
Call at same rate as analog reads for smooth reading.
| void daisy::DaisyPod::ProcessDigitalControls | ( | ) |
Process digital controls
| void daisy::DaisyPod::SetAudioBlockSize | ( | size_t | blocksize | ) |
Sets the number of samples processed per channel by the audio callback.
| void daisy::DaisyPod::SetAudioSampleRate | ( | SaiHandle::Config::SampleRate | samplerate | ) |
Updates the Audio Sample Rate, and reinitializes. Audio must be stopped for this to work.
| void daisy::DaisyPod::StartAdc | ( | ) |
Start analog to digital conversion.
| void daisy::DaisyPod::StartAudio | ( | AudioHandle::AudioCallback | cb | ) |
Starts the callback
| cb | multichannel callback function |
| void daisy::DaisyPod::StartAudio | ( | AudioHandle::InterleavingAudioCallback | cb | ) |
Starts the callback
| cb | Interleaved callback function |
| void daisy::DaisyPod::StopAdc | ( | ) |
Stops Transfering data from the ADC
| void daisy::DaisyPod::StopAudio | ( | ) |
Stops the audio if it is running.
| void daisy::DaisyPod::UpdateLeds | ( | ) |
Update Leds to set colors
| Switch daisy::DaisyPod::button1 |
&
| Switch daisy::DaisyPod::button2 |
&
| Switch * daisy::DaisyPod::buttons[BUTTON_LAST] |
&
| Encoder daisy::DaisyPod::encoder |
&
| AnalogControl daisy::DaisyPod::knob1 |
&
| AnalogControl daisy::DaisyPod::knob2 |
&
| AnalogControl * daisy::DaisyPod::knobs[KNOB_LAST] |
&
| RgbLed daisy::DaisyPod::led1 |
&
| RgbLed daisy::DaisyPod::led2 |
&
| MidiUartHandler daisy::DaisyPod::midi |
| DaisySeed daisy::DaisyPod::seed |