Using a Raspberry Pi to Add MIDI to a CV Synthesizer
schollz.com
schollz.com
For personal projects, it's not often the case that you need to get BOM cost as low as possible and disregard other factors (like debuggability, or having enough DSP available to run the FFT for tuning calibration (though I suspect they'd be better off with autocorrelation...), or room for future expansion (adding multiple channels, adding a sequencer, adding control over the filter, implementing envelopes, running the Pi's audio output through the filter too...)
Plus, they might have had the Pi before, and still have it afterwards. That's the nice thing about general-purpose computers- you can put a whole bunch of different software on them, and then switching between uses just involves moving the board itself and plugging cables in.
However if you dont have floating point arithmetic like many microcontrollers, fixed-point DSP for FFT or autocorrelation presents its own set of challenges, which can be either a good thing or a bad thing.
In contrast, that link you mentioned has over 15 parts instead of 3 parts, and it needs to be on a PCB/breadboard. The total cost is cheaper (probably $10 if your thrifty) but requires way more effort IMO than using a Pi.
Crucially, I've never seen any MIDI to CV that provides a method for automatic tuning which is very time consuming. Using a Pi provides that easily and automatically with sox.
Then again, if I missed it and you can do those FFTs with this project, that's pretty cool.
For this I used the simplest approach I could think of - using sox [1] with its builtin power spectrum analyzer. It works pretty well as the resulting tuning is fantastic. It would be nice to a faster pitch detector - could speed up tuning from ~15 seconds to maybe just a few seconds.
I play piano and I don't find the latency a problem, which means its probably < 100 ms. The midi stuff is actually just bindings to rtmidi (in C++).
The most annoying thing is "jitter" which I calculated to be 15-20 ms, which is fine, but sometimes there are spikes of 50 -150 ms which are annoying.
https://htmlgames.github.io/htmlgames.github.io/htmlgames/PF...
So I just held the notes in an array and used that for note on/off information instead.
I found there's other few programming-friendly simple MIDI sequencers [1] but generally none of them were simple enough for me. I'm pretty happy with the simplicity and power behind miti and use it quite a bit for my own purposes. Feel free to ping me if you have issues with it or ideas to improve it!