mirror of
https://github.com/pschatzmann/arduino-audio-tools.git
synced 2024-09-21 18:37:28 +00:00
Corrected examples using notes as float
This commit is contained in:
parent
a0f190bf49
commit
ac1a934a54
@ -16,12 +16,12 @@ float noteAmplitude = 128;
|
||||
int group = 0;
|
||||
|
||||
void actionKeyOn(bool active, int pin, void* ptr){
|
||||
int note = *((int*)ptr);
|
||||
float note = *((float*)ptr);
|
||||
voicer.noteOn(note, noteAmplitude, group);
|
||||
}
|
||||
|
||||
void actionKeyOff(bool active, int pin, void* ptr){
|
||||
int note = *((int*)ptr);
|
||||
float note = *((float*)ptr);
|
||||
voicer.noteOff(note, noteAmplitude, group);
|
||||
}
|
||||
|
||||
|
@ -16,12 +16,12 @@ float noteAmplitude = 128;
|
||||
int group = 0;
|
||||
|
||||
void actionKeyOn(bool active, int pin, void* ptr){
|
||||
int note = *((int*)ptr);
|
||||
float note = *((float*)ptr);
|
||||
voicer.noteOn(note, noteAmplitude, group);
|
||||
}
|
||||
|
||||
void actionKeyOff(bool active, int pin, void* ptr){
|
||||
int note = *((int*)ptr);
|
||||
float note = *((float*)ptr);
|
||||
voicer.noteOff(note, noteAmplitude, group);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ uint64_t time_on;
|
||||
uint64_t time_off;
|
||||
|
||||
|
||||
void actionKeyOn(int note){
|
||||
void actionKeyOn(float note){
|
||||
Serial.println("KeyOn");
|
||||
sine.setFrequency(note);
|
||||
adsr.keyOn();
|
||||
|
Loading…
Reference in New Issue
Block a user