Class daisy::DaisyPetal¶
ClassList > daisy > DaisyPetal
Helpers and hardware definitions for daisy petal.
#include <daisy_petal.h>
Public Types¶
Type | Name |
---|---|
enum | FootswitchLed |
enum | Knob |
enum | RingLed |
enum | Sw |
Public Attributes¶
Type | Name |
---|---|
Encoder | encoder |
AnalogControl | expression |
Led | footswitch_led |
AnalogControl | knob |
RgbLed | ring_led |
DaisySeed | seed |
Switch | switches |
Public Functions¶
Type | Name |
---|---|
size_t | AudioBlockSize () |
float | AudioCallbackRate () |
float | AudioSampleRate () |
void | ChangeAudioCallback (AudioHandle::InterleavingAudioCallback cb) |
void | ChangeAudioCallback (AudioHandle::AudioCallback cb) |
void | ClearLeds () |
DaisyPetal () |
|
void | DelayMs (size_t del) |
float | GetExpression () |
float | GetKnobValue (Knob k) |
void | Init (bool boost=false) |
void | ProcessAllControls () |
void | ProcessAnalogControls () |
void | ProcessDigitalControls () |
void | SetAudioBlockSize (size_t size) |
void | SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate) |
void | SetFootswitchLed (FootswitchLed idx, float bright) |
void | SetRingLed (RingLed idx, float r, float g, float b) |
void | StartAdc () |
void | StartAudio (AudioHandle::InterleavingAudioCallback cb) |
void | StartAudio (AudioHandle::AudioCallback cb) |
void | StopAdc () |
void | StopAudio () |
void | UpdateLeds () |
~DaisyPetal () |
Public Types Documentation¶
enum FootswitchLed¶
enum daisy::DaisyPetal::FootswitchLed {
FOOTSWITCH_LED_1,
FOOTSWITCH_LED_2,
FOOTSWITCH_LED_3,
FOOTSWITCH_LED_4,
FOOTSWITCH_LED_LAST
};
footswitch leds
enum Knob¶
Knobs
enum RingLed¶
enum daisy::DaisyPetal::RingLed {
RING_LED_1,
RING_LED_2,
RING_LED_3,
RING_LED_4,
RING_LED_5,
RING_LED_6,
RING_LED_7,
RING_LED_8,
RING_LED_LAST
};
Leds in ringled
enum Sw¶
Switches
Public Attributes Documentation¶
variable encoder¶
&
variable expression¶
&
variable footswitch_led¶
&
variable knob¶
&
variable ring_led¶
&
variable seed¶
&
variable switches¶
< &
Public Functions Documentation¶
function AudioBlockSize¶
Returns the number of samples per channel in a block of audio.
function AudioCallbackRate¶
Returns the rate in Hz that the Audio callback is called
function AudioSampleRate¶
Returns the audio sample rate in Hz as a floating point number.
function ChangeAudioCallback [½]¶
Switch callback functions
Parameters:
cb
New interleaved callback function.
function ChangeAudioCallback [2/2]¶
Switch callback functions
Parameters:
cb
New multichannel callback function.
function ClearLeds¶
Turn all leds off
function DaisyPetal¶
Constructor
function DelayMs¶
Wait before moving on.
Parameters:
del
Delay time in ms.
function GetExpression¶
&
function GetKnobValue¶
Get value per knob.
Parameters:
k
Which knob to get
Returns:
Floating point knob position.
function Init¶
Initialize daisy petal
function ProcessAllControls¶
Process Analog and Digital Controls
function ProcessAnalogControls¶
Call at the same frequency as controls are read for stable readings.
function ProcessDigitalControls¶
Process digital controls
function SetAudioBlockSize¶
Sets the number of samples processed per channel by the audio callback.
Parameters:
size
Audio block size
function SetAudioSampleRate¶
Updates the Audio Sample Rate, and reinitializes. Audio must be stopped for this to work.
function SetFootswitchLed¶
Set footswitch LED
Parameters:
idx
Led Indexbright
Brightness
function SetRingLed¶
Set ring LED colors
Parameters:
idx
Index to setr
Red valueg
Green valueb
Blue value
function StartAdc¶
Start analog to digital conversion.
function StartAudio [½]¶
Starts the callback
Parameters:
cb
Interleaved callback function
function StartAudio [2/2]¶
Starts the callback
Parameters:
cb
multichannel callback function
function StopAdc¶
Stops Transfering data from the ADC
function StopAudio¶
Stops the audio if it is running.
function UpdateLeds¶
Update Leds to values you had set.
function ~DaisyPetal¶
Destructor
The documentation for this class was generated from the following file external-docs/libDaisy/src/daisy_petal.h