Fix: Wavetable not initializing with fundamental Waves
parent
6ba6d6b09e
commit
59d504adf0
|
|
@ -44,7 +44,7 @@ public:
|
|||
@param i index of target
|
||||
@return float_t value at index
|
||||
*/
|
||||
float_t getVal(uint16_t i) { return (*m_tp+i); }
|
||||
float_t getVal(uint16_t i) { return *(m_tp+i); }
|
||||
|
||||
/*! Sample data table setter
|
||||
@param table Sample data table
|
||||
|
|
|
|||
|
|
@ -41,11 +41,15 @@ int main()
|
|||
clog("Printing head of inverse saw table");
|
||||
isaw_wave.print_head();
|
||||
|
||||
// Create wave table of all fundamental Wave objects
|
||||
std::array<Wave, 5> fundies = {sin_wave, squ_wave, saw_wave, tri_wave, isaw_wave};
|
||||
Wavetable wt_01{"Fundamental Waves"};
|
||||
clog(wt_01.name());
|
||||
|
||||
// Add fundamental waves to wt_01
|
||||
std::array<Wave, 5> fundies = {sin_wave, squ_wave, saw_wave, tri_wave, isaw_wave};
|
||||
for (uint8_t i = 0; i < 5; i++){
|
||||
wt_01.setWave(i, fundies[i]);
|
||||
}
|
||||
|
||||
// Write sine wave table to file
|
||||
sin_wave.export_csv("data/sine.csv");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue