Skip to content

daisy::DaisyPod

Module: LIBDAISY / BOARDS

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...

#include <daisy_pod.h>

Public Types

Name
enum Sw
enum Knob

Public Functions

Public Attributes

Detailed Description

class daisy::DaisyPod;

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.

Author: Stephen Hensley

Date: November 2019

Public Types Documentation

enum Sw

Enumerator Value Description
BUTTON_1
BUTTON_2 &
BUTTON_LAST &

Switches

enum Knob

Enumerator Value Description
KNOB_1
KNOB_2 &
KNOB_LAST &

Knobs

Public Functions Documentation

function DaisyPod

inline DaisyPod()

function ~DaisyPod

inline ~DaisyPod()

function Init

void Init(
    bool boost =false
)

Init related stuff.


function DelayMs

void DelayMs(
    size_t del
)

Parameters:

  • del Time to wait in ms.

Wait for a bit


function StartAudio

void StartAudio(
    AudioHandle::InterleavingAudioCallback cb
)

Parameters:

  • cb Interleaved callback function

Starts the callback


function StartAudio

void StartAudio(
    AudioHandle::AudioCallback cb
)

Parameters:

  • cb multichannel callback function

Starts the callback


function ChangeAudioCallback

void ChangeAudioCallback(
    AudioHandle::InterleavingAudioCallback cb
)

Parameters:

  • cb New interleaved callback function.

Switch callback functions


function ChangeAudioCallback

void ChangeAudioCallback(
    AudioHandle::AudioCallback cb
)

Parameters:

  • cb New multichannel callback function.

Switch callback functions


function StopAudio

void StopAudio()

Stops the audio if it is running.


function SetAudioSampleRate

void SetAudioSampleRate(
    SaiHandle::Config::SampleRate samplerate
)

Updates the Audio Sample Rate, and reinitializes. Audio must be stopped for this to work.


function AudioSampleRate

float AudioSampleRate()

Returns the audio sample rate in Hz as a floating point number.


function SetAudioBlockSize

void SetAudioBlockSize(
    size_t blocksize
)

Sets the number of samples processed per channel by the audio callback.


function AudioBlockSize

size_t AudioBlockSize()

Returns the number of samples per channel in a block of audio.


function AudioCallbackRate

float AudioCallbackRate()

Returns the rate in Hz that the Audio callback is called


function StartAdc

void StartAdc()

Start analog to digital conversion.


function StopAdc

void StopAdc()

Stops Transfering data from the ADC


function ProcessAnalogControls

void ProcessAnalogControls()

Call at same rate as analog reads for smooth reading.


function ProcessAllControls

inline void ProcessAllControls()

Process Analog and Digital Controls


function GetKnobValue

float GetKnobValue(
    Knob k
)

&


function ProcessDigitalControls

void ProcessDigitalControls()

Process digital controls


function ClearLeds

void ClearLeds()

Reset Leds


function UpdateLeds

void UpdateLeds()

Update Leds to set colors


Public Attributes Documentation

variable seed

DaisySeed seed;

Public Members

autotoc_md0

variable encoder

Encoder encoder;

&

variable knob1

AnalogControl knob1;

&

variable knob2

AnalogControl knob2;

&

variable knobs

AnalogControl *[KNOB_LAST] knobs;

&

variable button1

Switch button1;

&

variable button2

Switch button2;

&

variable buttons

Switch *[BUTTON_LAST] buttons;

&

variable led1

RgbLed led1;

&

variable led2

RgbLed led2;

&

variable midi

MidiUartHandler midi;

Updated on 2024-01-03 at 19:41:01 +0000