mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-29 11:01:27 +00:00
parent
dce289a5a0
commit
44ef49d267
3 changed files with 13 additions and 2 deletions
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 {
|
||||
int len, min, max;
|
||||
int data[256];
|
||||
|
||||
void putWaveData(SafeWriter* w);
|
||||
bool save(const char* path);
|
||||
DivWavetable():
|
||||
len(32),
|
||||
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 ((i%12)==0) {
|
||||
note=12;
|
||||
octave=(i/12)-1;
|
||||
octave=(unsigned char)((i/12)-6);
|
||||
} else {
|
||||
note=i%12;
|
||||
octave=i/12;
|
||||
octave=(unsigned char)((i/12)-5);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue