S C O T T P E T E R S E N ∞ E L M U C O ∞ S C A C I N T O . C O M

homepage for scott eric petersen, el muco, and all things electronic

Music V: Back to the Future


In 1969 Max Mathews published The Technology of Computer Music in which he provides a  primer to digital sound and synthesis, describes the function of a computer music program, and provides a manual to the language he was describing, namely MUSIC V. It was to be the last MUSIC-N language he would write, and was the culmination of audio programming innovation that Mathews began in 1957 when he created the series of programs that formed MUSIC. Read the rest of this entry »

Filed under: Code, Music, Phase 1, Tutorial / How-to, , , , , , , , , , ,

Intro to SuperCollider 3 for the Uninitiated

sc3_128There are so many good tutorials, books, and websites out there for learning SuperCollider that one may scoff at “yet another…” SuperCollider intro and for good reason.  This article, however, aims to answer really basic questions at the absolute beginner level, questions such as “ok, but how do I get SuperCollider and what version do I want?”  I will present information in the form of an extended FAQ largely based on questions I have answered over and over again.  Read the rest of this entry »

Filed under: Code, SC3 - Code - Music - More, Tutorial / How-to, , , , , ,

Aural Assault?!?

Hello all!  Many apologies for my long absence – life happend between February and now and it sort of kicked my butt a little.  By way of an apology, I would like to offer you a link to a new project I am doing: 375 Aural Assaults!

You can check out the page for the “what the h*$# is this?!?” question and enjoy the sonorous splenfdiforousness while you are there.  I will be adding sounds to this site as often as I can.  After all, what else am I going to do?..  (<– trick question)

375 Aural Assaults! 

Filed under: Code, SC3 - Code - Music - More, , , , , , , , , ,

Batch Normalize and add Fades to Audio Files


A new project I have just started has had me editing a lot of relatively long audio files.  I have to cut them up separating the noise from the spoken word, normalize each file, and add fades to the beginning and end.  Then, I have to export them.  I was using Audacity, which is a great (though ugly) audio editor.  However, there are some problems with batch work in Audacity that ended cost me a lot of time and ultimately making it unsuitable for my purposes.  Finding no app for mac to quickly batch normalize, add fades, and save as a 48k/24-bit file, I decided I would bite the bullet and try to *assemble a bash script to do the tedious work for me. Read the rest of this entry »

Filed under: Code, Music, Tutorial / How-to, , , , , , , ,

Four Pillars I

Four Pillars I
by scott eric petersen
jan – 2011

For live electronics (supercollider) and 4 channel audio.

This piece is the first of a series (still in progress) of pieces that explore feedback networks, interactivity (perceived) and aural serendipity. The recording below is one realization of the piece as each time the code is executed the results vary. It has also been modified from the original (for four channels) for stereo.

Read the rest of this entry »

Filed under: Code, Music, , , , , , ,

“The Record Player is Broken”

nov 2012
SuperCollider Code (executed in real-time.)

I just finished a submission for the SCTweet-a-thon, this time being held at WOCMAT. (Please note that because of WordPress awesomeness (sarcasm… drip drip) the code below runs out of the visible area of the post.  You can see if all clearly if you copy and past it somewhere else.)

Here’s a 4 minute recording of the code in action:

Read the rest of this entry »

Filed under: Code, SC3 - Code - Music - More, , , , , ,

Fun with Feedback (and SuperCollider)

You are not the only one, she loves it too!

A couple of weeks ago I posted some audio and code examples of a software matrix mixer I made with SuperCollider.  I thought a post going into some detail about feedback and how to code it may be of help to those new to the concept as a creative tool, or to using it within SuperCollider.  Lets first start with some basics of a feedback circuit.

The necessary components of a feedback system (the bare bones) are an input source (some sound, if only line-level hum) and an independent loop with a gain control.  Check out the diagram below.

diagram showing basic feedback circuit

