sensorium / Mozzi

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

Port for PY32f002 - PY32F003 -PY32F030? #255

Open NoNamedCat opened 2 months ago

NoNamedCat commented 2 months ago

Dear MOZZI Team,

I hope this message finds all of you well. Firstly, I want to extend my appreciation for the fantastic work you've done with MOZZI – it's truly a remarkable library that has greatly enriched the world of microcontroller-based audio synthesis.

I'm reaching out to inquire about the possibility of porting MOZZI to a specific microcontroller, the pi32f003. As we aim to leverage MOZZI's capabilities for our project on this platform, having compatibility with the PY32f002 - PY32F003 -PY32F030 ($0.1 M0+ microcontroller) would be immensely beneficial.

Understanding the complexities involved in such endeavors, I want to express my willingness to contribute in any capacity possible – whether it be through testing, documentation, or even code contributions.

tfry-git commented 2 months ago

I had never heard of this MCU so far. Taking a quick glance, it looks pretty interesting, but it does not really seem to have made its way to Europe, so far, much less in the form of a tinker friend board (with USB). Also, the documentation I could find seems to be mostly in Chinese.

I would guess it should be possible to port, but that makes it kind of hard to start. Anyway, if you want to take a look, the main requisites will be:

By now there are quite a few examples to look at for porting to a new platform. If you want to take a look, I strongly suggest to use the devel/Mozzi2 branch. The first file to look at will be internal/MozziGuts_impl_template.hpp, which documents the basic steps involved. We'll be happy to give you a hand if/when questions arise.

NoNamedCat commented 2 months ago

Indeed, the pi32f003 is a relatively lesser-known MCU, especially in certain regions. However, it's gaining traction due to its intriguing features and capabilities.

Here are some resources that might be helpful:

Documentation: py32f003 MCU Documentation Arduino Port: Arduino-PY32 GitHub Repository Usage of Timers and PWM: Examples for TIM on PY32F0xx MCU

Additionally, your suggestion to use the devel/Mozzi2 branch and the guidance on where to start within the codebase are invaluable. I certainly refer to the provided resources and documentation as we delve into this project.

Your offer of assistance is greatly appreciated, and I may indeed reach out with questions as I progress in this task.