Ableton Live Auto Filter - Filter Type MIDI Mapping

Discuss problems and solutions.
Post Reply
fourhexagons
Newbie
Posts: 4
Joined: 03 Nov 2013 01:07

Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by fourhexagons »

Hello all,

I'm new here and new to Lemur. Up to this point, I used TouchOSC to control Ableton Live. I'm having an issue translating a solution over to the Lemur environment. Let me explain:

Ableton's Auto Filter uses a strange method of MIDI mapping the filter type
  • LP = CC [x] value range 0-21
    HP = CC [x] value range 22-63
    BP = CC [x] value range 64-105
    NOTCH = CC [x] value range 106-127
My TouchOSC solution
I used OSCulator to divide the entire 0-127 into those 4 sections so that I was able to have a Multi-Toggle that would select the 4 different filter types radio-button style.
OSCulator
OSCulator
filt-type-scalings.png (25.17 KiB) Viewed 2113 times
TouchOSC
TouchOSC
touchOSC-filter.png (17.23 KiB) Viewed 2113 times
I'm now trying to do this with the Lemur app and I've hit a roadblock. So far I have used the Switches object set up with 1 column and 4 rows acting as radio buttons. I then label them using

Code: Select all

setattribute(FilterType,'labels',{'LP','HP','BP','NT'});
.
Lemur
Lemur
lemur-filter.png (26.28 KiB) Viewed 2113 times
The issue
But the issue is that I can either choose to send different CC's or CC's on different MIDI channels out each of the 4 'buttons', but I don't know how to send a different portion of the values 0-127 for the same CC with each button.

Can someone offer a solution?

Thanks in advance!
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by Macciza »

Hi
As usual there are probably several ways of doing what you want . .

If you wanted to continue using OSCulator (for whatever reason-not sure why) you could use OSC from Lemur, by using custom names to duplicate your previous namings and set appropriate values to be sent etc . . .

Doing it natively in Lemur isn't too difficult either though it helps if you understand how things work in Lemur to help work out a possible solution . .

Ok, that Switches object returns an array of x values when it gets pressed i.e.{1,0,0,0} for 1st button (put Switches.x in a Monitor to see) and if you go to set it up its mapping to send CC's and enter 1 for controller it ranges from CC 1 to 4
Now look at the next line for value - It will have x[0...3] meaning it will send each x value out on the different channels and scale them 0 - 127 - This gives you a switch that send 0-127 on separate CC's - standard usage . . .
So how do we get other data there? Make a new variable/expression under the Switch. Lets call it 'value' (as it is the value we will be sending). But how to get different values? Well what values do we get from the switch? see earlier - an array . . .
Now lets narrow it down to a single value representing which switch is pressed - firstof(x) will return 0 to n for which switch is pressed (put firstof(Switches.x) in a Monitor to see) so no we have 0,1,2,3 as our data - we know which switch is pressed
Now lets range the data and MidiMap it - multiplying works well here, and if we want to cover 0-127 then 0*anything is 0, and 3 time 'something' equals 127 (42? - Life the Universe etc) Either use 127/3 or even just 42 . . .
So the end result is firstof(x)*(127/3) or firstof(x)*42 - Now map this variable set the CC, value is now value[0] - a single value. Now set the execution to ArrowUp (message from 0 to Positive) so it only sends when you press the button
Voila - different values of the same CC are now being sent . . .

Another option would be to use an array - handy if the values are not evenly spaced. Now remember how we got 0-3 out of the switch? We can use that to index into an array by using 'array' to get at each value in the array . . .
So if you want 0,42,84,127 you would make that the array i.e. {0, 42, 84, 127} and add the 'firstof(x)' bit to index into it - End result {0, 42, 84, 127}[firstof(x)] or even use {127,84,42,0} as the array if you want invert the listings . . .

Theres also other ways of doing it with scripting or other objects if you want a different look etc but we'll just leave that for later . . .

Hope that helps . . ..
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by Traxus »

I've done some work with mapping the Auto Filter in Live. Look at these templates:

http://liine.net/en/community/user-library/view/363/

http://liine.net/en/community/user-library/view/362/
fourhexagons
Newbie
Posts: 4
Joined: 03 Nov 2013 01:07

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by fourhexagons »

Wow. Macciza. Thank you for the tutorial. That was really nicely explained. Nice Hitchhiker's Guide to the Galaxy reference, too. I got the firstof(x)*42 expression to work great, but I decided that the array approach was better in case I wanted to move any of the values around. I also ended up using Switches with an array to select LFO Types instead of the CustomButtons I had in the image.

But now, I want to better understand how arrays work with other devices because there are some applications where I'd like to 'skip a few values' so to speak.

