Skip to content

daisy::DaisyVersio

Module: LIBDAISY / BOARDS

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

Name
enum AV_LEDS
enum AV_KNOBS
enum AV_TOGGLE3

Public Functions

Name
DaisyVersio()
~DaisyVersio()
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 SetAudioBlockSize(size_t size)
size_t AudioBlockSize()
void SetAudioSampleRate(SaiHandle::Config::SampleRate samplerate)
float AudioSampleRate()
float AudioCallbackRate()
void StartAdc()
void StopAdc()
void ProcessAnalogControls()
void ProcessAllControls()
bool SwitchPressed()
bool Gate()
void SetLed(size_t idx, float red, float green, float blue)
float GetKnobValue(int idx)
void UpdateLeds()
void UpdateExample()

Public Attributes

Name
DaisySeed seed
RgbLed[LED_LAST] leds
AnalogControl[KNOB_LAST] knobs
Switch tap
GateIn gate
Switch3[SW_LAST] sw

Detailed Description

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

Author: Ankoor Apte, Noise Engineering

Date: October 2020

Public Types Documentation

enum AV_LEDS

Enumerator Value Description
LED_0
LED_1
LED_2
LED_3
LED_LAST

enum AV_KNOBS

Enumerator Value Description
KNOB_0
KNOB_1
KNOB_2
KNOB_3
KNOB_4
KNOB_5
KNOB_6
KNOB_LAST

enum AV_TOGGLE3

Enumerator Value Description
SW_0
SW_1
SW_LAST

Public Functions Documentation

function DaisyVersio

inline DaisyVersio()

function ~DaisyVersio

inline ~DaisyVersio()

function Init

void Init(
    bool boost =false
)

Initializes the Versio, and all of its hardware.


function DelayMs

void DelayMs(
    size_t del
)

Parameters:

  • del Delay time in ms.

Wait some ms before going on.


function StartAudio

void StartAudio(
    AudioHandle::InterleavingAudioCallback cb
)

Parameters:

  • cb Interleaved callback function

Starts the callback


function StartAudio

void StartAudio(
    AudioHandle::AudioCallback cb
)

Parameters:

  • cb Non-interleaved 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 non-interleaved callback function.

Switch callback functions


function StopAudio

void StopAudio()

Stops the audio if it is running.


function SetAudioBlockSize

void SetAudioBlockSize(
    size_t size
)

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 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 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()

Stop converting ADCs


function ProcessAnalogControls

void ProcessAnalogControls()

Normalize ADC CV input. Call this once per main loop update to normalize CV input to range (0.0f, 1.0f)


function ProcessAllControls

inline void ProcessAllControls()

Does what it says


function SwitchPressed

bool SwitchPressed()

Returns true if momentary switch is pressed


function Gate

bool Gate()

Returns true if gate in is HIGH


function SetLed

void SetLed(
    size_t idx,
    float red,
    float green,
    float blue
)

Set an LED (idx < 4) to a color


function GetKnobValue

float GetKnobValue(
    int idx
)

Get Knob Value, float from 0.0f to 1.0f


function UpdateLeds

void UpdateLeds()

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


function UpdateExample

void UpdateExample()

Public Attributes Documentation

variable seed

DaisySeed seed;

variable leds

RgbLed[LED_LAST] leds;

variable knobs

AnalogControl[KNOB_LAST] knobs;

variable tap

Switch tap;

variable gate

GateIn gate;

variable sw

Switch3[SW_LAST] sw;

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