Strawberry Synth v0.3

I reworked the synth, HERE is the new version.

————————————————————————

When I got my Raspberry Pi mini computer, one of the first things I did was connect it to a midi keyboard to test the new midi support.

It didn’t take long until I realised that building a software synth wasn’t going to be easy.

The code HERE is my progress so far.

It is made to work with an APCkey 25 from Akai but can easily be adapted to any midi controller.

Here are some of the functionalities and problems on the way. Some of this seems obvious now that I made it work, but for most of the time I ws stumbling from one problem to the next.

 

Key press and release:

In the example from the help window, the :piano synth is used. I wanted this to be a synthesizer, not an electric piano, with :saw and :square synths. The problem: You have to look for key releases, so that the sound keeps playing as long as you hold the key down and then stops. That’s why there is a nested loop in line 55.

 

Key change, slide and killing synths:

The loop that looks for key releases only kills the synth when the original key is released. This means that if you press and release another key by accident it doesn’t kill the synth. The problem: When playing fast, I frequently hit the next key before releasing the first key, so it didn’t trigger a new sound. To fix this, I introduced a slide option, that slides the note to the new key. It doesn’t follow the fine detune, this will be fixed in v0.4.

 

Real time and the Sonic Pi internal latency:

By default, Sonic Pi triggers synths, samples and control calls with a 0.5s latency. This is to guarantee that the timing is on the spot. However, this is not useful for playing a physical instrument. The example says that use_real_time should remove that latency, but it doesn’t seem to do anything. If you know anything about this please let me know.

 

Presets:

Pretty straightforward. Pressing the assigned button on the APCkey sets the synthesis parameters to predefined values and switches the lights on and off.

 

Plans for v0.4 and later:

My main focus right now is a retrigger option, so that instead of sliding to the next note the synth is retriggered. This is needed for the :piano and :pluck synths.

A sampler. The APCkey 25 has a 5×8 pad matrix that I want to use. I don’t know if I want the pads to trigger individual samples or if it’s going to be a sequencer. I have prototype code for both.

More voices. v0.3 has three voices, v0.4 will have 8 or 12, for much bigger sound and more variability. There will also be an option to not use some of the voices for reduced processor load.

 

Version 0.4 will be released as soon as I figure out the retrigger functionality and the additional voices are implemented.

3 thoughts on “Strawberry Synth v0.3

Leave a comment