Skip to main content

Starting point

Background


Got my interest for electronics tweaking back after a long pause. In the past I have built a tube guitar amplifier, an analog synthesizer and lots of other more or less audio related things but haven't had much time or interest for soldering lately.

After some serious thinking I couldn't come up with anything new so decided to do some improvements to my old analog synth built back in the university days on last decade. As I have been writing embedded software for living for some time now I thought it would be a cool idea to add some digital awesomeness to it.

The synth. Looking very professional. Wood makes it sound more natural!
The device is based on the Mad Mouse DIY project. (2xoscillators, filter, amplifier and simple envelopes.) In addition to the analog part the wooden box contains a MIDI to CV board based on Marc Bareilles work. So basically it's a monophonic analog synth eating midi and outputting really pleasant old school synthesizer sounds.

Unfortunately the synth is constantly out of tune. I have added tempco resistors to the oscillators but the frequency still drifts a lot.

I also don't like the midi2cv part. I would like to tweak the software but it's ASM code for an obsolete microcontroller (PIC16f628). I don't see any point studying the platform or such a primitive language now that we have cheap 32bit ARM microcontrollers everywhere.

The Improvement Project


To overcome the issues I started planning to build a new midi2cv board. It would allow me to do more than just generate control voltages from the incoming midi events. I could add frequency compensation for the analog oscillators or even implement digital oscillators with polyphony and accurate tuning. Synth purists will hate me but who cares!

Lately I have spent lots of time programming C for ARM cortex M3/M4 processors. I'm also familiar with FreeRTOS operating system. STM32F4Discovery board seemed to provide an excellent platform for my project. It has good development tools available, JTAG debugger/flashing stuff on board, good quality audio output, USB ports and enough computing power for basic DSP tasks. All pins are nicely available so there's no need to solder anything to get things going.

So, STM32F4Discovery + FreeRTOS it is! I prefer developing in Linux so toolchain would be the good old GCC. I'm also a big fan of test driven development so I added CppUTest to the project.

Enter the MIOS!


Somebody once told me that in software development originality is a crime. For most of the stuff there's already a better implemented, properly tested solution available. An open source library, application note, a suitable project just waiting to be ported to your platform or someting similar. In most of the cases writing basic algorithms from scratch is just plain stupid. Just use the library and spend your time on your application!

So, after some googling I found out about the MIDIBox project. It seemed an interesting source of information about all things MIDI. After studying it a bit deeper things got almost frustrating. I figured out that they have their own operating system dedicated for midi related projects. Surprise surprise, it's based on FreeRTOS! Next thing I figured out was that they have also discovered the awesome discovery board! MIOS32 also included note stacks, midi parsing, midi over usb, software update over midi and application code for midi2cv, simple digital synthesizers and what not. So at least 80% of what I was planning to do with the software was actually already done. I was happy because it clearly indicated that my thoughts about platform selection and tools were making sense and I would be able to avoid lots of boring boilerplate work but at the same time I was slightly pissed off because it's nearly impossible nowadays to come up with anything original. There's always somebody who has already done it, most likely then times better and open source. Well, that's just the way it is in the Internet era.

After running the MIOS32 examples on my discovery board and studying the code I was quite impressed. As a software developer I have read lots and lots of code from various sources and this one was one of the easiest code bases to understand and start working with. Nice clean interfaces, plenty of examples, excellent build scripts. I wish all libraries were like this! CppUTest should be also easy to add for the parts I wanted to use TDD. Of course I might be slightly biased here as I'm already familiar with FreeRTOS and stm32 libraries. It definitely made studying MIOS32 easier. But it's good software anyway!

Next steps


Next I need to start putting all these pieces together to form something that makes my ugly wooden box sound more awesome. Time to heat up my soldering iron!

Comments

Popular posts from this blog

Waldorf Blofeld Encoder Fix

Waldorf Blofeld is amazing little digital synth with almost endless possibilities. Unfortunately the rotary encoders seem to start skipping and failing sooner or later. After couple of years of light use my unit started failing too and it became very annoying to use.  First Try I first tried to open one encoder and clean it from inside. It worked ok but these components aren't really meant to be opened and closed again and I never managed to put it back together properly. Encoder shaft was loose and wobbly and it would have failed again soon because the encoder wasn't tightly closed. Proper Fix Luckily it's possible to fix it properly as long as you know how to solder. Current price for the full set of encoders is less than 7 euros. I ordered new Bourns encoders from Mouser: 1 pcs of  https://www.mouser.fi/ProductDetail/652-PEC16-4220FN0024  for the main encoder, this one has detents so it "clicks" when you turn it. 6 pcs of  https://www.mouser.fi/ProductDetail/65

Sunday Soldering: Akai Rhythm Wolf Drum Machine modifications

Sunday Soldering: Akai Rhythm Wolf Drum Machine modifications Akai Rhythm wolf is a cheap analog drum machine. It has a nice old school lo-fi sound but unfortunately Akai left out some quite useful features from the standard setup. Today I decided to modify my unit to better suit my needs. Here are the added mods: Added a resistor to the outer legs of the 'Howl' pot to make the range more useful. By default it's pretty much a switch between clean and a completely destroyed signal. I used 33k. Probably even smaller value would do. Added 3.5mm individual output jacks for all drums. The PCB has nicely marked spots where the individual signals are available but it's actually easier to take them from the volume potentiometers directly. The middle leg gives the signal after the potentiometer so volume also affects the individual outputs. It might have been a better idea to take it before the pot so that it would be possible to silence the signal from the main

Uraltone Mixer and Spring Reverb (and some synth literature...)

DIY kits and literature Bjooks and DIY kits Every now and then I had seen pictures of the beautiful and super interesting Push Turn Move book by Kim Bjørn:  https://www.pushturnmove.com/ . Unfortunately it's not available as an eBook and the price has been too high for me because of the shipping costs. Some time ago Bjørn launched the Kickstarter campaign for his third book Pedal Crush . All the buzz it generated in social media led me once again to the Push Turn Move web page. This time I was delighted to find our local DIY music electronics store Uraltone in the reseller list. Of course I had to buy both of the already published "Bjooks" immediately and while at it I decided to buy some Uraltone eurorack DIY kits too. I have wanted a spring reverb since the days I got my first electric guitar and another mixer in my eurorack wouldn't harm. After a short bike ride to Uraltone I had my back bag full of reading and soldering! Support your local! Uralkit Spring