Thursday, January 12, 2012

Synth Pads: the hardest sounds to do right

Today, I decided to try to design a synth "pad" sound. The thought of designing a pad really frightens me. You are essentially designing a patch where notes are meant to be held indefinitely. In a pad patch, a minute-long note should keep the audience interested right up to the last millisecond. This is a scary concept for me. How does one make an instrument where a single long note can be the opposite of boring?

So, I woke up this morning, fired up my laptop, took a deep breath, and came up with this humble example in Csound:
FM Pad by The Zebra Project

Here are some general concepts I thought about while making this sound:

1. Swell and Articulation:

When I designed pad sounds in the past, this one always got me. Every patch I made was just not articulate enough. I could only play really long notes, and this was a huge limiting factor for what the instrument could play. When designing this patch, I realized that pad swells are about growth in timbre, not volume. Articulation is extremely important for a versatile pad synth. Without it, your pad will always sound behind the beat. My patch has a volume envelope with an attack of 10ms and a separate "filter"(it's not really a filter, but we will call it that for now) envelope with an attack of 5 seconds.

2. Timbre and Change

A pad sound can't just be sawtooth wave. Listeners would be bored of it after the first few seconds. How the sound timbre changes over time determines the quality of Pad. Usually, I would have gone with a low-pass filter, but today I chose to use FM synthesis because you can do drastic changes to the waveform with minimal effort (it was also more interesting than a low-pass filter.) I was able to get a really interesting sound by slowly change the modulator number in the C:M ratio with a gentle LFO. I also put in a random number generator which adds very subtle deviation to pitch.

3.Wideness and Size

Creating width and size is the trick to giving your sound that overwhelming feeling. "Width" refers to the difference in sound between the left and right speakers. Slight modifications to each side gives the sound variety and realism. In my patch, I slightly detuned the left and right signals. "Size" refers to how large a sound is. The patch I have has 3 slightly detuned oscillators to give the sound of a large ensemble. To have made this a bigger sound, I could have added a large digital reverb. I didn't because it would have made the patch more complicated than I wanted it to be. Plus, I like to be careful with my reverb. It makes things messy very quickly and I almost consider it a cop-out when making good pad sounds. Reverb is like salt. It's good with the meal, but it isn't the meal.




Alrighty. That's all I have to say about that for now. Here is the Csound Code. Enjoy!


<CsoundSynthesizer>
<CsOptions>
-W
-o fmpad.wav
</CsOptions>
<CsInstruments>
sr = 96000
ksmps = 10
nchnls = 2
0dbfs = 1
instr 1
ipch = cpspch(p4)
iamp = p5*.15

;amplitude envelope with a fast attack
aenv linsegr 0, .0001, 1, 8, .9, 1, 0
;timbre modulation envelope with a slow attack
;this one changes the modulation index of the FM synth
kenv2 linseg 0, 5, 2
klfo lfo .01, .5

;random number generator. adds variety to the pitch.
krand randi .0005, 3

;3 detuned FM oscillators, sent to the right speaker
a1 foscil iamp*aenv, ipch*(1+krand)*.999, 1, 3+klfo, kenv2, 1
a2 foscil iamp*aenv, ipch*(1+krand)*1.002, 1, 3+klfo, kenv2, 1
a3 foscil iamp*aenv, ipch*(1+krand)*.996, 1, 3+klfo, kenv2, 1

;3 detuned FM oscillators, sent to the left speaker
a4 foscil iamp*aenv, ipch*(1+krand)*1.001, 1, 3+klfo, kenv2, 1
a5 foscil iamp*aenv, ipch*(1+krand)*1.004, 1, 3+klfo, kenv2, 1
a6 foscil iamp*aenv, ipch*(1+krand)*.998, 1, 3+klfo, kenv2, 1

aout = (a1+a2+a3)/3 ;combine the oscillators
aout2 = (a4+a5+a6)/3

outs aout2, aout
endin
</CsInstruments>
<CsScore>
f1 0 4096 10 1
t 0 70
;Score Generated using python and Milkytracker
i 1 0 2.0 9.02 1
i 1 2.0 2.0 9.01 1
i 1 0 4.0 7.02 1
i 1 0 4.0 6.02 1
i 1 0 8.0 8.02 1
i 1 0 8.0 8.05 1
i 1 0 8.0 8.09 1
i 1 4.0 4.0 9.0 1
i 1 4.0 4.0 6.1 1
i 1 4.0 4.0 5.1 1
i 1 8.0 2.0 9.02 1
i 1 8.0 4.0 8.04 1
i 1 8.0 4.0 8.07 1
i 1 8.0 4.0 8.09 1
i 1 10.0 2.0 9.01 1
i 1 8.0 4.0 6.09 1
i 1 8.0 4.0 5.09 1
i 1 12.0 2.0 8.07 1
i 1 14.0 2.0 8.04 1
i 1 12.0 7.0 8.02 1
i 1 16.0 3.0 8.06 1
i 1 12.0 7.0 8.09 1
i 1 12.0 7.0 9.02 1
i 1 12.0 7.0 6.02 1
i 1 12.0 7.0 5.02 1

</CsScore>
</CsoundSynthesizer>

Tuesday, January 10, 2012

Galbanum Waveforms

About a week ago, I purchased the Galbanum Architecture waveform pack on a really insistent impulse. For forty bucks, I downloaded 25,000 waveforms in wav32 format which are 2048 samples each. Besides offering many variations on classic waveforms like square, saws, and triangle waves, they also have a set of unusual waves. Many hours of experimentation lie ahead of me.

The problem is, how do I test each one? Waveforms are organized into different folders. Originally, I would go into a folder, load up a sample one by one in Renoise, and loop them. This was a time consuming effort.

Today, I figured out a way to do that in Csound.
<CsoundSynthesizer>
<CsOptions>
-odac
-M1
--midi-key-pch=4
</CsOptions>
<CsInstruments>
sr = 96000
ksmps = 10
nchnls = 1
0dbfs = 1
alwayson 2
instr 2

gktbl init 1
imax = 40
kkey sensekey

if kkey == 106 then ;go down if 'j' is pressed
gktbl = gktbl - 1
elseif kkey == 107 then ;go down if 'k' is pressed
gktbl = gktbl +1
endif

;cycle through the waveforms. if it reaches the end function tables, go to the beginning
if gktbl < 1 then
gktbl = imax
elseif gktbl > imax then
gktbl = 1
endif
if kkey == 32 then
printk2 gktbl
endif
endin

instr 1
;de-click the sounds
kpad linsegr 0, .01, 1, .01, 0
a1 oscil3 .3*kpad, cpspch(p4), i(gktbl)
out a1
endin

</CsInstruments>
<CsScore>
#include "tables" ;python generated file which contains 40 function tables with the waveforms
f 0 3600 ;stay open for an hour
</CsScore>
</CsoundSynthesizer>


The first thing I did was automatically generate all the wavetables to load up in Csound. With some google-fu and python, I created a file called "tables" which generated 40 function tables that could be loaded up into Csound. Each function table is a different waveform in the folder. To give you a sense of what these function tables look like, here is an example of one:

f1 0 2048 1 "Cos Saw.wav" 0 0 0

The synth itself is just an oscillator with some volume padding to prevent clicks. Just enough to get an idea of what the waveform sounds like. It takes realtime midi input from my USB keyboard, and I made it so the J and K keys would cycle through the waveforms. Pressing the space bar returns the function table number in the terminal window.

Hopefully this will be a useful tool for browsing through these waveforms!

Monday, January 9, 2012

Flux

In some ways, I have found that making music on a computer to be the exact opposite of making music on a traditional instrument. With a traditional instrument, one is always striving for perfection. With a computer, everything can be done "perfectly" right at the beginning. In fact, it is so perfect that doesn't sound musical at all. So while a traditional musician would spend his time striving for perfection, a computer musician would find himself chipping away at it.

Today I decided to play around a little with the idea of fluctuations ("flux," for the hip folks out there.)

Take a listen to these two Csound instruments I made, playing identical pieces of music:


Flux by The Zebra Project

Instrument A is nothing more than a simple triangle-wave oscillator with a volume envelope. Instrument B sounds very similar to instrument A, except with a few modifications. This was accomplished using two simple techniques:

1. Doubling and Wideness

A common producers technique is to duplicate an audio signal, add subtle variation to one of them, and then hard-pan each one left and right so that the two signals come out of separate speakers. This creates a very "wide" effect which can be especially heard in headphones.

To make this "wide" effect in instrument B, I made two oscillators with slight variations in tuning and in their volume envelopes, and sent one to the left speaker, and other to the right speaker.

2. Sample and Hold

Real instruments don't have perfect intonation, and neither should instrument B. Nuance is the key to creating expressive musical sounds. Pitch nuances can be made using a what is called a sample and hold generator. What exactly sample and hold generators do is beyond the scope of this post, so I highly recommend you read the synth secret article on it.

Instrument B has a sample and hold generator which generates a random number between 0 and 1 8 times a second. A value of 1 indicates that the pitch will get shifted by the maximum amount, and a value of 0 indicates no change at all. The depth of this change is determined by the variable idepth Instrument B.


For those interested, here is the code.


<CsoundSynthesizer>
<CsOptions>
;-odac ;realtime output
-o flux.aiff ;render to audio file

</CsOptions>
<CsInstruments>
sr = 96000
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
iamp = .2
ipch = cpspch(p4)

;one volume envelope
kamp1 linsegr 0, .0003, 1, .5, .05, .2, 0

;basic oscilator with no modulation
a1 oscil iamp*kamp1, ipch, 1

outs a1, a1
endin

instr 2
iamp = .2
ipch = cpspch(p4)
;sample and hold generator
krand randi 1, 8
;depth of modulation, where modulation is a number between 0-1 (best results < .05)
idepth = ipch* .005

;two volume envelopes, with subtle differences
kamp1 linsegr 0, .0003, 1, .5, .05, .2, 0
kamp2 linsegr 0, .0005, 1, .51, .05, .2, 0

;two oscillators with slight variations
a1 oscil iamp*kamp1, ipch*.998 + idepth*krand, 1
a2 oscil iamp*kamp2, ipch*1.002 + idepth*krand, 1

outs a2, a1 ;each oscillator sent to a different speaker
endin



</CsInstruments>
<CsScore>
f1 0 2048 7 1 1024 -1 1024 1 ;Triangle Wave
;Score Generated from a MIDI file made in Renoise and converted using another Csound instrument
i1 0.000000 0.913379 8.020000
i1 0.260771 1.304762 8.090000
i1 0.391383 1.434921 9.040000
i1 0.652154 1.434921 9.070000
i1 0.913152 1.173923 8.050000
i1 1.565306 0.521769 8.040000
i1 1.826077 0.260998 8.090000
i1 2.086848 0.913379 8.020000
i1 2.347846 1.304535 8.090000
i1 2.478231 1.435147 9.040000
i1 3.000000 1.174150 8.050000
i1 3.652154 0.782766 8.040000
i1 3.913152 0.652381 8.090000
i1 2.739229 2.087075 9.070000
i1 4.173923 0.913152 8.020000
i1 4.434694 0.913379 8.090000
i1 4.565306 0.913152 9.060000
i1 4.826077 0.913379 9.040000
i1 5.086848 0.913379 8.000000
i1 5.347846 0.652381 8.070000
i1 5.478231 0.521995 9.040000
i1 5.739229 0.260998 9.020000
i1 6.000000 1.304535 9.010000
i1 6.000000 1.304535 8.020000
i1 6.000000 1.304535 8.059999

i2 8.347846 0.913152 8.020000
i2 8.608617 1.304762 8.090000
i2 8.739229 1.434921 9.040000
i2 9.000000 1.434921 9.070000
i2 9.260771 1.174150 8.050000
i2 9.913152 0.521769 8.040000
i2 10.173923 0.260998 8.090000
i2 10.434694 0.913379 8.020000
i2 10.695692 1.304535 8.090000
i2 10.826077 1.434921 9.040000
i2 11.347846 1.174150 8.050000
i2 12.000000 0.782766 8.040000
i2 12.260771 0.652608 8.090000
i2 11.086847 2.087302 9.070000
i2 12.521770 0.913152 8.020000
i2 12.782539 0.913379 8.090000
i2 12.913153 0.913152 9.060000
i2 13.173923 0.913152 9.040000
i2 13.434694 0.913379 8.000000
i2 13.695692 0.652381 8.070000
i2 13.826077 0.521995 9.040000
i2 14.086848 0.261225 9.020000
i2 14.347846 1.304535 8.059999
i2 14.347846 1.304535 8.020000
i2 14.347846 1.304535 9.010000
</CsScore>
</CsoundSynthesizer>


Tuesday, November 15, 2011

Theres nothing like cool signal flow

This weeks song that I am sequencing has turned into a very ambient-sounding one (as have most of my songs have been recently.) Every now and then, I do a really cool trick that you just can't help but share. So please allow me to indulge!

My track has a ton of reverb on it. At the moment, it has one reverb plugin that I am sending all my tracks to in varying amounts. In the heat of the moment, I decided that I wanted this reverb bus to be pulsating! Sidechaining a kick to a compressor, then removing the kick audio signal should do the trick. But how do we implement it in the DAW I am using (Renoise.)

The first step is to get the sidechaining (ducking) business set up. This is slightly difficult to do in Renoise because there are no native compressors that allow you to do achieve this automatically. A relatively new feature to Renoise is the signal follower. By inversing the max and min values, and sending it to the threshold control. The kick is essentially now sidechained to the compressor.

We don't want the kick to be present in the mix; we just want the duck effect it causes on the ambience. The problem in Renoise is that when you mute the kick, the signal follower stops working. My solution was to put a send on to the kick track AFTER the signal follower. This would then go to a an audio bus which would invert the signal. If we keep the original signal and the inverted signal, the two cancel out and we are left with just the swell. Cool!

Wednesday, November 9, 2011

Girls and Berklee

I was at a friends house this weekend, and we were talking about a friend of hers. She showed me pictures. She was quite beautiful. When she told me about how she wanted to find her a boyfriend, I was very very surprised. Allow me to explain why.

Berklee has a female population of 29%. It has always been low or nonexistent. Many of my classes (especially the more techy ones) have no girls at all. It is very apparent.

If you happen to be a single guy looking for a girlfriend going into berklee, shit gets worse than that. Sure, you might think 29% isn't the worst thing in the world. But that is assuming that all these girls are available. They aren't. Being a music school, they either found a really hot guitar player for a boyfriend, or they are too focused on their musical career to pay attention (or they are lesbians). Most of the time, it is the first one. I'm sorry my fellow single men, that pretty lady in your critical listening class is statistically not single. In fact, I have a rule that I use at berklee. If you are female, look it, and go to berklee, you are not single. Even the ugly ones have boyfriends.

Many guys in my situation just give up. Unless you got some serious game, you ain't gonna find a dame. Or they just go to BU or Northeastern to pick up chicks. Problem is, I'm not in the mood for picking up chicks. I (just) want a nice commitment. Not a quick hookup.

If my friends friend went to Berklee, she would have no trouble finding a boyfriend. It would be weirder if she didn't actually. In fact, I've been here long enough to find the concept of a girl who is single to be strange and foreign to me.

Sunday, October 30, 2011

Apparat

Take a listen to this track by the artist Apparat.



The song singlehandedly inspired me to buy the album, as many good songs typically do.

Listening to new music is a lot like meeting a new friend for me. When I find a song I really like, it is more like meeting a new best friend. This song is more like the latter.

The start of my relationship with this song began when I by chance happened to find it on reddit. It was a lovely first impression. Within the first fifteen seconds, I already had goosebumps. By the time the sorrowful vocals came in, I knew I had found a keeper. Replay. Replay. Replay. And so the conversation began.

After about the fourth play, I knew that this song and I were no longer strangers to each other. I started remembering my favorite parts of the song. The scratchy bowed instruments and plucked strings in the introduction were always my favorite. The distant sounding piano was so nostalgic for me. I even began singing along with the vocalist.

Yesterday, I took the next big step in our relationship. I went and bought the album the song was on at Newbury comics. Not only did I pay money for the song, but I also got other songs by the same artist. It's almost like I'm getting to know the family right now. I'm seeing the similarities. Genetics, if you will.

I can't say I get the same feelings that I got from the initial first listen. I've been spending a lot of time with this track. That certain spark is now gone. In it's place is a really grounded intimacy with the song. I'm past just admiring the beauty it creates on the surface. I want to get a glimpse of this song's soul. As I move away from the "this song is pretty" attitude, I find myself asking more serious questions. Questions like "what is the form?", "What are the lyrics", and "How can I achieve this sound?"

Where it goes from here, who knows? But can't that be said for any relationship?

Tuesday, October 25, 2011

Suddenly, Noise.

I never thought I'd be posting to this blog ever again. CLAMP was over and I had nothing to blog about. I got a tumblr. Bitches went crazy. I got rid of the tumblr. And that brings me here. That's my story. Let us begin.

Berklee has given me the opportunity to work two majors (Electronic Production and Design and Music Production and Engineering), so I've decided to step it up a bit and work my composition, production, sequencing, and mixing chops.

Here's how it will go:

Week 1: Write/Compose a song.
Week 2: Sequence/Produce the song.
Week 3: Mix the song.

One more thing, the cycle starts over every week. That means in three weeks, I will be working on three simultaneous songs in three different stages.

I will also be using this process with my roommate Russ. In this process, he will be acting as the songwriter, and I will play more the role of producer.

So lets see, this means about six songs at a time? Bring it on.