Skip to content

Class daisy::DaisyField

ClassList > daisy > DaisyField

Public Types

Type Name
enum DaisyField
enum DaisyField
enum DaisyField
enum DaisyField

Public Attributes

Type Name
AnalogControl cv
OledDisplay< SSD130x4WireSpi128x64Driver > display
GateIn gate_in
GPIO gate_out
AnalogControl knob
LedDriverPca9685< 2, true > led_driver
MidiUartHandler midi
DaisySeed seed
Switch sw

Public Functions

Type Name
size_t AudioBlockSize ()
float AudioCallbackRate ()
float AudioSampleRate ()
void ChangeAudioCallback (AudioHandle::InterleavingAudioCallback cb)
void ChangeAudioCallback (AudioHandle::AudioCallback cb)
DaisyField ()
void DelayMs (size_t del)
AnalogControl * GetCv (size_t idx)
float GetCvValue (size_t idx) const
AnalogControl * GetKnob (size_t idx)
float GetKnobValue (size_t idx) const
Switch * GetSwitch (size_t idx)
void Init (bool boost=false)
bool KeyboardFallingEdge (size_t idx) const
bool KeyboardRisingEdge (size_t idx) const
bool KeyboardState (size_t idx) const
void ProcessAllControls ()
void ProcessAnalogControls ()
void ProcessDigitalControls ()
void SetAudioBlockSize (size_t blocksize)
void SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate)
void SetCvOut1 (uint16_t val)
void SetCvOut2 (uint16_t val)
void StartAdc ()
void StartAudio (AudioHandle::InterleavingAudioCallback cb)
void StartAudio (AudioHandle::AudioCallback cb)
void StartDac ()
void StopAdc ()
void StopAudio ()
void VegasMode ()
~DaisyField ()

Public Types Documentation

enum @ [¼]

This enum is anonymous

enum {
    SW_1,
    SW_2,
    SW_LAST,
};

enums for controls, etc.


enum @ [2/4]

This enum is anonymous

enum {
    KNOB_1,
    KNOB_2,
    KNOB_3,
    KNOB_4,
    KNOB_5,
    KNOB_6,
    KNOB_7,
    KNOB_8,
    KNOB_LAST,
};

All knobs connect to Daisy Seed's ADC1 pin via CD4051 mux Knobs are in order that they are laid out on hardware.


enum @ [¾]

This enum is anonymous

enum {
    CV_1,
    CV_2,
    CV_3,
    CV_4,
    CV_LAST,
};

enum @ [4/4]

This enum is anonymous

enum {
    LED_KEY_B1,
    LED_KEY_B2,
    LED_KEY_B3,
    LED_KEY_B4,
    LED_KEY_B5,
    LED_KEY_B6,
    LED_KEY_B7,
    LED_KEY_B8,
    LED_KEY_A8,
    LED_KEY_A7,
    LED_KEY_A6,
    LED_KEY_A5,
    LED_KEY_A4,
    LED_KEY_A3,
    LED_KEY_A2,
    LED_KEY_A1,
    LED_KNOB_1,
    LED_KNOB_2,
    LED_KNOB_3,
    LED_KNOB_4,
    LED_KNOB_5,
    LED_KNOB_6,
    LED_KNOB_7,
    LED_KNOB_8,
    LED_SW_1,
    LED_SW_2,
    LED_LAST,
};

Public Attributes Documentation

variable cv

AnalogControl daisy::DaisyField::cv[CV_LAST];

variable display

OledDisplay<SSD130x4WireSpi128x64Driver> daisy::DaisyField::display;

variable gate_in

GateIn daisy::DaisyField::gate_in;

variable gate_out

GPIO daisy::DaisyField::gate_out;

variable knob

AnalogControl daisy::DaisyField::knob[KNOB_LAST];

variable led_driver

LedDriverPca9685<2, true> daisy::DaisyField::led_driver;

variable midi

MidiUartHandler daisy::DaisyField::midi;

variable seed

DaisySeed daisy::DaisyField::seed;

variable sw

Switch daisy::DaisyField::sw[SW_LAST];

Public Functions Documentation

function AudioBlockSize

size_t daisy::DaisyField::AudioBlockSize () 

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


function AudioCallbackRate

float daisy::DaisyField::AudioCallbackRate () 

Returns the rate in Hz that the Audio callback is called


function AudioSampleRate

