[icm wk 10-11] Synth-Osc Sequencer

I’ve learned about many new terminologies upon entering the magical land of ITP, one of which being a “step sequencer”, introduced early in the semester by my friend David Currie (“basically a drum machine”, said Dave) when discussing ChucK. For this sound assignment, attempting a 16 step sequencer using p5 seems appropriate.

Umm, for some reason the embed doesn’t work. Sketch is available here

Before actually thinking about homework, I spent my week exploring the sound library. Sound is a completely new territory for me, and I was excited to have made an oscillator after class; its frequency responds to mouseX positions. I also experimented with giving an array of notes / frequency, for which I changed the trigger into keyPress.

The way I wrote randomness was calling an array as global variable:

let sound = [98, 110, 123.5, 130.8, 155.5];
//G2, A2, B2, C3, Eb3

and then in setup I wrote:

osc.freq(random(sound), 0.1);

Honestly I didn’t think it would work but it seemed like it did. I thought I’d have to do some Math.floor – type converting?

None of these embeds are working today… It keeps showing me “Uncaught TypeError: Cannot read property ‘split’ of undefined (: line 56)” — I don’t even have a line 56 here. Anyone has any idea why that could be? Anyway, here’s a link again.

Another new thing I learned was FFT (Fast Fourier Transform), by using the fft.analyze I could easily map the frequency of any audio input, which was pretty cool. To practice utilizing both amplitude (level) and frequency, I mapped a jazz song with two visual indicators: an ellipse that changes size according to amplitude, and a spectrum wave that visualizes frequency. Bop your head to one of Duke Ellington’s greatest hits, Rockin’ in Rhythm. The swing-est of all swing songs. Around 0:17 there is a 2 bar trumpet solo, and the ascending scale reflects very well on the spectrum.

The frequency spectrum is edited based on the Sound Note Envelop example in the p5 site.

Here’s link to my sketch.

Last but not least, the sequencer! I made two different types of sound, one created with two polySynth, and the other a triangle oscillator. After referencing the polySynth example, and taking style inspiration from this cool sequencer, it took me a while to figure out how to walk through the 16 steps. On top of the two nested for loops, I used frameCount to move the highlighted block (the “beat”). At 30 fps, the current speed for this sequencer is frameCount % 5 , which means 6 beats per second, which translates to about 360 bpm.

The rest of it I borrowed elements I liked from my previous two sketches: frequency mapper from the jazz visualizer, and random notes from the mouse oscillator. If I had more time, I probably would 1. experiment with other types of sound, maybe some sampling; 2. specify different keys to trigger different modes; 3. more interesting / diverse visuals.

Appreciating workshops taught by Billy Bennett, help and inspiration from Schuyler DeVos and Philip Cadoux.

Leave a Reply

Your email address will not be published. Required fields are marked *