mirror of
https://github.com/erik-toth/audio-synth.git
synced 2025-12-06 17:20:01 +00:00
Software Update 3: Example 2 CV-Gates
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* Example Code Two
|
||||
*/
|
||||
#include "FIRMWARE_DEF.h"
|
||||
#include "FIRMWARE.h"
|
||||
|
||||
@@ -33,10 +36,20 @@ void loop()
|
||||
if(n > 0)
|
||||
{
|
||||
Serial.printf("\n\rCurrent queue length: %i", n);
|
||||
if(n == 1)
|
||||
{
|
||||
cv.setVoltage(0, keyboard.getQueue(0));
|
||||
cv.setVoltage(1, NOT_A_KEY);
|
||||
}
|
||||
else if(n >= 2)
|
||||
{
|
||||
cv.setVoltage(0, keyboard.getQueue(0));
|
||||
cv.setVoltage(1, keyboard.getQueue(1));
|
||||
}
|
||||
|
||||
for(int i = 0; (i < N_CV_GATES) && (i < n); i++)
|
||||
{
|
||||
Key k = keyboard.getQueue(i);
|
||||
cv.setVoltage(i, k);
|
||||
if(isNotKey(k)) Serial.printf("\n\rQueue position %i: NOT A KEY", i);
|
||||
else Serial.printf("\n\rQueue position %i: R%iC%i", i, k.row, k.col);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user