Corrected examples using notes as float

This commit is contained in:
pschatzmann 2024-03-07 16:55:41 +01:00
parent a0f190bf49
commit ac1a934a54
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();