NanoStudio wobble bass tutorial

NanoStudio is an awesome music app for iPhone &c. It’s really powerful yet simple to use, considering all that power. However, there is somewhat of a learning curve when trying to get your head around the Eden synth.

That’s why I decided to make a small tutorial that explains how to make a wobble bass. It’s based on this forum post by blip but will hopefully be a little more verbose and explanatory. As an Electrical Engineer I’m pretty fascinated by all kinds of signals and understand the theory, but this whole music making thing is new to me. NanoStudio has been very fun to play with though. It’s a great app! Remember, I’m just a newbie, too!

Before we start, you need to read the manual. Really. Do it now. At least the sections about the Eden synth. You may also want to keep the glossary handy.

Great. Pick any synth track and select a free project preset to write to. Name it something fitting, like “Wobble Bass.” You may want to periodically write the preset to the slot in case you get a call or something and lose your progress. I hear that will be a little more elegant in the future.

Save the instrument in one of the Project presets

To begin, scroll to the patchbay and unhook everything by setting all the destinations to Off. If you scroll back up to the XY pads, you’ll see the axes and knob labelled unused, together with all the LFOs and aux envelope further down. No worries though, we’ll hook some stuff back up in a bit.

Patchbay all cleared out

Scroll to the oscillator section. Here’s where all the sounds begin. You have two at your disposal that you can play with. Cycle through the waveforms and play a few notes to get a feel of what’s there and how it sounds.

For our wobble bass, we’ll use the SawSqr waveform in OscA. You can play with mixing something else into it from OscB, but I didn’t find anything that I liked, so I set it to off. Adjust the transpose to your liking, it just changes the pitch up or down in semitones. Mine’s around -10 or so for some nice bass. A whole octave would be -12.

Oscillators produce the sound

Next, we will play with the Filter and one of the XY pads to get familiar with what it does. To do that, go to the patchbay and hook up the XY pad 1 axes to Filter, Cutoff and Q, respectively, with amount to 100.

Filter parameters controlled by XY Pad 1

Back to the filter, set it to low pass (LP), 12dB, not inverted. Set cutoff and Q to 0, since we will be controlling it with the pad. If we had set the patchbay amount to -100, we’d have to set both cutoff and Q to their max values. You get the idea here, it’s additive. Next, set the envelope Amount to 0. The envelope controls the filter behavior, more specifically which frequencies are filtered, but we want nothing fancy. It works on top of the Cutoff knob, like the pads. For kicks, try setting that to the max and play with the Amount while playing a note and you won’t hear much happening, because max cutoff plus any Amount is still max cutoff.

Filter panel

Alright, now the filter is good to go. Go to the pads and play a note. While playing, slide the filter cutoff in the pad up and down (or left and right, depending on what axis you put the cutoff). It wobbles! That’s great…but a little tedious. We will fix that though.

XY Pad 1 controlling the Filter

Play around with the pad a bit to get a feel of everything and we will move on. Move the dot back into the bottom left corner before you continue, or it may sound funny when we get towards the end.

Next, let’s set Polyphony to 1-Mono. You can change it, but I like the single sound. Make sure to adjust reverb and delay when we’ve got the final sound to tweak your bass a bit; it doesn’t make much sense to do that right now. The other setting on this panel is the amp envelope. It controls the volume (AMPlitude) of the note over time. Gradual Attack means it gets louder over time, sharp Attack means it’s right there when you hit the key. Sustain/Release set how long after you release the key the note echoes around. I like my bass a little shorter, so I set Release down to 0.30. One more setting to play with and make your own!

Amp envelope and polyphony

Finally, the key to our tutorial! Wobbling the bass manually is lame, so let’s have the synth do it for us. As we know by now, we need to move the filter cutoff back and forth at some rate that fits the song to make the wobble. Meet the LFO, low frequency oscillator! That’s exactly what it does: move something back and forth at some frequency. So go to the patchbay, hook up LFO1 to Filter, Cutoff, 100, and go back to the LFO panel.

LFO1 hooked up to Filter Cutoff

Set waveform to SawUp, which I think sounds the best. Sync rate with Key or Beat, up to you. Now dial up the amount and rate to hear the LFO wobble the bass for you! (If you didn’t move the XY pad dot back into the bottom left corner earlier, it may be all high pitched and funny sounding, if it wobbles at all. That’s because both LFO1 and the pad are set to manipulate the Filter Cutoff. So fix that if you have trouble here.)

LFO1 setup for testing wobble

We can one-up that though. It would be useful to change the wobble rate live, so let’s use the Knob or, in this case, the other XY pad. To the patchbay! We already know how to do this: For the XYPad 2 axes, destination LFO1, Rate and Amount, respectively, and Amount 100.

