Wednesday, 16 November 2016

Creating a Matrix Mixer in Supercollider (GUI, Mapping, Improvements Over Analogue)

Perhaps, counterintuitively, the first supercollider patch I created was a basic matrix mixer with a gui. While analogue mixers seem to be a favourite amongst those exploring feedback based music. I decided Supercollider would leave a lot more flexibility and potential for routing insanity as well as (eventually) the ability to create the exact number of inputs the user wants on demand.

The first step was to create a GUI for my matrix mixer, a knob based GUI was chosen as I felt people who already had an understanding of matrix mixers would would clearly be able to see and somehow it just feels more intuitive than using faders. 


      ⬇️   ⬇️   ⬇️   ⬇️


➡️

➡️

➡️

➡️



The signal flows has the inputs at the top and the outputs at the side. This was chosen as it felt similar to a standard mixer when using aux sends(also essentially matrix a mixer). Below is an excerpt of the code used to create the GUI. As it stands this is in basic form, eventually I want to make use of Arrays in order to create an expandable or shrinkable system based on the users needs.



The next step in the creation of the GUI was to make the map the knobs to the matrix mixer SynthDef, allowing realtime control of the mix. Another short excerpt of code below.



After some thought on the limitations of an analogue matrix mixer I decided that one of the major downsides in its use as a performance tool is that due to the knob based layout only a few parameters can be changed at once (unless some kind of elastic band mechanics is added). Another factor considered is that quick motions across multiple knobs cannot be achieved, perhaps limiting the potential for sounds with quick attacks. 

This led me to look for different ways in which to control a matrix mixer. I eventually decided that it should be based around a touch sensitive, pressure based system as by moving away from a traditional knob based format it will encourage the performer to explore new ways of playing with a system. Furthermore I think pressure may even be more intuitive and tactile than a knob as it has more in common with traditional musical instruments(most of the time you only turn a knob is when you're tuning!).  As a 4x4 grid system had been chosen very quickly it was easy to see a viable option for control.


Akai MPC 2000XL

The gridded, 16 pad based layout of an MPC would be perfect for this purpose. After looking into the midi implementation for the newer MPC studio I found that polyphonic aftertouch was the perfect option for what I wanted to do.

To me it was essential that the GUI would update with the MIDI input as it would make the experience a lot easier to understand than just the pad based interface alone. To hook this up the MIDIin class of Supercollider was used early on I found some issues with getting the GUI knobs to update but found a way in the end. One quirk of this is that rather than the MIDI ins being sent straight to the SynthDef, the values are sent to the GUI, then updated through the second code posted here. In practice no issues as a result of this were noticed.



I make use of .defer because 'defer avoids complaints from the system that the GUI is being updated outside of a safe thread; it pushes the code through to the AppClock'. 

Further exploration into expanding the control of the mixer not only from midi and onscreen data but also from the environment around it. There are many possibilities for further control here.




No comments:

Post a Comment