Synthesizer Update

I decided that it was time to expand the synth; I’m going to add the following modules, albeit in non-standard pieces and configurations: MFOS Multifunction Module, Dual VCA, and Noise Module (I will be making these by hand on perfboard to save some cash on PCBs from MFOS, however). There will probably be others, to be decided sometime in the near future.

Now, to do all of this, I needed to remove all of the hardware from the front panel, as well as all of the foil tape that had been there for about two years now. It took a full night of careful scraping (not careful enough, unfortunately) and scrubbing with various chemicals (Goo Gone is just about as effective as WD-40, by the way; it just happens to smell much better). Now that I was the proud new owner of a very heavily scratched panel, I hit it up with some 220-grit sandpaper, then wet-sanded with 1000-grit and 2000-grit sandpaper, and finished it all off with some toothpaste to give it anmockup almost-polished clarity. In the end, I’m surprised with the results (I was considering ordering some specialized acrylic polishing compound online, but now I think I’ll just stick with toothpaste); here is a close-up with a mockup of how I intend to do the labels:

I will be printing the labels from the computer and cutting them out with a bit more uniformity, as well as being more careful with the foil tape, but that’s the essential idea of how I have been planning to do this all along.
As far as the expansion goes, I’ve got a 1:1 scale layout going on some grid paper that I printed up from here. I hope to use it as a drilling guide, as well, because I’ve now noticed that my original drilled holes do not seem to be all that well lined up; I think that I can do better for the expanded sections:

Something that I’ve decided to be improvised once I have everything ready and mounted back on the panel is how I will be sticking the circuit boards to the front panel. Previously, I had used some metal clips made from an old heatsink and JB-Welded to the foil tape to mount them perpendicular to the panel wherever I could get them to fit in free spaces. It performed horribly and fell apart after a bit of jostling. After some rather ignorant searching for what turned out to be called “mounting brackets”, and discovering that the only place I could find them as small as I needed was from Mouser (from whom I had just received some new solder), I decided to just make them out of something similar. After a bit of searching, I finally found some hardware called “one hole midget straps” (humorously suggestive, no?) at Lowes, for which I just need to straighten out one end and drill a hole through it. I only need about 20 of them, so that’s just an hour or so of work to keep from paying $8.00 shipping from Mouser for $2 worth of product.

On the electrical front, I have not made much progress; I started working on soldering together the sequencer circuitry, but ran into a lack of solder that was remedied with a one-pound spool from Mouser. Seems to be a decent product, and I look forward to using it more in the future.

I have also decided to rebuild the case (other than the front panel) from some new stock acrylic, because the current build is not only the wrong size for the front panel (I cut the pieces and put them together rather hastily), but it is cracked and broken in several places. It just plain looks bad, to be honest. Unfortunately, the pieces I got from US Plastic seem to have been cut to the wrong dimensions; I sent them an email and hope to get a response (and maybe some new boards sent out) on Monday.

Spring Break 2010 – Synthesizer Work!

This past week was my Spring Break – classes are going reasonably well, and I’m really enjoying my Electronics I course; it has rejuvenated my desire to work on my modular synthesizer! So much so, in fact, that I furiously worked on the project which I hadn’t touched for about 2 years (and hadn’t touched for about a year prior to that, either!), and have made a large amount of progress. My Modular Synthesizer is really only semi-modular, in that it it built into a (1′H)x(2′W)x(4″D) rectangular case that I built from 1/8″ thick, florescent green acrylic that I bought from US Plastic about three years ago. I lined the back of the front panel with foil tape to help contrast the plugs and jacks from the innards; being able to see the insides is kind of distracting, as I found out when I first mocked up some pieces of equipment several years ago (plus, it provides a convenient grounding plane).

I chose my first modules and purchased some ready-made PCBs from Ray Wilson about three years ago: a VC-LFO, a VCO, a VCF, and a State-Variable VCF (which he sent to me for free because he somehow lost track of my order and didn’t send it for over a month). I started populating one of the boards back then, but then school got in my way, and I pretty much hadn’t touched them until this past Monday.

This past week, I finished all four modules and have them mounted to the front panel and working! Here is a view of the front panel, upside down and displaying all of its delicious insides:

At this point, I need to get access to an oscilloscope so that I can calibrate the waveforms and get an idea of what voltage ranges I am working with and how steady they are across frequency ranges. I also have to get to work on the sequencer (which all of the components on the right side of the above picture are for), which I have built (for the most part) on a breadboard. I have already started soldering it on a protoboard. I also just remembered that this still exists! I think I made that page during my Junior year of High School.

In other news, I’ve got only about 2 feet of solder left in the one-pound spool that I bought almost 10 years ago; I probably used ~1/4 of the thing over the past week. >.<

Collatzian ChucKathon

Intrigued by a recent XKCD comic regarding the Collatz Sequence, I whipped up a fairly simple ChucK program that runs through the Collatz sequences of increasing odd starting points and assigns the raw number in each sequence as the frequency of an oscillator. I few spatial effects are there as well, to make it a bit more listenable than just a simple oscillator running. I limited the output to (20,1000) Hz because anything else drops straight to one Hz or begins to create undesireably high pitched frequencies that don’t provide much of anything interesting.

