libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy_legio.h
Go to the documentation of this file.
1#pragma once
2#include "daisy_seed.h"
3
4namespace daisy
5{
14{
15 public:
16 // ENUMS to help index 2 LEDs, 2 controls/CV inputs, 2 3-position switches
23
31
38
41
43 void Init(bool boost = false);
44
49 void DelayMs(size_t del);
50
55
60
66
72
74 void StopAudio();
75
78 void SetAudioBlockSize(size_t size);
79
82
87
91
94
96 void StartAdc();
97
99 void StopAdc();
100
103
106
108 inline void ProcessAllControls()
109 {
112 }
113
115 bool Gate();
116
118 void SetLed(size_t idx, float red, float green, float blue);
119
121 float GetKnobValue(int idx);
122
125
126 /* Call this once per main loop update to test the Legio Hardware
127 * Each input (1 gate in, 1 momentary in, 2 3-position switches, 3 controls) should change some or all of the output LEDs colors
128 **/
130
137
138 private:
139 void SetHidUpdateRates();
140};
141
142} // namespace daisy
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiom...
Definition ctrl.h:18
void(* AudioCallback)(InputBuffer in, OutputBuffer out, size_t size)
Definition audio.h:65
void(* InterleavingAudioCallback)(InterleavingInputBuffer in, InterleavingOutputBuffer out, size_t size)
Definition audio.h:83
Class that handles initializing all of the hardware specific to the Virt Iter Legio hardware....
Definition daisy_legio.h:14
LEGIO_LEDS
Definition daisy_legio.h:18
@ LED_LEFT
Definition daisy_legio.h:19
@ LED_RIGHT
Definition daisy_legio.h:20
@ LED_LAST
Definition daisy_legio.h:21
float GetKnobValue(int idx)
void ProcessDigitalControls()
LEGIO_CONTROLS
Definition daisy_legio.h:25
@ CONTROL_KNOB_BOTTOM
Definition daisy_legio.h:28
@ CONTROL_KNOB_TOP
Definition daisy_legio.h:27
@ CONTROL_PITCH
Definition daisy_legio.h:26
@ CONTROL_LAST
Definition daisy_legio.h:29
RgbLed leds[LED_LAST]
Definition daisy_legio.h:134
void SetLed(size_t idx, float red, float green, float blue)
Encoder encoder
Definition daisy_legio.h:132
Switch3 sw[SW_LAST]
Definition daisy_legio.h:136
void SetAudioBlockSize(size_t size)
void ChangeAudioCallback(AudioHandle::InterleavingAudioCallback cb)
void SetAudioSampleRate(SaiHandle::Config::SampleRate samplerate)
void Init(bool boost=false)
float AudioCallbackRate()
size_t AudioBlockSize()
float AudioSampleRate()
void ChangeAudioCallback(AudioHandle::AudioCallback cb)
void StartAudio(AudioHandle::InterleavingAudioCallback cb)
AnalogControl controls[CONTROL_LAST]
Definition daisy_legio.h:135
LEGIO_TOGGLE3
Definition daisy_legio.h:33
@ SW_LEFT
Definition daisy_legio.h:34
@ SW_RIGHT
Definition daisy_legio.h:35
@ SW_LAST
Definition daisy_legio.h:36
DaisySeed seed
Definition daisy_legio.h:131
~DaisyLegio()
Definition daisy_legio.h:40
DaisyLegio()
Definition daisy_legio.h:39
void DelayMs(size_t del)
void StartAudio(AudioHandle::AudioCallback cb)
void ProcessAnalogControls()
void ProcessAllControls()
Definition daisy_legio.h:108
GateIn gate
Definition daisy_legio.h:133
This is the higher-level interface for the Daisy board. All basic peripheral configuration/initiali...
Definition daisy_seed.h:19
Generic Class for handling Quadrature Encoders Inspired/influenced by Mutable Instruments (pichenet...
Definition encoder.h:18
Generic Class for handling gate inputs through GPIO.
Definition gatein.h:15
Definition rgb_led.h:15
Definition switch3.h:8
Hardware defines and helpers for daisy field platform.
Definition index.h:2
SampleRate
Definition sai.h:57