04:Subharmonic Inspiration - TheTechnobear/MusicalHacks GitHub Wiki

Inspiration

For this episode I wanted to take the step sequencer concept further and was inspired by the Moog Subharmonicon.

Also in this episode, I wanted to focus a little more on the coding side, so used Bela. In particular I use the Bela Pepper, but it would also work on a standard Bela (non-eurorack). You also could use previous episode content, and get something working on a MCU (e.g. Arduino)

Code

you will find the code here:

https://github.com/TheTechnobear/MusicalHacks/tree/master/Ep4-SubharmoicInspiration

copy it into bela as a project called 'subharm'

Bela

https://bela.io/

Bela - https://shop.bela.io/products/bela-starter-kit should work 'as is'... but of course you need to ensure you have buttons and leds on the correct digital pins. (or alter the code)

Bela Mini could also work, but you would have no CV output.

Bela Pepper - https://shop.bela.io/products/pepper

(as featured in this episode)

Bela Salt - https://shop.bela.io/products/salt This would require minor alterations, including digital pin assignment. also the LED UI would need to be reconsidered, as it only has 4 (bi colour) leds. However, the end results would actually be better for CV, since the CV IO has a wider range!.

Limitations

Calibration

One thing not discussed in the video is CV calibration... the outputs on bela are not calibrated in any way, this will mean you'll get slight cv offsets, which can be a bit of a pain with v/oct. Its possible to determine a decent calibration scaling for your bela with a precise voltmeter, this you could apply this.

Notes on code

It should be noted, I tried to make the code readable, rather than how I'd personally code this. In particular, usually it would use classes and abstractions, however that requires more knowledge of C++, so I avoided. Similarly, I did not try to optimise the code at all.

The UI was a bit of a squeeze on this project, and honestly its not probably what I will stay with. the main issue I face with the code (as of publishing this) is that really it needs some kind of 'debounce' on the buttons. so I was finding sometimes when I wanted to shift oscillators it would instead switch mode, as it was not really detect the hold properly.

( simplest solution is to require that the buttons are pressed for a few milliseconds to be considered a 'press')

also I did not implement 'hook' logic, this is where, when you switch modes , you don't take the immediate value, rather you way till the pots are moved to the old value. this would make the module much more useable... and I wish Id put it it place. (and probably will very soon) However, I did not because it complicates the code quite a bit, so for clarity I kept it simple.

DSP

I would highly recommend Bela's recent DSP tutorial series. Its fantastic, even if you are not using Bela !!!

https://www.youtube.com/watch?v=aVLRUyPBBJk&list=PLCrgFeG6pwQmdbB6l3ehC8oBBZbatVoz3