I think I’ve heard this familiar-sounding sequence of tones before, but I can’t imagine where. If it has been in something I’ve heard before, I’m sure it was coincidental because there are only so many whole number frequency sequences to be made! 😛

ChucK code follows:

21 => int fo;
fo => int f;
fo => int fmax;
0 => int loopcount;
0 => int looplength_timer;
0 => int looplength;

SawOsc osc1 => LPF lp => PRCRev r;
0.1 => r.mix;
f => osc1.freq;
0.4 => osc1.gain;

SinOsc bg => r;
0.025 => bg.gain;
fmax => bg.freq;

SinOsc lpm => blackhole;
0.183 => lpm.freq;
50 => lpm.gain;

r => dac;

//Loop until process is terminated
while(1)
{
//Print values to terminal
<<< "f=",f, "ttfo=",fo,"ttfmax=",fmax,"ttlooplength_timer=",looplength_timer,"ttlooplength=",looplength,"ttloopcount=",loopcount >>>;

183::ms => now;

f => osc1.freq;
if(looplength > 0) { (((looplength $ float) / (looplength_timer $ float)) / (looplength $ float)) * 0.05 => bg.gain; }
else { 0.01 => bg.gain; }
lpm.last() + f + 60 => lp.freq;

if(f%2 != 0) { f*3 + 1 => f; }
else { f / 2 => f; }

if(f < 20) { fo => f; }
if(f > 1000) { fo => f; }

if(f == fo) { looplength_timer => looplength; 0 => looplength_timer; loopcount++; }
if(f > fmax) { f => fmax; fmax => bg.freq; }

if(loopcount == 4) { fo + 2 => fo; fo => f => fmax => bg.freq; 0 => looplength_timer => looplength => loopcount;}

looplength_timer++;

}

ChucK – Differential Equation System Solver

For several weeks, I have been playing around with ChucK: a Strongly-timed, Concurrent, and On-the-fly Audio Programming Language. I have actually been using the software, off and on, for over two years, but only recently started to really use it in the ways I had always wanted to: algorithmically-produced music.

My real dip into the code occured when I jumped on an extra credit assignment for my Differential Equations class, where I was tasked with programming a numerical solver for first-order DEs using the three major introductory algorithms for doing so: Euler’s, Improved Euler’s, and 4th-Order Runge-Kutta (the best of all). It was intended for me to use Mathematica or Matlab, but my program was able to solve the given problems, so it was still acceptable.

The next day, I modified my program for a more general use and to be capable of solving systems of differential equations. I did some research on Lorenz Attractors, and decided that they might be interesting to listen to. Here’s my resulting code and an audio snippet of what it can produce:

ChucK code follows:

3 => int a;
SinOsc osc1[a];
for(0 => int j; j < a; j++)
{
osc1[j] => dac;
(1.0 / a) => osc1[j].gain;
}

float k[a][4];
float x[a];

10.0 => x[0];
20.0 => x[1];
30.0 => x[2];
0.0 => float tt;
0.0001 => float h;

while(1)
{
//Print values to terminal
if( (tt % 0.01) < 0.0001){ <<< “tt=”,tt,”tx0=”,x[0],”tx1=”,x[1],”tx2=”,x[2] >>>; }

for(0 => int j; j < a; j++)
{ ((Std.fabs(x[j]) + 1) * j*20) + 20 => osc1[j].freq; }

h +=> tt;

for(0 => int j; j < a; j++){ h * f(j,tt,x[0],x[1],x[2]) => k[j][0]; }
for(0 => int j; j < a; j++){ h * f(j,tt + (0.5*h),x[0] + (0.5*k[0][0]),x[1] + (0.5*k[1][0]),x[2] + (0.5*k[2][0])) => k[j][1]; }
for(0 => int j; j < a; j++){ h * f(j,tt + (0.5*h),x[0] + (0.5*k[0][1]),x[1] + (0.5*k[1][1]),x[2] + (0.5*k[2][1])) => k[j][2]; }
for(0 => int j; j < a; j++){ h * f(j,tt,x[0] + k[0][2],x[1] + k[1][2],x[2] + k[2][2]) => k[j][3]; }
for(0 => int j; j < a; j++){ x[j] + (1.0 / 6.0) * (k[j][0] + (2.0*k[j][1]) + (2.0*k[j][2]) + k[j][3]) => x[j]; }

.1::ms => now;
}

fun float f(int sub, float t, float x, float y, float z)
{
if(sub == 0){ return 10.3*(y-x); }
if(sub == 1){ return x*(28.4-z)-y; }
if(sub == 2){ return x*y-(7.0/3.2)*z; }
}

My work continued quite a bit past that, and I’m debating whether to post the results here, or to keep it quiet until I have enough music to release my first album. That could be this Summer sometime, if ever.

I can only hope.

In The Beginning…

There was LiveJournal; I used that for a while, and got tired of it.

What’s this, then? WordPress? Two simple words: “I’m lazy.”

This place will be where I post my music and music-related thoughts; a centralized location to help ensure that I know what I’m doing.

How will it work? Just wait, and we’ll see where this goes…