Traversing Samples with Granular Synthesis

messy_patchI have begun to refine the patch I described in the last entry, creating an instrument that allows you to traverse through samples using an x-y controller and a slider. The x axis controls the forward or backward playback frequency of the grain. The y axis controls the width of the grain; either very narrow (minimum of 10ms), to an adjustable percentage of the sample at the widest (15% by default). The slider controls the position of the grain in the sample. Buttons across the top allow you to choose one of five preset samples. Alternatives can be loaded in the patch or set as defaults.

So far the TouchOSC controller is working quite well for the project. It was a bit tricky getting the interface to reflect changes in the patch, since radio button behavior is not supported in TouchOSC. Fortunately it supports an input port, so I managed to get all the buttons toggled properly by sending data back to the iPod Touch. I have connected the accelerometer to a filter so that when turned on with a toggle, tilting it on the y axis causes a lowpass filter to effect the output. Finally, by setting a threshold on the z axis, giving the iPod Touch a brisk shake will cause the patch to loop a randomly selected grain of random length from a randomly selected buffer played back at a randomly selected rate. The variety of sounds possible with five short samples is huge. Here’s a selection of sound produced with one sample selected. The sound source is from a vintage video game. I’m curious to see if anyone can recognize it. Please post your guess in a comment.

Etude in 8 Bits for Multitouch Graintable Synthesis

TouchOSC Controlled Glitch Looper in MaxMSP

Custom TouchOSC LayoutI don’t have this patch ready to share yet, but I thought I could at least explain a little bit about it and offer an audio example. What I’m working on is a device to manipulate samples in unconventional ways using alternative input methods. This audio clip, for example, was generated using a Max patch that adjusts the playback frequency and length of a sample using an x-y controller. The x-axis controls the frequency while the y-axis controls the sample length. For a controller I used an iPod Touch running TouchOSC. I’ve been using Mrmr as well, but wanted to try TouchOSC now that it has an editor to create custom layouts.

My goal is to create several pages in TouchOSC that allow you to manipulate one of five samples in several different ways. The image is a shot of my iPod Touch displaying the custom layout that I created and connected to my Max patch for creating the sound linked below.

Mad Looper

Monophonic Step Sequencer Max Patch Download

Max5LogoHere’s an archive that contains the patch and a standalone application (Mac OSX only) of the step sequencer that I built in MaxMSP a few days ago. The sequencer works pretty well sending MIDI, but I haven’t really fine tuned the internal synthesis. Currently it uses a function object with an adjustable domain to adjust the amplitude envelope of a sinusoidal, but if the note length (function domain) is either too short or too long, clicks occur between notes. What I need to do is ramp up or down to the proper level for each new note. I’ll post an update here when I come up with a solution. If any Max veterans out there have any suggestions, please feel free to post a comment.

MonoStepSequencer.zip

Step Sequencer Built in MaxMSP

step_seq_detailI built this step sequencer in Max/MSP today as an exercise. My intent was a to build a simple step sequencer, however it got more and more complicated as time went on. This is probably not a tool that I’d actually use without some significant changes, but I learned quite a bit in the process of creating it.

The core of the sequencer is an itable object that contains the note sequence. The user interface items all have a green background. The first thing I wanted to be able to do was to allow the user to set the number of notes in the sequence and adjust the note range (click the image for a detailed view). Then I wanted to be able to randomize the notes regardless of the length and range of the sequence. I also added the ability for the user to set the velocity of each note in the sequence with a multislider object.

BPM, note length, amplitude envelope, and master volume are all also adjustable. After all that I added in the ability to send the sequence to a noteout object, so it can be played via MIDI. Here’s a clippy sequence I created using the tool.

Clippy Step Sequence

The Microtonal Beep Master 9000

beep_master_9000One of my recent class assignments led me to create a patch that automates the playback of a pair of microtonal tones with a frequency range of 200Hz to 1200Hz. I call it the Beep Master 9000 (press tongue firmly against cheek). The large toggles in the upper left turn on and off each of the sine waves individually. The large bangs to the right randomize the frequency when clicked. Below the bangs are a couple of smaller toggles that turn on metronomes that automate the randomization of the frequency for each cycle~ object. The number boxes allow the user to adjust how often the pitches are randomized in milliseconds. The encapsulated sub-patch (“p rightMetro” amd “p leftMetro”) multiplies the frequency of each metro by 0.25, 0.50, 0.75, or 1 randomly. This causes the beats to change by divisions (i.e. 4 times faster when multiplied by 0.25, twice as fast by 0.50, and so on). Here’s a sequence I created using the Beep Master 9000.

Beep Master 9000