Clash with TMRpcm Library

29 views
Skip to first unread message

Petros Nousias

unread,
Dec 7, 2022, 12:20:06 PM12/7/22
to Mozzi-users
Hi,

I'm building a toy for my kids that among other things has  a theremin(using the Mozzi Library) and can play some wav sounds when keys are pressed(using the TMRpcm library). Both libraries are needed as neither can do both things(too many wav samples to fit in the sketch, need to have them on SD card).

Unfortunately when I compile the code I get the following error:

libraries/Mozzi-master/MozziGuts.cpp.o (symbol from plugin): In function `output_buffer':
(.text+0x0): multiple definition of `__vector_20'
libraries/TMRpcm/TMRpcm.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Olimexino-Nano.

I understand that both libraries use Timer1, hence the clash. Is there a way to bypass this problem? An important aspect is that the way the sketch is setup, it will be either the theremin or the wav samples, never together. 

Thanks!

Petros Nousias

unread,
Dec 8, 2022, 2:00:00 PM12/8/22
to Mozzi-users
I switched to a pro mini and had TMRpcm use timer2, no clashes there but dynamic memory gets to 91%, so it's a no go. Is there a way to go back to 32u4 and have Mozzi use Timer3?
Reply all
Reply to author
Forward
0 new messages