float daisy::DaisyField::AudioSampleRate () 

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


function ChangeAudioCallback [½]

void daisy::DaisyField::ChangeAudioCallback (
    AudioHandle::InterleavingAudioCallback cb
) 

Switch callback functions

Parameters:

  • cb New interleaved callback function.

function ChangeAudioCallback [2/2]

void daisy::DaisyField::ChangeAudioCallback (
    AudioHandle::AudioCallback cb
) 

Switch callback functions

Parameters:

  • cb New multichannel callback function.

function DaisyField

inline daisy::DaisyField::DaisyField () 

function DelayMs

void daisy::DaisyField::DelayMs (
    size_t del
) 

Wait some ms before going on.

Parameters:

  • del Delay time in ms.

function GetCv

AnalogControl * daisy::DaisyField::GetCv (
    size_t idx
) 

Getter for CV objects.

Parameters:

  • idx The CV input of interest.

function GetCvValue

float daisy::DaisyField::GetCvValue (
    size_t idx
) const

Returns the CV input's value

Parameters:

  • idx The CV input of interest.

function GetKnob

AnalogControl * daisy::DaisyField::GetKnob (
    size_t idx
) 

Getter for knob objects

Parameters:

  • idx The knob input of interest.

function GetKnobValue

float daisy::DaisyField::GetKnobValue (
    size_t idx
) const

Returns the knob's value

Parameters:

  • idx The knob of interest.

function GetSwitch

Switch * daisy::DaisyField::GetSwitch (
    size_t idx
) 

Getter for switch objects

Parameters:

  • idx The switch of interest.

function Init

void daisy::DaisyField::Init (
    bool boost=false
) 

Initializes the Daisy Field, and all of its hardware.


function KeyboardFallingEdge

bool daisy::DaisyField::KeyboardFallingEdge (
    size_t idx
) const

Returns true if the key has just been released

Parameters:

  • idx the key of interest

function KeyboardRisingEdge

bool daisy::DaisyField::KeyboardRisingEdge (
    size_t idx
) const

Returns true if the key has just been pressed

Parameters:

  • idx the key of interest

function KeyboardState

bool daisy::DaisyField::KeyboardState (
    size_t idx
) const

Returns true if the key has not been pressed recently

Parameters:

  • idx the key of interest

function ProcessAllControls

inline void daisy::DaisyField::ProcessAllControls () 

Process Analog and Digital Controls


function ProcessAnalogControls

void daisy::DaisyField::ProcessAnalogControls () 

Processes the ADC inputs, updating their values


function ProcessDigitalControls

void daisy::DaisyField::ProcessDigitalControls () 

Process tactile switches and keyboard states


function SetAudioBlockSize

void daisy::DaisyField::SetAudioBlockSize (
    size_t blocksize
) 

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


function SetAudioSampleRate

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

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


function SetCvOut1

void daisy::DaisyField::SetCvOut1 (
    uint16_t val
) 

Sets the output of CV out 1 to a value between 0-4095 that corresponds to 0-5V


function SetCvOut2

void daisy::DaisyField::SetCvOut2 (
    uint16_t val
) 

Sets the output of CV out 2 to a value between 0-4095 that corresponds to 0-5V


function StartAdc

void daisy::DaisyField::StartAdc () 

Starts Transfering data from the ADC


function StartAudio [½]

void daisy::DaisyField::StartAudio (
    AudioHandle::InterleavingAudioCallback cb
) 

Starts the callback

Parameters:

  • cb Interleaved callback function

function StartAudio [2/2]

void daisy::DaisyField::StartAudio (
    AudioHandle::AudioCallback cb
) 

Starts the callback

Parameters:

  • cb multichannel callback function

function StartDac

void daisy::DaisyField::StartDac () 

Turns on the built-in 12-bit DAC on the Daisy Seed This is now deprecated and does nothing. The polling use of the DACs now handles starting the tranmission.


function StopAdc

void daisy::DaisyField::StopAdc () 

Stops Transfering data from the ADC


function StopAudio

void daisy::DaisyField::StopAudio () 

Stops the audio if it is running.


function VegasMode

void daisy::DaisyField::VegasMode () 

Light show, cycling through all LEDs, and OLED


function ~DaisyField

inline daisy::DaisyField::~DaisyField () 


The documentation for this class was generated from the following file external-docs/libDaisy/src/daisy_field.h