The feedback loop can be accomplished in a number of ways.  If you have ever used a mic in an auditorium (or been to school for that matter) you have already probably experienced feedback in the form of a high-pitched squeal.  The microphone picks up your voice, is routed to a mixer, is amplified (gain) and played out the room speakers.  The sound coming out the speakers is then picked up by the mic in addition to your voice.  The squeal occurs when the amplitude of the input signal (your voice plus the amplified version coming back over the speakers) is loud enough that with each cycle the overall gain increases.  Cut the amplification out to the speakers and the squeal stops.  The quality of the feedback (the frequencies amplified) have to do with the microphone’s resonant frequencies in combination with a lot of other factors (room size and resonance, quality of the audio gear being used, whether the signal is balanced or unbalanced, matching or mismatched impedance, etc.)

In the mixer feedback post I did a couple weeks back, the input signal was the inherent noise of the analog mixer with gain applied at each stage of the 4-stage feedback loop.  In any analog system there is always noise present because of the nature of electrical circuits and the power required to make them work.  The same is not true for purely digital (software) feedback systems so some generated sound input signal is necessary.

Below is some very simple SuperCollider codez to demonstrate this simplest of feedback loops and a recording so you don’t have to run the code.  If you do run the code in SC, be careful when moving the mouse to the right of the screen.  As you approach 1, the feedback loop will become increasingly loud until at 1 and beyond, it becomes exponentially loud until things break.  (And by ‘things’ I mean your speakers and/or eardrums and/or the SC server :P)  In the recording below, i just move the mouse to the right to “max out” the feedback loop, then drop back after it maxes out.

Here is another version with a simple half-second delay built into the processing section.  Note that this rids us of the ear-piercing noise that occurred in the above example.  In the recording I’m moving the mouse to the right, then back and forth across the screen to make a more interesting texture.  I then just let it build up with the mouse all the way to the right.

The next two examples are of slightly more interesting feedback circuits.  In the first version I have fixed the gain at 1.1 so it the sound eventually reaches saturation and does not return.  I’ve removed the limiter and replaced it ‘.clip’ which squares off the wave form resulting in audible distortion of the signal.  I have also added a random line generator ‘speed’ to control some aspects of the sound, the resonant frequency of a low pass filter and the delay time.

Here is a version that uses the built-in mic and adds some cheesy panning.

While these samples are a few steps away from being art, they show the power of possibility lurking in feedback circuits.  The truth of synthesis is that, with a few exceptions, the more intricate (complex) a sound is, the more realistic and better it sounds.  Adding a feedback loop to a sound introduces a few more layers of complexity and can have beautiful as well as destructive results.

If you are interested in hearing some truly excellent feedback music, check out the work of David Tudor.  The complexity of his circuits is both astounding and elegant, and the sonic results are really fantastic.

Viva la feedback!

Filed under: Code, Music, Phase 1, SC3 - Code - Music - More, , , , , , ,

Virtual Matrix Mixer (yes, in SuperCollider)

Screenshot of the Waz Matrix Mixer in action

Kane and I recently dropped $170 at JameCo on potentiometers, switches, diodes, project boards, and more in anticipation of several MuCo projects we have been planning.  The main project now after some op-amp FAIL last night (the FAIL being Mimms’s op-amp.  Yes, there is a free version on the nets.  No, we will not help you torrent it illegally) is a classic 3×3 matrix mixer which we intend to use a la David Tudor to make feedback music of the most splendiforous nature.  As some of you may have noticed, I have been slightly obsessed with feedback of late, and for good reason: feedback, like Frosted Flakes, is better than good, its great.  It’s great to make, great to listen to, great to cover up the drunk, sleeping neighbor’s DVD menu music that runs for hours and hours after he’s passed out on the couch.

I plan to post a little “Fun with Feedback” post this weekend (maybe tomorrow), but I will jump the gun and get to results before I do.  In anticipation of the analogue matrix mixer, I decided to spit in the eye of convention and model an analog (make an analog of…) device digitally first because I wanted to see what my results with the analog device might be.

