Synth DIY : Software for Generating ADSR Envelopes

I’ve spent a fair amount of time detailing the hardware that Rockit uses for it’s Voltage-Controlled Amplifier. It’s a transconductance amplifier-based design and you can read about it here. I haven’t, however, discussed the software behind implementing the envelope generator. It ends up being more useful than just controlling amplitude. The same envelope generator code works for the filter envelope too. I didn’t end up using exactly the same code, but it could be made entirely modular, taking some basic inputs like timing and parameter data and returning an appropriate value for an envelope. Let’s just focus on how to code an ADSR envelope for now. If you’d like to get the source code for Rockit, please download it from Rockit’s Sourceforge Page.

Continue reading

Rockit 8 Bit Synth: The Final Stretch

Rockit Silkscreen - Parts and Locations

I am so excited to announce that I am almost done. The hardware has been finalized. The circuit and all the values are a wrap. Everything is working: MIDI, filters, synthesis, LFOs, envelopes, Voltage-Controlled Amplifier, LEDs, buttons, patch save and recall… I’ve got the first pass of the pcb finished as shown in the silkscreen image above. I’ve gotten to the final knob locations and am pretty happy with that.  It’s been a journey but the final design should be on sale within the next couple months.  I’m looking at options for selling it from licensing it to doing it myself.  I might put up a project on Kickstarter. Stay tuned on that front. 

Things I still have to get done are mostly software tasks:  finalize pitch bend implementation, test filter audio in, flush out and finalize synthesis waveshapes, finish lfo waveshapes, and a few other small things.  Sometime soon after I check every connection on the pcb and optimize the layout, I’ll order some sample pcbs and build one up. In the meantime, I’ll be finishing the software. I’ve got some ideas for making more complex waveshapes, morphing sounds and such. At that point it’ll be done.  I’ll have to do some documentation, but I’ve been doing a lot of that through this blog.  So, expect the release soon. I can’t wait.

DIY Voltage-Controlled Amplifier

The purpose of the voltage controlled amplifier is to make an amplitude envelope like this.

When I started the Rockit 8 Bit Synth design, I thought that I could implement a voltage-controlled amplifier, VCA, in 8 Bit land, saving precious hardware and everything would be easy. Well, as with many of the other things that I learned in the process of developing this project, reality would not be so kind. In this post, I’ll explain why that doesn’t work and then fill you in on how you can implement a functional Voltage-Controlled Amplifier using some fairly simple hardware.
Continue reading

Embedded Software: #ifndef #define my_way

So, I’m deep in embedded software, or as people in the know call it, firmware.  A lot of what I’m dealing with is rookie nonsense.  Now, I’m probably more of a journeyman coder at this point, but good high quality code doesn’t just spring from good intention and effort.  There are a great many rules and tricks of the trade that can only really be learned from someone else.  I, being self-taught, have learned much of what I now know by blindly stumbling through the wilderness until through sheer effort, I find the way out of the woods of impenetrable error messages.  I’m going to be sharing over the course of many posts, some of the rules and best practices that I discover along my journey. Hopefully, they’ll shorten the duration of your meanderings.  Follow the jump for a discussion of the use of the preprocessor directive, #ifndef.

Continue reading