Hook up LFO1 parameters to XY Pad 2

Remember to dial the two knobs in LFO1 back to 0 for that.

When using the XY Pad, set LFO1 parameters to 0

Now the first pad controls the filter, and the second the wobble rate and amount. Not bad!

Control the wobble with XY Pad 2

Hope you learned a little bit about how the Eden synth works and lost your fear of all the settings. It’s really pretty straightforward when you play with it a bit. Now you should be able to make all kinds of sweet sounds and take this to the next level. Rock on!

Bonus: instead of using the first XY pad to control the filter, make some cool effects with the Chronos delay panel!

Tetris in HC12 assembly

It’s been a while since we actually completed this project, but here’s the video finally. Basic HC12 dev board, PS2 controller on the SPI bus and the LCD display on two of the I/O ports.

All the code is on GitHub for your reusing pleasure: http://github.com/ckoehler/HC12-Tetris

Note that you need the exact hardware to reproduce it, especially the display and an HC12. Maybe I will get around looking up the model # of the LCD display someday.

Audio Amplifier

Just wanted to get this out there before I forget about it, so I won’t have the schematics up.

This is your basic audio amplifier without any filters or fancy stuff. The little breadboard on the right has the pre-amp stage, a simple inverting op-amp amplifier with a gain of 4 V/V or so to get the voltage up. The one on the big breadboard on the left is the Class AB stage amp that provides the current to drive the speakers.

All that is plugged into my iPhone on one side and some computer speakers (without internal amplifier, that would be cheating) on the other. David Crowder Band – Wholly Yours is playing! You can see the waveform on the scope in the background, too!

Here’s the video, enjoy!

Matlab Goodness for System Analysis

This is mostly for my own reference, but I hope someone else will benefit from it. It’s mainly to play with transfer functions.

First, generate the transfer function:

% numerator coefficients for s^2 + 2s + 4
num = [1 2 4]
% denominator coefficients for s + 6
den = [ 1 6 ]
% build the transfer function
H = tf(num, den)
% now we can do fun stuff like get a bode plot
bode(H)
% or plot it over a range of frequencies, 100 to 200 radians/s
bode(H,{100,200})
% or we could get the gain and phase shift for a certain frequency, 4pi here
[gain, phase] = bode(H, 4pi)
% how about zeroes and poles? Okay...
tzero(H)
poles(H)
To add some more stuff, the transfer function can also be generated when you have the factored form of it to begin with:
% if the denominator looks like (s-1)(s-2)(s-3)
poles = [1 2 3]
% same for zeros: (s+1)(s+2)(s+3)
zeros = [-1 -2 -3]
% and finally, gain K
k = 1
% now we can get the system like so:
H = zpk(zeros, poles, k)
I may add more at a later point. Not too fancy stuff here, but pretty helpful to what I needed done.

Proximity sensor

First of all the video. Music by lostprophets. That’s what I was listening to at the time and thought I’d leave it to make it more interesting.

Schematics and explanation below.

Schematics (click to enlarge):

proximity sensor schematics

The IR LED acts just like any other LED. It’s rated for 100mA continuous current, but to play it safe I only provide about 80mA at approximately 6V. The IR photo transistor acts like a simple transistor with the base current being determined by the IR receiver part. This way, when no IR light is detected, the transistor is in shutoff mode, i.e. it acts like an open, so no current flows and the voltage at node A = Vcc. As more IR light is detected, the transistor changes to active and then saturation mode, eventually acting like a short, which makes the voltage at node A = 0V. So the voltage range, depending on the amount of IR detected, is 6V – 0V. The voltage change is just about linear.

The output voltage is then fed into four op amps that act as comparators. That means the voltage on the positive and negative pins is compared. When the voltage on the + side is larger than on the – side, the output bounces to the positive rail, Vcc. Otherwise it bounces to the negative rail, in this case 0V or ground. The + voltage is regulated using one potentiometer per comparator.They act like a simple voltage divider, so I can adjust the threshold to a value between 6V and 0V, the same range I get from the photo transistor. The outputs of the op amps are connected to one LED each.

Using the pots, I adjusted the threshold such that no LEDs are on when no IR is detected, and all are on when IR is maxed out. That means LED 1 will come on when the voltage is lower than about 4.5 V, LED 2 when the voltage is lower than 3V – the midpoint -, LED3 at anything lower than 1.5 V, and LED 4 at just little over 0 V.

Overall a fun project that wasn’t too difficult to do, but fun to get my hands wet with.