Skip to content

Class daisy::DaisyVersio

ClassList > daisy > DaisyVersio

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

  • #include <daisy_versio.h>

Public Types

Type Name
enum AV_KNOBS
enum AV_LEDS
enum AV_TOGGLE3

Public Attributes

Type Name
GateIn gate
AnalogControl knobs
RgbLed leds
DaisySeed seed
Switch3 sw
Switch tap

Public Functions

Type Name
size_t AudioBlockSize ()
float AudioCallbackRate ()
float AudioSampleRate ()
void ChangeAudioCallback (AudioHandle::InterleavingAudioCallback cb)
void ChangeAudioCallback (AudioHandle::AudioCallback cb)
DaisyVersio ()
void DelayMs (size_t del)
bool Gate ()
float GetKnobValue (int idx)
void Init (bool boost=false)
void ProcessAllControls ()
void ProcessAnalogControls ()
void SetAudioBlockSize (size_t size)
void SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate)
void SetLed (size_t idx, float red, float green, float blue)
void StartAdc ()
void StartAudio (AudioHandle::InterleavingAudioCallback cb)
void StartAudio (AudioHandle::AudioCallback cb)
void StopAdc ()
void StopAudio ()
bool SwitchPressed ()
void UpdateExample ()
void UpdateLeds ()
~DaisyVersio ()

Detailed Description

Author:

Ankoor Apte, Noise Engineering

Date:

October 2020

Public Types Documentation

enum AV_KNOBS

enum daisy::DaisyVersio::AV_KNOBS {
    KNOB_0,
    KNOB_1,
    KNOB_2,
    KNOB_3,
    KNOB_4,
    KNOB_5,
    KNOB_6,
    KNOB_LAST
};

enum AV_LEDS

enum daisy::DaisyVersio::AV_LEDS {
    LED_0,
    LED_1,
    LED_2,
    LED_3,
    LED_LAST
};

enum AV_TOGGLE3

enum daisy::DaisyVersio::AV_TOGGLE3 {
    SW_0,
    SW_1,
    SW_LAST
};

Public Attributes Documentation

variable gate

GateIn daisy::DaisyVersio::gate;

variable knobs

AnalogControl daisy::DaisyVersio::knobs[KNOB_LAST];

variable leds

RgbLed daisy::DaisyVersio::leds[LED_LAST];

variable seed

DaisySeed daisy::DaisyVersio::seed;

variable sw

Switch3 daisy::DaisyVersio::sw[SW_LAST];

variable tap

Switch daisy::DaisyVersio::tap;

Public Functions Documentation

function AudioBlockSize

size_t daisy::DaisyVersio::AudioBlockSize () 

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


function AudioCallbackRate

float daisy::DaisyVersio::AudioCallbackRate () 

Returns the rate in Hz that the Audio callback is called


function AudioSampleRate

float daisy::DaisyVersio::AudioSampleRate () 

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


function ChangeAudioCallback [½]

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

Switch callback functions

Parameters:

  • cb New interleaved callback function.

function ChangeAudioCallback [2/2]

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

Switch callback functions

Parameters:

  • cb New non-interleaved callback function.

function DaisyVersio

inline daisy::DaisyVersio::DaisyVersio () 

function DelayMs

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

Wait some ms before going on.

Parameters:

  • del Delay time in ms.

function Gate

bool daisy::DaisyVersio::Gate () 

Returns true if gate in is HIGH


function GetKnobValue

float daisy::DaisyVersio::GetKnobValue (
    int idx
) 

Get Knob Value, float from 0.0f to 1.0f


function Init

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

Initializes the Versio, and all of its hardware.


function ProcessAllControls

inline void daisy::DaisyVersio::ProcessAllControls () 

Does what it says


function ProcessAnalogControls

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)


function SetAudioBlockSize

void daisy::DaisyVersio::SetAudioBlockSize (
    size_t size
) 

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


function SetAudioSampleRate

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

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


function SetLed

void daisy::DaisyVersio::SetLed (
    size_t idx,
    float red,
    float green,
    float blue
) 

Set an LED (idx < 4) to a color


function StartAdc

void daisy::DaisyVersio::StartAdc () 

Start analog to digital conversion.


function StartAudio [½]

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

Starts the callback

Parameters:

  • cb Interleaved callback function

function StartAudio [2/2]

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

Starts the callback

Parameters:

  • cb Non-interleaved callback function

function StopAdc

void daisy::DaisyVersio::StopAdc () 

Stop converting ADCs


function StopAudio

void daisy::DaisyVersio::StopAudio () 

Stops the audio if it is running.


function SwitchPressed

bool daisy::DaisyVersio::SwitchPressed () 

Returns true if momentary switch is pressed


function UpdateExample

void daisy::DaisyVersio::UpdateExample () 

function UpdateLeds

void daisy::DaisyVersio::UpdateLeds () 

Update LED PWM state. Call this once per main loop update to correctly display led colors


function ~DaisyVersio

inline daisy::DaisyVersio::~DaisyVersio () 


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