grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.58k stars 322 forks source link

esp32 psram based buffer doesn't quite work #358

Open mikemoretti3 opened 5 years ago

mikemoretti3 commented 5 years ago

I have the TTGO T-Audio board and was going through the tutorial. I know the esp32 stuff is a work in progress. Things work great so far! All except the PSRAM stuff, which doesn't work very well. The sound ends up all choppy whenever the buffer is in PSRAM...

sletz commented 5 years ago
mikemoretti3 commented 5 years ago

same thing with higher block size and then at a certain point i get boot loops from the stack canary.

my current dsp code is: import("stdfaust.lib");

voice = nentry("voice", 0, 0, 4, 1); vowel = nentry("vowel", 0, 0, 4, 1); freq = nentry("freq",110,50,1000,0.1); process = pm.SFFormantModelFofCycle(voice, vowel, freq, 5);

but the problem seemed to happen even with your os.osc example.

sletz commented 5 years ago

Then it may be a memory speed access issue? Any info on that?

sletz commented 5 years ago
mikemoretti3 commented 5 years ago

not sure how to find out about memory speed. i'll mess around some more and see what i can figure out.

rmichon commented 5 years ago

Did you experience this following these instructions? https://faust.grame.fr/doc/tutorials/index.html#using-the-external-ram-of-the-esp32

marchingband commented 2 years ago

Internal SRAM is 32bit @ 240MHz. PSRAM is 4-bit @ 80MHz. PSRAM on ESP32 shares a cache with Flash, which needs to be flushed periodically to load more code. Effectively random access, and long reads suffer, and can be inconsistent. Newer revisions like S2 and S3 have octal SPI, and do not share a cache like that, S2 can map 10MB, S3 can map 1GB (apparently). I think ESP32S3 will be a powerful home for faust code.

sletz commented 2 years ago

We make have to rework the architecture file to use the -memoption, see https://faustdoc.grame.fr/manual/architectures/#custom-memory-manager