This was an interesting experiment because it highlighted the reality that, while creating digital analogs of analog equipment may be useful on a basic, conceptual level, it breaks down completely when it comes to the actual implementation/realization of the object.  This may seem obvious to some of you (congratulations), but one wouldn’t suspect this with the tradition of modelling analog equipment in electronic music studios the world over.  Not to mention all of the digital synthesis software that models even its appearance.  (Yes, Reason, I’m looking at you… with disdain.)  I’ll make a long story short and say that approximately 2 minutes after I sat down with idea the matrix mixer in my head to start coding it up, I was conceptually far enough away from the analog instrument that looking at my notes one might not even guess it was supposed to be a simple 3×3 summing mixer.  This is partly because of the nature of programming itself, and partly because of the idiosyncrasies of any programming language.  If one were to mock up the 3×3 in Csound, SuperCollider, and ChucK, it would become very clear very quickly that one cannot think the same way about the same object when coding in different languages.  I now digest.  (yes, digest.)

After some headbanging and with some help from Kane and HJH (on Nabble) the Waz Matrix Mixer V.1 was realized last night.  The SC3 code is below so you can see how it is constructed.  The mixer is simple: it routes 3 input sources (in this case, either the built-in microphone or a sine oscillator) to 3 outputs each.   At the outputs is some processing, a delay line, distortion, etc.  The output from the processing can then be routed back into any of the inputs including itself, thus the feedback.

In the following picture, the blue knobs represent the 3×3 matrix.  Each row routes its respective input to outs 1, 2, and 3 individually.  The red knobs control the input volume, and the yellow knobs control the amount of outs 1, 2, and 3 that are fed back into the chain.

janky gui -- needs work, but works...

As promised, here is the code (provided Scribd ever finishes processing it…)

Here is a recording with the mic as the input source.  I’m not actually doing anything with the mic, I’m just letting it hum and collect room noise and the output from the speaker which is right next to it in the laptop.  The delay line’s delay time parameter is being dynamically changed using the mouse position (x axis) which results in pitch-shifting.  This is responsible for the “glitching.”  Additionally, I am using the mouse position y axis to control the decay time (in seconds.)  When the decay time is over 3, the processing synths begin a sometimes irreversible pattern of self destruction.

Here is a recording of the sine oscillator inputs.  There are three sine tones around 440, 1000, and 1400 Hz respectively.  The rest of the processing is as described in the example above.

Filed under: Code, Current Projects, El MuCo, Music, SC3 - Code - Music - More, , , , , , , , , , ,

(tiny) Nifty Codez

I realize from looking through this site that I need to start posting more code (and resulting recordings.) Part of my motivation is that SC3 (now 3.4!) never ceases to amaze me with its possibilities. One can, with a very small amount of code, achieve some incredibly intricate, beautiful sounds. The below is one example.

{var func, ampFunc; func=LFNoise1.kr(LFNoise1.kr(1!2,0.005,0.02)!3,1000!3,1500!3);
FreeVerb.ar(SinOsc.ar(func,func%pi,ampFunc%1), 0.75,0.75);}.play;

The code all fits in one function ( {} ) and involves 6 UGens and a couple of variables. Basically, the LFNoise1 UGens are random line generators. I’ve nested them inside each other to add even more variability in how the randomness occurs, how often and how much the line moves within the given range. This are then duplicated several times for each parameter (using the ! operator) and applied to the sine-tone oscillator’s frequency, phase, and amplitude parameters. All is wrapped in a warm reverberant blanket of FreeVerb for that roomy effect. Note that the way I’m using the ! operator is sort of a hack and creates many redundant versions of the same integers. This can result in channel number mismatches and amplitudes of over 1. To solve this, the code can be simply modified with a Mix UGen that mixes the array of channels down to (in this case) 2 channels, and adding a multiplier of 0.5 ( ) * 0.5}… ) to keep the amplitudes below 1.

