Synth Tutorial, Part 4: LFO

Fourth in the series of video tutorials on synthesizers, focusing on the Low Frequency Oscillator, what it does and why it’s cool.

Part 4: The LFO



Synth Tutorial, Part 3: Filtering

The third in the series of video tutorials. This one focuses on the link between the time and frequency domains of analog signals, and how that relates to the filter cut-off and resonance controls.

Part 3: Filtering

Synth Tutorial, Part 2: Envelope Generator

Second part in the video series on synth basics. This time, we look at the envelope generator, generally referred to as the EG, or ADSR (Attack, Decay, Sustain, Release) envelope.

Part 2: EG

Synth Tutorial, Part 1: Osc 1 & 2

I’ve been playing in my mind with the idea of making a synth video tutorial for months now. I pretty much had the format worked out, and was just waiting for an opportunity to shoot the videos themselves. I finally had that chance at the end of November, and I’ve been editing each of the sections since then. I’m not really happy with my narration – I pause too much and I did make a few mistakes that I had to correct in the captions, but I think that technically the content of the videos is ok. I’ll run each section on Mondays my time, one a week.

Part 1: An introduction to the series, and a demonstration of how the audio oscillators work.


I’m in the process of putting together a short series (maybe less than 10 parts) of video tutorials on synth music/electronic sound. In preparation for that, I want to talk about the gear that I already have, and give short demos of each of the major instruments.

Youtube video

Rockit Video Review

I’ve finally gotten around to recording a review of the Rockit 8-bit synth kit, to show off some of its audio capability.

Youtube link.

Controlling the Rockit from the Roland A300

I like the Roland A300-Pro keyboard, I do. But there are a few things that can be very frustrating with it. I like the feel of the keys and the fact that they’re velocity sensitive. The actual amount of sensitivity can be modified in software if desired. And I like having all the sliders, dials and buttons. When I was working on my Java synthesizer project, I made use of pretty much every control on the keyboard. I stopped short of adding a sequencer to the Java synth, but it would have been a simple matter to map the A300 “tape deck” buttons to make the sequencer controls. So, as a MIDI controller, the A300 is great. The price is even dropping now, so it’s down to about $200 USD from the original $320 list. And, it comes with Sonar X1 LE, giving you composition software and a small selection of instrument voices to play with out of the box (piano, guitar, etc.)

What I don’t like is the documentation. Stuff that you can kind of figure out on your own is well documented, but the things that you generally need to go to the manual for are missing. And if what you want to know is in some way related to the software you’re using (like delays from pressing a key to when the note plays), Roland refuses to get involved at all. The standard response is, contact the maker of the software for support.

Anyway, I have the Hackme Rockit 8-bit synthesizer fully up and running, and I wanted to see if it would play from the keyboard. Early versions of the Rockit didn’t work with some MIDI devices, and needed certain mods made to specific parts. Fortunately, there weren’t any issues with the A300 keyboard portion. I plugged the A300 MIDI Out port to the Rockit MIDI In with a MIDI cable I bought from a local music store. The Rockit doesn’t have a built-in speaker so I used headphones with a 1/4″ phono jack. Press a key on the A300, sound comes out of the Rockit. Cool! That was the entire point of getting and making it.

The next step was to map the A300 dials to the Rockit controls. The Rockit allows MIDI mapping to pretty much every parameter. And this is where things got dumb. The easiest way to assign MIDI code to the A300 is through the APro software that comes with the A300 CD-ROM. Here’s the first problem – APro treats control settings as “control maps”. When you click on the pulldown arrow, you’re able to select from control maps 1-19. However, you actually only have JUST ONE MAP. If you select map 1 and make a change to one of the controls, maps 2-19 get the same change. There’s nothing in the documentation that talks about this. Further, the A300’s default map is #0, which APro doesn’t let you access. So, if you assign MIDI messages to a bunch of controls in APro and transmit them to the A300, nothing seems to be happening correctly when you fiddle with the dials because you changed map 1, and the A300 keyboard is playing from map 0.

The thing to keep in mind, then, is that if you want multiple maps in the A300, you have to save the settings from APro to separate files. Say you want some dial assignments in map 1 for one song and other assignments in map 2 for another – save them on the PC as 2 different files: “rockit map 1” and “rockit map 2”. Then, open “rockit map 1” in APro, select “map 1” from the pulldown menu, and transmit the map to the A300. Close this file, open “rockit map 2” in APro, select “map 2” and transmit that. While the APro software app can’t figure out what’s going on, the A300 keyboard will at least store the maps individually internally.

(The PRM Mute left and right buttons, and the Value/Enter spinner.)

The drawback, though, is that when you turn the A300 off and back on again, it defaults to map 0. Every time you turn it on, you have to hit the PRM left arrow button twice to get the LCD panel to display “Control Map”, use the Value control to select map 1 or 2, and then press Value as an Enter key. Kludgy. I just wish the documentation mentioned all this.

