I want to learn how to program some STM chips, I learnt EE in university, which did include DSP stuff, but I subsequently went heavily down the analogue route (electric fields and RF). I build lots of analogue synth stuff, can write C (a little less experienced with c++) and know my way round 8 bit AVRs processors pretty thoroughly, but I appreciate stepping up to these complex 32 bit chips is a different game. I’d like to use a mutable module as a dev board and maybe one day build up to writing custom code for a module
right now, I’d like to start by just building a triangle or sine VCO, no frills, just a simple oscillator. Is this a realistic starting point? Are there resources for beginner projects on these chips?
any help or thoughts much appreciated
Clouds or maybe Rings would likely make the most sense if you wanted to use a Mutable module to get started with this, as they have the most feature rich/fastest processor and most flexible I/O of the currently* released and open sourced modules.
Tom Whitwell also wrote a pretty nice article about how one could get up and running using Clouds as an evaluation platform:
*Note this presumably won’t be the case in a few months, though this also could mean some people may be inclined to sell their Clouds to replace it with the latest and greatest at that point.
An alternative route is just getting started with an STM32 Discovery board, which would be a much cheaper option if you’re willing to sacrifice out of the box eurorack interoperability. Incidentally, Tom Erbe apparently uses these in a class he has taught on basic audio dsp, and has shared a few resources here: http://tre.ucsd.edu/wordpress/?cat=21 Haven’t really looked in to them myself, but one of the example projects is apparently some sort of stereo, 3 voice, waveform-selectable oscillator.
Another thing to consider is that you don’t necessarily need hardware to start writing audio processing code that could some day run on ARM! Olivier has stated a few times how he likes to work with new ideas in pd (which you could write your own externals for), or writing code that outputs WAV files, examples of which can be seen in his “test” make targets, maybe Elements or Rings if you’re looking to write floating point code? https://github.com/pichenettes/eurorack/tree/master/elements/test
VCVRack could be a great place to get started too, it really does have a nice, clean interface, and would get you thinking more in a real time/“modular” context. Plus the example plugin looks about exactly like what you were interested in starting with (single sine VCO): https://github.com/VCVRack/Template
You can learn how to write a Mac/Linux/PC C command program that writes a triangle or sine wave to a .wav file.
Then graduate to configuring a STM32F discovery board to read a voltage on an ADC input and output a voltage on its DAC output (or to an external SPI or I2S converter).
Then combine the two!
When you’re doing stuff like this and aren’t bothered about portability and re-usability it should be a matter of just writing to various addresses? (using appropriate protocols of course).
I’m not sure what this question relate to? What is to be accomplished by writing to various addresses?
Thanks for the advice! This forum is a breath of fresh air
I understand that there is a virtual setup for writing code for mutable modules, but since I am interested in learning the hard way, what kind of IDE / toolchain would you recommend for programming?
Also, what are the key differences between the way mutable modules are written and a synth like the goom synth (ive seen it mentioned on here before) which i remember reading was written in assembly. Is it at all feasible to write assembly for these chips?
Performance wise I believe you’ll get very close to assembly with (optimized) C
The stuff that is in the virtual setup for the mutable modules
GCC for ARM:
There is no obstacle to it, it’s just a bit silly.
Write in C/C++, look at the generated code, and if you spot inefficiencies, ask yourself what do you know and that the compiler doesn’t, and how to write your C/C++ code in such a way that this information will be known to the compiler. Or check if you haven’t done any premature optimizations.
Having compilers generating efficient ARM code from C/C++ is strategic for companies like Apple or Google. They have teams actively contributing to open source compilers.
thankyou. looking forward to getting started
Seems a bit strange to obsess with asm specially when learning to write a vco but here’s something any asm lover will find interesting.