sensorium / Mozzi

sound synthesis library for Arduino
https://sensorium.github.io/Mozzi/
GNU Lesser General Public License v2.1
1.06k stars 185 forks source link

Sample example not working on UNO R4 #197

Open LightningStalker opened 1 year ago

LightningStalker commented 1 year ago

I tried compiling one of the sample sketches with the UNO R4 board selected and it seems to think that it is an STM32 pill board. It is looking for headers from the STM32 board files. The R4 is brand new so this is my first time running into something like this.

tomcombriat commented 1 year ago

Hello! Which version of Mozzi are you using? The version provided by the Arduino library manager does not support the Uno R4 yet. Only the GitHub version does (until we roll a new Release).

LightningStalker commented 1 year ago

Ok I was using the one from the librarly manager. I will try the latest build. I was also poking around and noticed a definition of BSP_MCU_GROUP_RA4M1 but I see you used ARDUINO_FSP to detect the core. I'm not sure what FSP and BSP are but we are living in an age of new things.

tomcombriat commented 1 year ago

If I remember correctly, FSP is an hardware abstraction layer. This port is fairly recent, do not hesitate to report here if it works correctly (or not), which will be one step further to make a new release so that the Arduino library manager has access to it!

LightningStalker commented 1 year ago

Ok thanks for clarification. So right now I'm running the sample playing example on a Minima and the output doesn't sound quite right. The burroughs sample (forgive me for not knowing what that is or what it's supposed to sound like) sounds like a little click and the raven sample is inaudible. It could be something to do with the sample rate but I'm not quite sure.

tomcombriat commented 1 year ago

Thanks!

I have to admit that I have never run this example, my focus being more on synthesis ones, so I do not have any idea how it should sound either. The easiest test, if you want to be sure, is to use a "well tested" board to compare (Arduino except giga and Uno R4, teensy, bluepill, esp...), if you have one.

sensorium commented 1 year ago

Hi, I just tested the example 08.Samples>Sample on a pro micro and it's working here.

Also, audio output from the examples, to let you know what they should be doing, is here: https://sensorium.github.io/Mozzi/examples/

LightningStalker commented 1 year ago

Thanks sensorium, it doesn't sound anything like that. All I'm getting from the Sample sketch is a clicking sound.

I just tried the FMsynth example and that is working perfectly so at least it confirms that I have a known working Minima board. It's probably down to bit rate and bit depth or some related thing.

tomcombriat commented 12 months ago

Hi, Okay, that's a good start already! Thanks for reporting this. I will have a look at it once I get back close to a computer (a couple of weeks probably). Maybe someone else will solve it in the meantime.

tomcombriat commented 11 months ago

Hi, Sorry for the delay, but I am finally back behind my breadboard. I tested the Sample sketch (and others in the same folder) on both R4 Minima and R4 Wifi and it works with no problem here.

As it seems that you are not having the expected output a few questions arise:

LightningStalker commented 11 months ago

In regards to the sample playing sketch that was not working,

All of this is the exact same configuration as for the FMsynth example which is working. Now I think there were some updates to the core which might make a difference. The IDE was also updated which in theory shouldn't make any difference. I will try running it again but not now it's late for me here.

tomcombriat commented 11 months ago

Okay, thanks! Indeed, as the FMSynth does work the circuit is very likely to be correct, you probably said it before but I overread it, sorry! Normally updates on the core should not impact as the development was initially done on a early release version of the core but who knows?

I am trying to finish this port now (which async adc) in order to push a new release. Hopefully this might bring more users of the R4 and we will get more feedback…