Assigning MIDI messages is simple once you get to this point.

Just open APro on your PC.

(Yeah, I know the menus are in Japanese. I have Japanese windows. Just pretend that the menu reads: “File”, “Edit”, “Options”, “Help”. And that the current pulldown says “MIDI Device”, “Display Assigned Messages” and “Display Keyboard Panel”.)

Select Options -> MIDI Device from the menu bar.

Set Input Port to A-Pro 2, and Output Port to A-Pro, and click Enter.

Select Options -> Display Assigned Messages.

Click on the control you want to set (R1-R9 for the dials, S1-S9 for the sliders).

This will pop up the MIDI message edit window. The name you give the control will appear on the A300 LCD when that control is changed when you play the keyboard. For the Rockit, you want the “Assign Message” to be a “Channel Message”, and the “Type” to be “Control Change”. By default, the Rockit is on MIDI channel 1, but you can change that if you like. Next, specify the control number for the Rockit parameter you want to change. In the example, OSC1 Waveform is control message 5. Leave the min and max values as-is. “Output Port” is only relevant when the keyboard is connected to the PC through the USB cable, and is unrelated to what I’m doing with the Rockit. I don’t yet know what “Virtual Center Click” does, but I don’t care right now, either. Click on Ok, and repeat for the other controls.

When you’re done, use “File->Save” (or “Save-As”) to save the settings to a file. Finally, select the desired control map number from the pulldown menu and then click on Transmit. This will send your MIDI assignments to the keyboard to be stored for that map number.

As mentioned above, each time you turn on the keyboard, you’ll need to use PRM Mute left arrow twice to get the LCD screen to display “Control Map” to select the one you want. And now you’re done.

Note that you can have the A300-Pro plugged into the PC via the USB port, AND to the Rockit via the MIDI cable at the same time. However, the keyboard will be disabled. To play the keyboard to test your MIDI message assignments, you have to unplug the USB cable.

I have found that not all of the controls work right with the Rockit. From the Rockit, you have two LFOs, and you can only control one at a time. You have to select the LFO, and the LFO destination, before the LFO Rate, LFO Amount and LFO Shape controls can do their magic on the parameter you want (Pitch, Filter Frequency, Oscillator Amplitude, etc.) However, LFO Rate, LFO Amount and LFO Shape don’t do anything via MIDI, and assigning LFO Select to an A300-Pro button didn’t seem to be working, either. This is where I really wish I had access to the Rockit “open source” code so I could verify how it handles MIDI messages. Still waiting for Matt to get back to me on that. Anyway… The A300 has 18 controls that vary from 0 to 127, and that’s not enough to allow for individually mapping both rate, amount and shape for LFO1 AND LFO2 within one map. So, this is where I decide to have two map files.

Bottom line is that I do finally have MIDI messages running from the A300-Pro to the Rockit. I know the concept works. The sound from the headphones is a bit weak, so that justifies writing up another blog entry.

RockIt, part 2

In part 1, I mentioned that the LEDs were turning on and off really slowly, and that I was missing the two side panels for the case. I contacted the designer, and he replied back that he may have set a bit wrong when programming the Arduino EPROM so that it would run on the internal clock rather than from the external 19.66 MHz crystal. After about a week, I received the side panels and a new Arduino. My first thought was that I could desolder the current microcontroller and simply pull it out of the board, but there were two problems with that. First, the pin holes are too narrow and the solder sucker couldn’t get all the solder to set the pin free from the hole. Second, a couple of the pin paths, specifically the ones for the crystal connections, are wide enough to act as heat sinks, so the solder wasn’t melting enough for the sucker to have any effect at all. Instead, I had to resort to cutting the pins off the old chip and pulling them out of the holes one by one with a needle-nose pliers. Definitely sub-optimal, and it still took close to an hour for all 40 pins.

(The Rockit, fully boxed up.)

After replacing the Arduino, I still had the same problem with the kit running too slow. Thinking that the crystal was bad, I decided to first make sure that there wasn’t a hidden short or a broken path by ohming out the board around the crystal. That’s when I found the actual cause – three capacitors, C1, C2 and C3, are in a tight little cluster and the silk screening identifying them is very confusing. The marking for C2 is next to C3, and the marking for C3 is almost half an inch away. C1 and C2 are 22pf, used for balancing the crystal. C3 is 0.1uf and is connected to the Arduino reset pin, for initialization on power up. Since I didn’t have an ohm meter when I bought the Rockit, I had to guess which holes were for C2 and which for C3, and I had a 50% chance of getting them wrong. So, the crystal wasn’t running, and the Arduino wasn’t resetting on power-on. That was easy to fix, and the Rockit is now running more or less correctly. I say “more or less”, because there are so many parts that even if there is a problem with one or two of them, it may not become apparent right away.

