pschatzmann / arduino-stk

The Synthesis ToolKit in C++ (STK) Library for Arduino
Other
43 stars 3 forks source link

Some examples are broken? #8

Closed KontinuumLab closed 1 year ago

KontinuumLab commented 1 year ago

Hi. I was excited to find this library, as I make instruments, and I’m trying to move from Teensy based electronics to the much cheaper ESP32. However, I’ve run into a few problems. I’m completely self-taught in programming, and not an expert in C++, so please excuse me if my questions are stupid. I’m using a Wemos Lolin32 Lite connected to a PCM5102 DAC. For my projects I only need pretty basic functionality, and so I started with the “InstrumentToAudioToolsI2S” example and it works great. I was able to quickly adapt it to play many of the different instruments included with the STK, basically all the ones which are simulated. However, while trying to figure out how to play the instruments which depend on input waveforms I got basically nowhere. I’m trying to start with the basic “MemoryLoop” example, which you demonstrate in your blog, hoping to then combine it with an I2S output, but the raw example doesn’t compile.

Here’s the error message:

MemoryLoop:10:62: error: invalid conversion from 'stk::MemoryFS*' to 'long unsigned int' [-fpermissive]
 MemoryLoop input(new MemoryFS(sinewave_raw, sinewave_raw_len));
                                                            ^
In file included from /home/jeppe/Arduino/libraries/arduino-stk-master/examples/MemoryLoop/MemoryLoop.ino:2:0:
/home/jeppe/Arduino/libraries/arduino-stk-master/src/MemoryLoop.h:33:3: note:   initializing argument 1 of 'stk::MemoryLoop::MemoryLoop(long unsigned int)'
   MemoryLoop(unsigned long chunkSize=256);

Any idea what’s going on here?

Thanks, Jeppe

pschatzmann commented 1 year ago

I can't reproduce your error: the example is compiling just fine!