Kickstarter Project at 95% – Hardware Finished

The Kickstarter project has continued to climb although progress has slowed just a bit. There was a huge bump in the second week thanks to some press from Peter Kirn over at CDM. I expect that it’ll pass the goal sometime in the next week. So, I’m working furiously to prepare for the big launch. I’ve been logging serious time tying up loose ends and I’m very happy to report that I’ve finished the hardware. There will be no more tinkering, massaging, value changing, or anything of the sort. I did make some changes to the “Final” design, mostly in the name of reducing the noise floor and I think I’ve done it. I changed the final output stage from a transconductance amplifier to a regular old inverting amplifier and the result is awesome. As a result, I’ll probably be shooting the video over again in the next week to showcase the new clean sound and improved sonic capabilities. I’ll be putting up the new schematic shortly and I’m starting the final layout now. As an example of the cleaner sound, I recorded a new sample and a new filter audio in sample. I think both sound pretty sweet. Holla!

 
Filter Audio In

Tremolo Pad

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

Bandlimited Wavetable Synthesis

Sin Wavetable
I’ve discussed the phenomenon of aliasing in digital synthesis in several previous posts.  I described the phenomena, it’s source and what it sounds like.  There are many, many solutions to the problem of aliasing in digital synthesis.  A lot of them rely on performing sequences of calculations, multiplications and additions to implement various filtering methods or methods of synthesis which theoretically do not create aliasing, like additive synthesis. In my Rockit 8 Bit Synth, I don’t have the luxury of loads of extra cycles to throw at calculations, so I need something that can reduce the aliasing without requiring boatloads of clock cycles.  I settled on bandlimited wavetable synthesis.  With it, I have reduced the aliasing to a point that I can tolerate and probably further optimize.  Let’s discuss how it works.  Also, click through for source code for generating a wavetable and a sample wavetable from my synthesizer.

Continue reading

8 Bit Synth: Audio Sample

A while back, I lamented my struggles with aliasing.  Well, I resolved them and found inner peace with digital signal processing.  Slowly it’s becoming second nature.  I’ve got about 90% of the original functions working.  The only major omission is MIDI at this point.  That shouldn’t be too hard.  To celebrate, I made this lo-fi recording using the audio in jack on my laptop.  Lock up  your dog and check it out. It’s just one key held down so the filter envelope isn’t involved.  The filter, both oscillators with only three waveshapes at this point, and both lfos are running.  I’m changing the pitch with a knob.  It starts out hissy from the input, gets going with a simple sin wave, demonstrates some pitch, moves into other wave shapes and some beating oscillators, then takes off with filter and lfo modulation.

Listen to the 8 Bit Synth sample

8 Bit Synth: It’s Alive!

Oh, I feel like a proud parent. I’ve given birth to a square wave roaring lion. I got through troubleshooting the pcb, finding a few traces that weren’t routed and a few connections that were incorrect. I haven’t dug into the details just yet, but the function is there. Fine tuning will follow. This step brings me much much closer to the day when I can offer it to you as a fun new toy or a shiny new weapon in your arsenal. The filter definitely works, which is sweet and probably the most important thing to be sure works. Filters make or break synths. I think you’ll like the way it sounds. Once I get a bit further, I’m going to post some audio samples to give you an idea of what to expect. For now, back to work…

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

8 Bit Synth: Status Update

I’ve been working like mad on this synth. It might seem like waiting forever, but I promise I’m working as hard as possible to get this thing done. So, what’s the status now you ask?

I’ve got all the i/o expanders configured and working with all the buttons. That means all the control circuitry is working. Now, I’ve got to interface that with a lot of code that I’ve already written that gets the thing making noise. I’ve already got the oscillators running and the filter was working before. I added some circuitry to generate the different filter types and need to test that. The filter circuit and a bit of troubleshooting are what’s between me and this thing cranking some noise. Once it starts making noise, I can work on tuning how it sounds and the way it works.

I’ve got a list of about 25 things so far that I need to fix with the pcb. By the time I troubleshoot the filter, I’ll probably have 50 things to fix with the pcb. I’m going to change i/o expanders from the 8 bit version to the 16 bit version to save some parts and cost. It might also shrink the board a little, which would further save cost. I’ve made a number of errors of omission on the board as well that need to fixed. For some reason, Eagle didn’t show me all the connections and still doesn’t even after I’ve corrected the schematic.

So, I’ve got miles to go before I sleep, but I promise you: one day, I’ll be done and it will be certifiably awesome!

MCP23S08: 8 Bit I/O Expander: Part Two:
Extra Switch Inputs

In Part One about the MCP23S08, I discussed how to set up one of these i/o expanders as a bank of outputs to drive LEDs.  They can also be used as digital inputs.  They don’t do any good as analog inputs for things like pots.  You can use analog multiplexers for that.  As digital input expanders though, they make an excellent way to expand your systems switch capabilities.  I am using them for banks of tactile switches to step through options to control my synthesizer.  Follow the jump to see how I configure them…

Continue reading

Volatile and the GNU C Compiler

Twice now, I’ve been burned.  I’m using the GNU C Compiler with the AVR ATMEGA164PA for my current project, the 8 Bit Synth.  I need to use external interrupts to determine when a switch has been pressed.  When it has, the i/o expander drops its interrupt pin from high to low.  So, I set up the external interrupt routine to be falling edge-triggered.  I had to figure out how to get the i/o expander to trigger its pin when a button was pressed.  I knew that the i/o expander’s output interrupt pin was changing when I pressed a button.  I also knew that the microcontroller’s interrupt service routine was being triggered because I made a pin toggle when the routine ran.  I set a flag high in the service routine.  I configured an if statement in the main routine checking for the flag.  If the flag is set, I need to read the i/o expander’s interrupt latch register to determine which switch was pressed.  The microcontroller never sends the read command.  Not ever, ever.  I couldn’t figure out why.  Do you know?  Follow the jump for the answer to this riddle…

Continue reading

8 Bit Synth: Decimator in Blue

Blinding Blazing Blue!

Decimation in Blue

There you have it! I told you the I/O Expanders were working.  The machine has started to watch me back. All these LEDs won’t be on at the same time in the final design, but it’s fun to turn them all on to make a flashlight.  I’ll probably turn the brightness back down to 7 before I’m done.  This brightness is with only 8.5mA coursing through their die.  I’m used to the el-cheapo LEDs that can go from 15 to 100mA with no change in brightness.  Once those charge wells are full, that’s all you get.  Anyways, it doesn’t have to be blue.  Maybe there will be an option for customization with different colors.  Blue just looks sweet!