2022-01-19 04:32:40 -05:00
|
|
|
#ifndef _WAVETABLE_H
|
|
|
|
#define _WAVETABLE_H
|
|
|
|
#include "safeWriter.h"
|
|
|
|
|
2021-05-11 16:08:08 -04:00
|
|
|
struct DivWavetable {
|
2022-01-09 03:52:41 -05:00
|
|
|
int len, min, max;
|
2022-01-11 03:16:32 -05:00
|
|
|
int data[256];
|
2021-05-28 03:02:54 -04:00
|
|
|
|
2022-01-19 04:32:40 -05:00
|
|
|
void putWaveData(SafeWriter* w);
|
|
|
|
bool save(const char* path);
|
2021-05-28 03:02:54 -04:00
|
|
|
DivWavetable():
|
2022-01-09 03:52:41 -05:00
|
|
|
len(32),
|
|
|
|
min(0),
|
|
|
|
max(31) {
|
2022-01-11 03:16:32 -05:00
|
|
|
for (int i=0; i<256; i++) {
|
2021-12-27 15:21:38 -05:00
|
|
|
data[i]=i;
|
|
|
|
}
|
2021-05-28 03:02:54 -04:00
|
|
|
}
|
2021-05-11 16:08:08 -04:00
|
|
|
};
|
2022-01-19 04:32:40 -05:00
|
|
|
|
|
|
|
#endif
|