{var func, ampFunc; func=LFNoise1.kr(LFNoise1.kr(1!2,0.005,0.02)!3,1000!3,1500!3);
Mix(FreeVerb.ar(SinOsc.ar(func,func%pi,ampFunc%1), 0.75,0.75);)*0.5}.drawAndPlay;

Note the above uses an added method called drawAndPlay which graphs out the above code in GraphViz so one can visually see exactly what’s going on. The below png file (click it) shows what happens behind the scenes.

Here is a recording of the above code. Note: each time the code is run, the results are different, sometimes subtly, sometimes more noticeably.

The beauty of SC3 is that it is extremely customizable/flexible in terms of coding styles. The above code could be condensed even further, and made to fit in a tweet, for example, but for visual and pedagogical purposes I made it more visually self-explanitory.

I will hopefully post more small examples as the summer weeks pass by. Stay tuned, and stay cool.


Filed under: Code, Phase 1, SC3 - Code - Music - More, , , , , , ,

Towards a Little Chaos

I’ve been reading through Leonard Smith’s Chaos: a Very Short Introduction in my spare time (twice a month.) It is truly fascinating reading (depending on your definition of fascinating) and absolutely enlightening to a recovering philistine groping at the previously eschewed topics of mathematics, physics, and philosophy*. I’m going to post some of the algorithms/systems he describes, realized in the SuperCollider programming language. This may be of some interest to others in my position**.

Full Logistic Map

“Subtract X2 from X, multiply the difference by 4 and take the result as the new value for X.”

If X is given a value of 0.5, the results are relatively uninteresting. (0.5,1,0,0,0,0,0,0,0…)

However, if the value 0.876 (that of the example in the book) or something similar is used, the results are more interesting.

r = Routine.new ( {
y = List[];
x = rrand(0.869, 0.883);
250.do ( { y.add( {x = 4*(x-(x.squared)) }.value) } );
} );



As the author points out, notice that while a statistician may pronounce the results random, the physicist may find predictability. It should be noted that in the author’s example, x was always 0.876 and therefore the system was deterministic. By changing x to a random number (linearly picked from a given range) I’ve made the system stochastic.

AC Map (Stochastic Dynamical System)

Any dynamical system whose rule does not require a random number may be said to be deterministic. Any dynamical system whose rule requires a random number may be said to be stochastic.

“Divide X by 4, then subtract 1/2 and add a random number R to get the new X.”

r = Routine.new ( {

y = List[];
x = 1;

250.do ( { y.add( { x = (x/4) + rrand(0,1) }.value) } );

} );



Note: this system is incomplete without defining R. The random number picking algorithm is a system of its own. In the above, a linear distribution with even 0-1 float return was employed. The author notes that it is sufficient to specify (for R) what distribution is used (linear, Gaussian, etc.)

I’ll try to add more of these as I read. They may also appear in new posts.

*I was a lofty romantic — the only “reality” to me at one point was the realization of idealized sound-art (composition.)

** The likelihood of any other person actually finding themselves in anything that could be considered remotely close to “my position” is statistically very small. Realizing this, this post is then for my personal edification.

Filed under: Code, Miscellany, Phase 1, , , , , , ,

G O I N G S O N : L O C A L (ISH)

fritz Art of Fritz Horstman
kane Music of Brian Kane
fritz Hartford Phase Shift
fritz Hartford Sound Alliance
Lique Art of Philip Lique
Lique Music of Matt Sargeant
strycharz Art of Heather Strycharz
uncertainty Uncertainty Music Series

My Other Awesome Sites [•_•]

Assault! 375 Aural Assaults!
About me! About me!
MySpace! MySpace!
Google+! Google+!
My (soon-to-be) Company! My (soon-to-be) Company!

Enter your email address to subscribe to this awesome blog and receive notifications of new posts by email!

Join 76 other followers


P O S T E R S !







INI new haven

Handmade instruments by Scott Petersen and Brian Kane at Artspace New Haven