From CCRMA Wiki
by J3 (Jason Riggs, Jacob Shenker, and Jay Bhat)
This instrument works by displaying a GUI (shown at top of page) through which the slorker plays with algorithms for note-playback. Extensive real-time controls affect the texture and rhythm of the sound.
May 9, 2009 - SLOrktastic Chamber Music I @ The CCRMA Stage:
Code used: permutations1.zip
May 16, 2009 - SLOrktastic Chamber Music II @ The CCRMA Stage:
Code used: permutations2.zip
How to Play
The GUI displays a series of rows of boxes, each box corresponding to an relative interval. The blue LEDs indicate the current location of the beat in each of the rows.
Selecting timbre, envelopes, or sections is possible by holding down "t", "e", or "s", respectively, and pressing number keys "1"-"9", "0" to select the parameter values 0-9. Holding down shift when pressing a number key accesses the second bank, 10-19. (i.e., to select envelope 10, press shift+e+1)
With the stock configuration, the lowest-numbered envelopes are the shortest and most percussive, while envelopes 6-9 are pads of increasing length. One can add up to 20 different envelopes and sections by modifying the code (in gui.ck, an array of ADSR vectors on lines 52-61, and the rows for each section on lines 85-90). Adding more timbres is also possible, but will remain undocumented for the time being (feel free to contact the authors for instructions). As configured currently, timbre 0 is a supersine, 1 is a supertriangle, 2 is a supersquare, and 3 is a supersaw oscillator bank. Timbres 4-11 are samples, listed on lines 127-136 in sampler.ck.
Additionally, holding down "t", "e", or "s" and pressing "[" or "]" will scroll though the available parameter values, wrapping around (i.e., if you are on timbre 0, pressing "[" will go to the highest-numbered timbre available).
Without holding down "t", "e", or "s", the number keys default to changing envelope, and "["/"]" default to changing timbre.
Holding down "i", "j", "k", or "l" while pressing up or down arrow keys modify attack, decay, sustain, and release parameters, respectively, for the ADSR envelope. Selecting an envelope (with number keys or "["/"]") clears the modifications one has made to it (e.g., if I press 2, I'll play with envelope 2, then if I hold down "i" and press down arrow twice, it'll play with my modified envelope. Pressing 2 again will reset the ADSR to the original envelope 2).
"<-" and "->" (arrow keys) change the register (in octaves). Holding down shift modifies the register (basenote) in semitones (100 cents), holding down apple does the same in quartertones (50 cents), and shift+apple does so by an eighth-tone (25 cents).
"-^" and "-v" (arrow keys) double and halve the tempo, respectively. Holding down shift does so by factors of 3, apple does so by factors of 5, and shift+apple does so by factors of 7. (i.e., to reach an 7:8 polyrhythm from a tempo of 8, press down arrow three times [reaching a tempo of 1] then press shift+apple+up once [to get a tempo of 7]).
Trackpad Controls (hold respective keys to activate!)
IMPORTANT: For the following trackpad commands to be active, you must be holding down the "." key.
X-axis: Traversing the x-axis sweeps a low-pass filter with a moderate resonance.
Y-axis: For the oscillator timbres (0-3), traversing the y-axis detunes the pitch slightly around its base frequency. For the sampled timbres (3-11), traversing the y-axis increases the resonance of the low-pass filter.
The GUI is controlled through clicks (with optional keyboard shortcuts).
The GUI contains a grid of boxes with associated LEDs that display the current location of the beat. The beat will advance the top row. Every time the one row's location reaches the end and wraps back to the beginning, the row below it advances by one. As such, the score can be considered a series of nested epicycles. The note that is triggered for every advancing of the top row is the sum of all the active boxes (where "active" means they correspond to the current location of the beat, displayed by blue LEDs). By default, there are three rows, the top row with 5 boxes, the second with 5, and the third with 3.
The boxes display pitches in Lilypond notation, so 'gis would be the G-sharp an octave above middle-C and ,,bes would be the B-flat one octave below middle C (note: ,bes is the note 'one semitone' below c). The default format is for the top and bottom rows to display their absolute pitches (i.e., the note that would be triggered if they were active their row were the "top" row, so the notes in the top row really do display exactly what pitch would be triggered when the beat lands on them), and the second row to show the relative interval, e.g., if the current note on the middle row was displayed as P4, and the bottom note was 'd, the current note on the top row would be 'g (the D above middle C transposed up a fourth). This is all fully customizable by modifying the appropriate configuration parameters in gui.ck (again, until this is documented, please contact the authors).
Clicking on a box swaps the value in that square with the value in the square immediately to its right (it wraps, so clicking on the last box will swap with the first). Holding down shift transposes the note 'up' by a semitone, and holding down apple transposes the note 'down' by a semitone. Holding down option does the same by an octave, control does the same by a perfect fifth, and control+option does so by a major third. Holding shift+apple and clicking a note will turn it into a rest (indicated by "r"), shift+apple+clicking again will turn it back to the original note. Note that a rest placed on an active (i.e., has a blue LED) note in a lower row will silence all notes while it remains active.
"`" (tilde) or clicking "play" sets the GUI to trigger note events when the beat is advanced. " " (spacebar) momentarily enables playing while it is held down, and disables playing when it is released (note: with tilde enabled, pressing spacebar will continue playing, and releasing it will 'stop' playing). "m", when held down, prevents the server beat from advancing the local beat. "n" advances the beat manually. This is best used by holding down "m", then tapping "n" to play a rhythm. "b", when held down, waits for the next server beat, advances once, and prevents subsequent server beats from advancing the local beat. This is best used by holding down "m" and "b", and is useful for playing an isolated note or notes together, like a sting at the end of a piece (esp. at a slow tempo).
Code Modification (how to add new tone rows, sections, and more)
TODO: talk about adding tone rows, sections, etc. This should be better once we clean up the code... TODO: describe the various row_format values
Jot down any ideas for a performance or its score here. Possible issues to consider:
1) The role of the conductor (which gestures? use a computer to spread information? control other players' sounds directly?)
2) The format of the score (gestures alone? hold up signs? server-based instructions sent to each player?)
3) Improvisation (to what extent should it be allowed? in what way(s)?)
4) Number of players (how many total? should they be split into sections? how many sections? should sections be fixed before the piece, or should we allow 'dynamic section allocation'? or both?)
List of Score/Performance Ideas
Conductor-controlled timbre w/ Server-based tone selection
A master server runs and controls the tonal evolution of the piece. As the piece transitions from one stage to the next, performers will see their GUIs transition from one set of permutations to another. The conductor can control parameters of the sound such as texture, density, etc., and performers are also left to improvise. The server can fade the piece away by itself when the score is over. Also, the conductor could be given high-level, real-time control over the messages that the server is sending out. The conductor could even have a midi controller and use it to send out permutations in a more spontaneous way. That could sound cool.
People should solo
Everyone not soloing is instructed to hold a certain texture, while the soloist improvises. In a large performance, this means that one computer should be up front and center, and soloists alternate by going up to the front laptop.
Priority 1 (Absolutely needs to be fixed asap):
Priority 2 (Would make the instrument run more smoothly/efficiently):
- We can make the instrument able to handle more of a payload by eliminating MAUI entirely and using command-line Chuck to run it. This means that we need to use a different GUI via OSC messages from the command-line version.
Priority 3 (Minor issues):
Priority 1 (Should be in there asap):
Priority 2 (Would definitely be nice):
Priority 3 (Might consider experimenting with):
- Timbre selection does not need to be discrete. We could experiment with a slider.
- It might be worth experimenting with a Joystick for the x/y-axis control of the filter/detuning. It would be set up so that the trigger on the joystick needs to be held in order for the detuning (y-axis) to have any effect, while the filter (x-axis) would always have effect. The little circle thingy at the base makes a good way to control master volume as well. The joystick might make more sense than the touchpad, but the con is that everyone who's playing needs a joystick. Maybe we could have it use the joystick if one is plugged in and otherwise default to the trackpad.
Here is the set of chuck files. Set the miniAudicle's root path to a directory containing these files, and then simply add permutations.ck. Only one machine should add the server.
Rather than opening the entire piece in the miniAudicle, you can also download the command-line version of ChucK (http://chuck.stanford.edu). Then, you can run the sound-generating portion of the code from the command line while running the interactive portion within miniAudicle (sadly, you cannot run the GUI from the command line). It will boost performance by around 150%, and it's much more stable, so it's a good idea if possible. Here's what to do:
In your terminal, navigate to the permutations folder you get off of the wiki. Now, type "chuck --probe". This shows the list of all possible audio interfaces connected to your computer. Find the one you would like by id number, and then remember that number. Let's say that the number is "4".
In a command line, enter the following: chuck -c2 --dac4 class/supersaw.ck scripts/client_main_loop.ck
(where the "4" in --dac4 is your number)
This will begin running the sound portion of the code.
Now, open up the miniAudicle. Go to preferences and click the "miscellaneous" tab. Set the file path to the permutations folder you unzipped. Click OK.
Still in the miniAudicle, go to file --> open, and open the following three files from the permutations folder:
Inside the "server_main_loop" window, look at line 11 of the code and make sure that it reads ["localhost"] @=> string clients; (if you are playing in a group, replace localhost by the players' computers' names. ex: ["jasoncomp.local", "ge.local", "cheesefoodsandwich.local"] @=> string clients;
Save the file and close it.
Finally, click on "Start Virtual Machine," and click "add shred" once for each of the two files that are still open. Hit the "`" (tilde) key to start making sound. Now you can play the instrument (beginners, see the "How to Play" section of this page).
This permutations project was created out of a merging of three prior projects.
Jason's Supersaw project is located here: Supersaw
Jacob's Permutations code is located here: permutations_original.ck
Jay's Arpeggiator code is located here: arpeggiator.ck