daisy::DaisyPatch¶
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_patch.h>
Public Types¶
Name | |
---|---|
enum | Ctrl |
enum | GateInput |
Public Functions¶
Name | |
---|---|
DaisyPatch() | |
~DaisyPatch() | |
void | Init(bool boost =false) |
void | DelayMs(size_t del) |
void | StartAudio(AudioHandle::AudioCallback cb) |
void | ChangeAudioCallback(AudioHandle::AudioCallback cb) |
void | StopAudio() |
void | SetAudioSampleRate(SaiHandle::Config::SampleRate samplerate) |
float | AudioSampleRate() |
void | SetAudioBlockSize(size_t size) |
size_t | AudioBlockSize() |
float | AudioCallbackRate() |
void | StartAdc() |
void | StopAdc() |
void | ProcessAnalogControls() |
void | ProcessAllControls() |
float | GetKnobValue(Ctrl k) |
void | ProcessDigitalControls() |
void | DisplayControls(bool invert =true) |
Public Attributes¶
Name | |
---|---|
DaisySeed | seed |
Encoder | encoder |
AnalogControl[CTRL_LAST] | controls |
GateIn[GATE_IN_LAST] | gate_input |
MidiUartHandler | midi |
OledDisplay< SSD130x4WireSpi128x64Driver > | display |
dsy_gpio | gate_output |
Detailed Description¶
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 Ctrl¶
Enumerator | Value | Description |
---|---|---|
CTRL_1 | ||
CTRL_2 | ||
CTRL_3 | ||
CTRL_4 | ||
CTRL_LAST |
Enum of Ctrls to represent the four CV/Knob combos on the Patch
enum GateInput¶
Enumerator | Value | Description |
---|---|---|
GATE_IN_1 | ||
GATE_IN_2 | ||
GATE_IN_LAST | < |
Daisy patch gate inputs
Public Functions Documentation¶
function DaisyPatch¶
Constructor
function ~DaisyPatch¶
Destructor
function Init¶
Initializes the daisy seed, and patch hardware.
function DelayMs¶
Parameters:
- del Delay time in ms.
Wait some ms before going on.
function StartAudio¶
Parameters:
- cb multichannel callback function
Starts the callback
function ChangeAudioCallback¶
Parameters:
- cb New multichannel callback function.
Switch callback functions
function StopAudio¶
Stops the audio
function SetAudioSampleRate¶
Set the sample rate for the audio
function AudioSampleRate¶
Get sample rate
function SetAudioBlockSize¶
Parameters:
- size Audio block size.
Audio Block size defaults to 48. Change it using this function before StartingAudio
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 StartAdc¶
Start analog to digital conversion.
function StopAdc¶
Stops Transfering data from the ADC
function ProcessAnalogControls¶
Call at same rate as reading controls for good reads.
function ProcessAllControls¶
Process Analog and Digital Controls
function GetKnobValue¶
Parameters:
- k Which control to get
Get value for a particular control
function ProcessDigitalControls¶
Process the digital controls
function DisplayControls¶
Control the display
Public Attributes Documentation¶
variable seed¶
Seed object
variable encoder¶
Encoder object
variable controls¶
Array of controls
variable gate_input¶
Gate inputs
variable midi¶
Handles midi
variable display¶
&
variable gate_output¶
&
Updated on 2024-01-03 at 19:41:01 +0000