(Side panel assembly system.)

As mentioned in part 1, the first version of the kit had a design flaw that prevented MIDI from working correctly with some instruments. The designer included a replacement chip with the kit just in case, but the original chip works fine with the Roland A-300 Pro keyboard. The Rockit has 3 operating modes: normal, drone and loop – selectable with the Drone/Loop button. In normal mode, the box requires a MIDI-capable keyboard to be plugged in, and all of the Rockit controls work as marked on the cover. In drone mode, you can still play from the keyboard, but the box generates its own Gate signal and the ADSR envelop controls get remapped. In loop mode, the keyboard is disabled, and there’s a 16-step loop that’s applied to all of the controls on the box; movement of any control is recorded and played back as part of the loop. The ADSR controls are then remapped to specify the loop rate.

(Close-up of the box assembly hardware. I’m tempted to epoxy the top cover down to the side panels, and then figure out a way to take the cover off as all one unit.)

Even with all of the pots on the box top panel, there are more controllable parameters than controls. There are 2 LFOs (Low Frequency Oscillators) that can be used to vary OSC1 or OSC2 pitch, the LFO cutoff frequency, Resonance, etc. Only 1 LFO is selectable at a time, and each LFO can only be sent to one destination out of 6 available. So, using the box to create the instrument voices is a bit restricted. On the other hand, you can save all of the parameter settings to 1 of 16 memory slots and restore them later, which is useful. But, the best part is that all of the Rockit parameters are accessible via MIDI CC messages, and the A-300 keyboard has 20 programmable sliders and dials. So, the Rockit and the A-300 should be a pretty good match (I need more time to figure out just how good the match is).

(Back panel.)

The Rockit is marketed as being open-source, for both the hardware and software. I’ve asked the designer for instructions on how to update the software, but haven’t gotten a complete reply back yet. He’d mentioned that several people have asked about hacking the software before, but he hadn’t heard back on what, if any, changes had been made to the code. Personally, I’d like to see an Arpeggiator mode added to drone/loop and available via the A-300, and a change to OSC1-OSC2 offset. Right now, OSC2 is tied to OSC1, and the OSC2 pitch is varied in integer note steps. If possible, I’d rather set OSC2 as a percentage of OSC1, which provides a lot more noise for the VCF (voltage-controlled filter) to work with, as well as adding more beat frequencies.


Rockit 8-Bit

While messing around on kickstarter one day, I decided to do a search on synth projects, and got a hit on Hackme’s Rockit 8-Bit kit. The bidding closed on the project in 2011, so I was curious whether it ever went forward as a finished product. With a bit of digging, I found the Hackme site, which has several open source projects. Along with the Rockit, there’s a stripped down version called the Sprockit. The designer, Matt, wrote on the site that there’s only 4 or 5 of the Rockit kits left and when they’re gone, that’s it – he’s moving on to another synth project.

The Rockit has analog oscillators, but all of the voltage controllers are digital and accessible through MIDI calls. Implying that I might be able to configure the Roland A-300 Pro to do whatever I want with it. The kit is open source, and based on the Arduino. Since I like working with the Japanino, it just keeps looking better and better. Plus, the price is about $200, including the case, and it promises to be much more flexible than the PAiA Fatman at 75% of the cost. Finally, my family was going to get it for me as a birthday present…

Building it is pretty much a breeze, compared to the Fatman. I do have some complaints, though. There’s two versions of the kit; the first version had the wrong-shaped holes for the DC power jack, and the MIDI circuit didn’t work with some devices. The second version updated the design, and resulted in some of the resistor values changing. Unfortunately, I received the older version with the wrong resistors, and had to go to the parts shop near my apartment to get the right ones. The kit was also missing 2 other resistors and the side panels for the case. Assembling the circuit board took about 6 hours, which included the time for me to go to the parts shop, and to triple-check my soldering work. I did screw up at one point, though – I wasn’t paying attention and didn’t realize that the MIDI jacks are supposed to be mounted on the bottom of the board. I had to de-solder both of those and put them in correctly. After that, I turned on power to the kit and nothing happened. No lights, nothing. After fiddling with the board and unplugging and plugging it in again, the LEDs turned on but flashed on and off REALLY slowly. I mentioned this to Matt, and he replied that he may have programmed the Arduino to use the internal clock rather than the external crystal. So now, I’m waiting for a new Arduino chip along with the missing case side panels.

The next step will be to unsolder the current Arduino, solder in the new one, and hope I don’t break anything. The kit does have a “drone” mode, which allows the oscillators to free-run independent of the microcontroller. I have to hold the front panel buttons down for several seconds for the kit to recognize them, but drone does work as-is, and it sounds pretty cool. I’m looking forward to getting the Rockit 100% functional and then plugging in the MIDI keyboard to see what I can get out of it.