parent
dce289a5a0
commit
44ef49d267
3
src/engine/wavetable.cpp
Normal file
3
src/engine/wavetable.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "wavetable.h"
|
||||||
|
|
||||||
|
// ???
|
|
@ -1,7 +1,13 @@
|
||||||
|
#ifndef _WAVETABLE_H
|
||||||
|
#define _WAVETABLE_H
|
||||||
|
#include "safeWriter.h"
|
||||||
|
|
||||||
struct DivWavetable {
|
struct DivWavetable {
|
||||||
int len, min, max;
|
int len, min, max;
|
||||||
int data[256];
|
int data[256];
|
||||||
|
|
||||||
|
void putWaveData(SafeWriter* w);
|
||||||
|
bool save(const char* path);
|
||||||
DivWavetable():
|
DivWavetable():
|
||||||
len(32),
|
len(32),
|
||||||
min(0),
|
min(0),
|
||||||
|
@ -11,3 +17,5 @@ struct DivWavetable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -147,10 +147,10 @@ bool FurnaceGUI::decodeNote(const char* what, short& note, short& octave) {
|
||||||
if (strcmp(what,noteNames[i])==0) {
|
if (strcmp(what,noteNames[i])==0) {
|
||||||
if ((i%12)==0) {
|
if ((i%12)==0) {
|
||||||
note=12;
|
note=12;
|
||||||
octave=(i/12)-1;
|
octave=(unsigned char)((i/12)-6);
|
||||||
} else {
|
} else {
|
||||||
note=i%12;
|
note=i%12;
|
||||||
octave=i/12;
|
octave=(unsigned char)((i/12)-5);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue