Showing posts with label Chromatic remapping. Show all posts
Showing posts with label Chromatic remapping. Show all posts

Tuesday, 3 September 2019

Frequency-to-Colour display in MaxForLive for Ableton Live

It all started with an enquiry on Facebook. Kovacic Matej asked about how to display 'human chakras, colors and their frequencies' in Ableton Live. After some discussion about spectrum analyser plug-ins, a link to a web-site was given and the thread went quiet...

As part of my occasional 'fix a random query on an Ableton forum' series, I have created a MaxForLive plug-in for Ableton Live called AUDcolours that allows the generic mapping of frequency to colour. To make the specific example in the thread easier, plus for musical use, there are two presets: one is the 'human chairs' that was given in the Facebook thread; the other is the musical notes  for one octave - CDEFGABC. There are seven (of course!) additional preset memories for your own mappings.

AUDcolours


There are quite a lot of controls to enable generic mapping of frequency to colour. Each of the eight vertical bars on the left side of the AUDcolours plug-in has a frequency control, Q or resonance control, an audio thru/mute switch (X) and a colour swatch. Each vertical bar can be tuned to any frequency from 10 Hz to 10 kHz, and the width can be set using the Q (resonance) control - low values give wide responses, whilst high values give narrow responses. A medium setting is probably best for initial testing. In the screenshot above, the meter is showing that a frequency of about 261 Hz is being input, and the bar's background has lit up with Red (as set by the swatch UI object). The audio thru/mute switch allows you to listen to one or more specific bars when the X is lit up with bright purple. The swatch is a user interface device that lets you set the colour of the vertical bar.

On the right hand side of AUDcolours are common controls. The vertical group of squares are the usual MaxForLive preset memory slots. Red means empty, White is the current selected preset memory, and Grey means that there are values stored inside the preset memory slot. Underneath the memory slots are the two fixed presets: Chakras and CDEFGABC. On the far right hand side there is a Wet/Dry mix control for the audio, then the Threshold rotary control that determines how loud the input needs to be to lit the vertical bar up with colour (Start high and reduce until you get the triggering just working. Too low will trigger more than one bar!). There are also common controls that can show or hide the rotary controls, the audio level meters, or the colour swatches. Finally, in the lower right hand corner, there is a common control for the audio thru/mute toggle controls (X) - this turns all the Xs on or off at once. If you set Wet/Dry to fully clockwise (100%) then you will hear only the bars which have an X lit up.

Getting AUDcolours

You can get AUDcolours on https://www.maxforlive.com/library/device/5686/audcolours

Here are the instructions for what to do with the .amxd file that you download from MaxforLive.com:

     https://synthesizerwriter.blogspot.co.uk/2017/12/where-do-i-put-downloaded-amxd.html

(In Live 10, you can also just double-click on the .amxd file, but this puts the device in the same folder as all of the factory devices...)

Oh, yes, and sometimes last-minute fixes do get added, which is why sometimes the blog post is behind the version number of MaxForLive.com...

Modular Equivalents

In terms of basic modular equivalents, then AUDcolours 0v01 would probably require eight band-pass filters, with eight Utility/Logic modules to do the threshold detection, and eight colour panels to give the colour outputs to give the same sort of functionality, plus a voltage source panel to give the common control over threshold, giving a total of about 25 ME.

And here's a link to click on if you find my writing informative:



Sunday, 20 August 2017

Using Chromatic Remapping To Generate Musical Inspiration

Previously, I looked in some depth at the Ableton 'Scale' effect, one of the quieter backwaters of the 'built-in' MIDI effects. That blog started out concentrating on how to invert a keyboard, but ended up producing lots of chromatic maps that take incoming notes and map them to different outgoing note pitches. Which led to another investigation, the results of which you are now reading...

While I was producing the variations on chromatic inverted scales for the previous blog, I realised that these were all specific cases of a much more general set: the set of remapping of incoming notes to single outgoing notes on a one-to-one basis. In other words, each and every incoming note is converted to one, and only one, outgoing note. There are a lot of these maps: there are 12 input notes and 12 output notes, so I think that means that there are 12! combinations, which is just under 480 million. So me making 30-odd of them available is a tiny fraction of the whole set! And that's where I realised that I could make them all available in a MaxForLive plug-in utility, and MIDI_ChromatixT_mr was born.


In the screenshot, MIDI_Chromatix_mr is shown in its normal location in the MIDI processing chain - just in front of the Scale effect (Alternatively, you could use any of the many available MIDI Scale-type effects available in MaxForLive). The diagram below shows how everything fits together:


Incoming notes are mapped to different pitches by MIDI_ChromatixT_mr, and then restricted to the chosen notes in the scale set by the Scale effect. In the example screenshot above, the C minor preset scale has been altered so that only 5 output pitches can occur. This constrains the output notes to just the pitches C, D#, F, G# and A#. Incoming notes can be at any pitch, and they will be mapped to new pitches by the map. So an incoming A might be mapped to C, whilst an F could be mapped to a D#, etc. 


The grid in MIDI_ChromatixT_mr sets the mapping of incoming notes. In the screenshot above, the vertical cursor line is showing an incoming D (moving across from left to right), whilst the orange marker is in the A# row (counting up from bottom to top). Now, whilst it is possible to edit the mappings (Click on the 'Auto/Fix' button so it shows 'Fix', and the mapping will be fixed and editable), the 'Generate' button creates new random mappings with a single click. So it is easy to just keep clicking on the 'Generate' button until it has created a random mapping that you like - the usual M4L store/recall buttons on the left can be used to save it if you wish. 

But the really interesting part of MIDI_ChromatixT_mr is the 'Auto' button, when it is set to 'Auto' then the 'Generat' button will be pressed every time the bar count to the left of the 'Auto' button matches the number set in the pop-up selector on the far left. So if the selector is set to 4, then every 4 bars, a new chromatic mapping will be produced, and incoming notes will be mapped using that new mapping instead of the one used in the previous 4 bars. This then repeats every 4 bars.

What this means is that every time the bar count reaches the number of bars shown by the selector, then incoming notes will be mapped differently, using a new one of the millions of possible chromatic mappings. So whatever notes are in the (monophonic is recommended) track sequence that is driving MIDI_ChromatixT_mr, the output will be a scale-constrained version of the remapped versions of them. The D to A# mapping in one set of bars could be replaced with a D to G# in the next set of bars, then a D to F mapping in the next set of bars. 

It's a bit like shuffling cards and then dealing them out for a card game. The shuffling means that you get a different hand of cards each time, but the number of cards you get (and the game you are playing) are fixed. So whilst the notes get remapped to new pitched notes, they are still constrained to just the notes in the scale you have set. 

What this does musically is take a monophonic sequence in a track, and play those notes, remapped to new pitches whilst still being constrained by the scale, and yet the timing and velocity of those new notes remains exactly as it was in the original sequence. So it's a bit like an randomiser and a bit like an arpeggiator, but until that 'Generate' button is activated, the mapping is fixed, so if you find a mapping that you like, click on the 'Auto' button so that it says 'Fix', and then session record the output with the 'doughnut' session record button in Live. Of course, an easy alternative is just to let it free run, generating new mappings every 4 or 8 bars, and to record everything, and then just extract the bits you like. 

In a few minutes, MIDI_ChromatixT_mr will run through lots of variations of your monophonic track sequence, all following the timing and the velocity exactly, but with different pitches every time the 'Generate' happens. It's a bit like having an assistant who can keep running through variations, one after the other, and who never gets tired or bored, and never loses patience. MIDI_ChromatixT_mr is an automatic 'Can you just do that twisted around a bit?' generator.

Demonstration 1



The problem with random music generators is the they are often too random, and when they do come up with something interesting, then it has happened and gone almost before you realise. MIDI_ChromatixT_mr repeats each random variation for the number of times that you set the bar selector, and so if it is set to 4 bars, then you will hear the same variation 4 times, before it moves on to the next one. This is probably best heard rather than described in words, so here's a demonstration of a simplee piano and bass duet produced entirely from an 8-note track sequence and a 4 note bass track sequence, with MIDI_ChromtixT_mr producing all the variations every 4 bars. Once the 12 notes have been set in the track sequences, everything else is just a straight recording. 

Demonstration 2


This second demonstration has the same bass, and has two independently variations piano lines using the same technique, spaced an octave apart. 


The top line adds a 16 note sequence, but with a random velocity added to provide additional variety. Again, once set running, the recording has had no user manipulation. 


Download

As usual, MIDI_ChromatixT_mr can be downloaded from MaxForLive.com. Enjoy!

The Name?

Why such a weird name? Well, I thought about all sorts of variations (!) on chromatic remapped, or even diffuser (cryptographers call this type of device a 'diffuser') and the first version was completely manual and was 'Chromatix. When I then added the automatic 'every n-bars' generation feature, then it needed something to indicate time, so I added a 'T' at the end. As a result, you aren't likely to forget this M4L device.

Monophonic?


Yep. Try poly tracks and see what happens...