int16 table values don't work

53 views
Skip to first unread message

Tarcisio León Drusin

unread,
Mar 21, 2024, 11:22:59 PMMar 21
to Mozzi-users
Tried using the included table "
cos4096_int16.h" but I get the error:
Compilation error: no matching function for call to 'Oscil<4096, 32768>::Oscil(const int16_t [4096])'

I guess Oscil is not made for int values??
Is there any way to fix it?

Thanks!

Tarcisio León Drusin

unread,
Mar 21, 2024, 11:23:25 PMMar 21
to Mozzi-users
I'm trying to make a more precise LFO

Tarcisio León Drusin

unread,
Mar 23, 2024, 2:10:54 PMMar 23
to Mozzi-users

Oh ok, I think I get it. I need to use a int8 table and use the smooth or average function

Tarcisio León Drusin

unread,
Mar 24, 2024, 5:59:43 PMMar 24
to Mozzi-users
Well... it's not the same. Using fast LFOs will not work with smoothness

tomco...@live.fr

unread,
Mar 25, 2024, 5:23:49 AMMar 25
to Mozzi-users
Hello!
Sorry for the late reply!

Indeed, as you have figured out, mozzi does not support 16bits oscillators. There have been of work done in that direction but it is not as simple as it seems and rarely actually useful on MCU.

Smoothing a scaled up value is the way to go if you want to increase the resolution. I would probably try first with a LowPassFilter (or LowPassFilter16 depending on your MCU and code). Depending on the extreme values of the LFO, you might need to change the cutoff frequency of the lpf on the fly.
Do not hesitate to provide a snipset of code if you want more accurate suggestions!

Best,

Tarcisio León Drusin

unread,
Mar 25, 2024, 3:21:56 PMMar 25
to Mozzi-users
Oh ok I see, adjusting the smooth value according to the speed is a great idea!
Thanksss :)
Reply all
Reply to author
Forward
0 new messages