Class daisy::DaisyPatch¶
ClassList > 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¶
Type | Name |
---|---|
enum | Ctrl |
enum | GateInput |
Public Attributes¶
Type | Name |
---|---|
Ak4556 | codec |
AnalogControl | controls |
OledDisplay< SSD130x4WireSpi128x64Driver > | display |
Encoder | encoder |
GateIn | gate_input |
GPIO | gate_output |
MidiUartHandler | midi |
DaisySeed | seed |
Public Functions¶
Type | Name |
---|---|
size_t | AudioBlockSize () |
float | AudioCallbackRate () |
float | AudioSampleRate () |
void | ChangeAudioCallback (AudioHandle::AudioCallback cb) |
DaisyPatch () |
|
void | DelayMs (size_t del) |
void | DisplayControls (bool invert=true) |
float | GetKnobValue (Ctrl k) |
void | Init (bool boost=false) |
void | ProcessAllControls () |
void | ProcessAnalogControls () |
void | ProcessDigitalControls () |
void | SetAudioBlockSize (size_t size) |
void | SetAudioSampleRate (SaiHandle::Config::SampleRate samplerate) |
void | StartAdc () |
void | StartAudio (AudioHandle::AudioCallback cb) |
void | StopAdc () |
void | StopAudio () |
~DaisyPatch () |
Detailed Description¶
Author:
Stephen Hensley
Date:
November 2019
Public Types Documentation¶
enum Ctrl¶
Enum of Ctrls to represent the four CV/Knob combos on the Patch
enum GateInput¶
Daisy patch gate inputs
Public Attributes Documentation¶
variable codec¶
Patch's second CODEC
variable controls¶
Array of controls
variable display¶
&
variable encoder¶
Encoder object
variable gate_input¶
Gate inputs
variable gate_output¶
&
variable midi¶
Handles midi
variable seed¶
Seed object
Public Functions Documentation¶
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 AudioSampleRate¶
Get sample rate
function ChangeAudioCallback¶
Switch callback functions
Parameters:
cb
New multichannel callback function.
function DaisyPatch¶
Constructor
function DelayMs¶
Wait some ms before going on.
Parameters:
del
Delay time in ms.
function DisplayControls¶
Control the display
function GetKnobValue¶
Get value for a particular control
Parameters:
k
Which control to get
function Init¶
Initializes the daisy seed, and patch hardware.
function ProcessAllControls¶
Process Analog and Digital Controls
function ProcessAnalogControls¶
Call at same rate as reading controls for good reads.
function ProcessDigitalControls¶
Process the digital controls
function SetAudioBlockSize¶
Audio Block size defaults to 48. Change it using this function before StartingAudio
Parameters:
size
Audio block size.
function SetAudioSampleRate¶
Set the sample rate for the audio
function StartAdc¶
Start analog to digital conversion.
function StartAudio¶
Starts the callback
Parameters:
cb
multichannel callback function
function StopAdc¶
Stops Transfering data from the ADC
function StopAudio¶
Stops the audio
function ~DaisyPatch¶
Destructor
The documentation for this class was generated from the following file external-docs/libDaisy/src/daisy_patch.h