For example, I really like the Psychedelay in Native Instruments' Guitar Rig. I currently have a single MultiSlider divided into 13 sections to adjust the amount of half-steps up that the delay pitch is transposed. The thing is, the musical intervals of Unison, M2, P4, P5, M6, Octave are really the only ones that suit my taste. When selecting these divisions of the MultiSlider, it's easy to accidentally hit one of the in-between intervals and make everything sound terrible as the delay continues to feed back. Therefore, having 6 switches to choose only these intervals would be great.

So far, I've created a 6-division MultiSlider. I'm using MultiSlider instead of Switches so that I can slide my finger between values without lifting. I understand that I need to assign an array with these values {0, 21, 53, 74, 95, 127}, but I'm not sure where and how to assign this array. When I try to use the approach we used with the Switches object, and create this expression: value={0, 21, 53, 74, 95, 127}[firstof(x)] on the MultiSlider, I just get the output 21 when it's off and 0 for the other positions. I figure this is because the MultiSlider can't use firstof(x) the way that Switches can.

Any additional help is appreciated. Thanks again.

Oh, and Traxus, thanks for mentioning those templates. I had tried them out earlier, but the actual mapping seems to be missing. Also, I should point out that your LP and HP labels are reversed.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by Macciza »

Hi
No worries - it was a bit of practice for a blog/vlog that I am considering. . . .

So the crux of the biscuit is this - What does 'firstof(x)' return for a MultiSlider?
A good trick is to chuck a Monitor on screen and title it Debug (as a reminder) then throw whatever you want to look at into it . . .
So with your Monitor in place - put firstof(MultiSlider.x) into and have a look - hmm a value of 1 at 0, and 0 when used, have a look at firstof(a) definition in the manual . ..
It returns the first nonnull value in an array or the size of the array if they are all non null - 0 is the first Slider, and 1 is the size of array - put 2 sliders in the MultiSlider and its 0 & 2.
So what about just the x value - it returns 0-1. So with just 1 Slider you could do the same sort as before to convert it to 0-5 (6 values) by multiplying by 5. Chuck that in the debug monitor -MultiSlider.x*5 and voila 0-5 . . .
So now we have the 0-5 values we need and you can throw that into the other expression and you get {0, 21, 53, 74, 95, 127}[x*5] - Job done , map as needed . . .

Of course you could always just use a Switches array like we did previously but this time have a look at the Behaviours panel - Set Paint 'on' and now you can swipe across different values ;~}

Cheers
PS Remember to check details in the manual, and experiment a bit - I have a printed copy that I keep on hand when coding . ..
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
fourhexagons
Newbie
Posts: 4
Joined: 03 Nov 2013 01:07

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by fourhexagons »

Macciza, again with the awesomeness and a Zappa reference thrown in. Nicely done.

First off, the paint behavior was exactly the easy solution I need (all over my project)!

But for my own educational understanding and growth in all things Lemur, I appreciate the continuation of the tutorial. I'm now beginning to understand the importance of using Monitor to debug, and setting it up labeled 'Debug' is a great tool. Additionally, I see now that Chapter 13 of the manual is a good reference (RTFM) :roll:

So yeah, I'm starting to get it. The MultiSlider x value just outputs 0-1 and so we multiply the x value times however many divisions we want in our array. We express it as [x*5] after the array enclosed in {these brackets}. I'm now at the point of understanding where I know that 'if I do that, I'll get the result I want', but I don't quite understand why it is so. Is it just that 'that's how arrays work'? That is, {the, array, between, commas}[math in brackets that makes the variable equal the number of values in the array] ?

I'm pretty new to programming, so perhaps it will just take more time, study, and experimentation to understand the syntax.

I welcome any comments you might have, but this basically concludes my Filter Mapping questions for now. I do still have a couple other questions about setting up this current project, so when I get to them, I'll just post them in individual threads to help keep it organized. I have a couple gigs coming up this weekend, and need the essential parts of this project to be in working order very soon to start to get comfortable with actually using it.

Many thanks for your all of your help. I definitely encourage you to put your knack of explaining this stuff in a blog if you don't already.
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Ableton Live Auto Filter - Filter Type MIDI Mapping

Post by Macciza »

No worries,

Thought that Paint was what you were after but took the opportunity to flesh out where you were headed . .

It is basically a bit of both - it's how arrays work and how they work in Lemur.
Its basically C style syntax but pared down into just Lemur specific stuff without a lot of the general C stuff if that makes sense . .
Generally arrays are accessed as you describe - {bunch of values}[which value] but how different functions operate on them does vary from various other implementations.

The next step is to take the leap to "I want to get this result, so I need to do . . . this!" And think about and solve the problem some how . .
Read some intro to programming stuff - general logic then just experiment in Lemur
Duplicate stuff then edit it and see what happens - surprise yourself . .

Oh and check out anything that looks interesting in the User Library and work out how it works and use it it or alter to suite . . .

Cheers
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Post Reply