Spatialization in m4l

    May 05 2014 | 2:59 pm
    I need to create a 8/12 channel spatializer in maxforlive. So far I've been able to make something that works using 12 returns, one dial controlling each send.
    My problem is that I would need to make a sound rotate between 8 or 12 speakers with a constant intensity, and I'm finding myself unable to find a good algorithm for that. Looking at pan2s in the examples folder it appears the volume of a speaker has to decrease from 1 to 0 in a square root function. But even when testing this example with a white noise, the sound is louder when it's on one speaker than when it's between 2 speakers.
    Anyone worked on something similar? I had a look to the Icst ambisonics library but I can't find how the volume of a track is controlled. Has anyone worked with some of these libraries inside m4l?
    thanks, J.

    • May 05 2014 | 3:46 pm
      Unless Ableton has pulled a rabbit out of their hat recently, there is no way to do 'true' and accurate multichannel work natively in Live (ie. not relying on sends). Regarding the panning algorithm - and you probably need to look at 'constant intensity panning' (see here: the transition 'between' sends most likely won't follow the same law anyway, so you'll have to tailor a 'panning law' of sorts depending on the characteristics of Live's send gains.
      So, it comes down to two choices depending on how crucial to your project Lives other features are: Find a way of routing audio sources from Live/M4L - perhaps something like this (which I have't tried) - OR Use a host, like Max (or perhaps REAPER) that can enable flexible multichannel routing internally.
    • May 07 2014 | 6:36 pm
      I need to use it in live, and to record automations, etc, so I'm still searching the good mathematic function which will work well working with ableton's sends.
      I reproduced these algorithms described in 'constant intensity panning', and they don't work that good on a transition between ableton's sends. At the moment what works better for the transition is to use a 5th square root (0 Log, sin, etc., don't work well.
    • May 08 2014 | 12:42 pm
      You need just rotation or also 2D position?
    • May 08 2014 | 12:44 pm
      mostly rotation
    • May 08 2014 | 2:01 pm
      Ok, This is how you can do it and it doesn't involves max for live at all.
      Lets say you want to specialise an operator synth over a circular array of 8 speakers.
      1) Right after the operator place an empty audio rack and name it "Array Panner" and set "Audio To" to Sends Only
      2) Create 9 empty layers and name them from 1 to 9
      3) Edit zones for al layers and fades as pic 1 and pic 2
      4) Create nine audio tracks and name them s1 to s9
      5) Route each one to a single speaker, track s1 to speaker 1, s2 to speaker 2... IMPORTANT s9 goes also to speaker 1!
      6) Select audio from for each track as follows: (operator track's name is "operator")
      s1: Audio From 1-Operator Array Panner | 1 | Post Mixer
      s2: Audio From 1-Operator Array Panner | 2 | Post Mixer
      s2: Audio From 1-Operator Array Panner | 3 | Post Mixer
      ...till s9.
      7) Activate Monitoring for all the S tracks.
      It should look like pic 3
      Now you can use the Chain Select Ruler (pic4) control to pan smoothly between all the speakers, automate it or map it to an external controller.
      If you need to compensate for something, just modify the zones and crossfades till you get what you need.
      Happy panning!
    • May 08 2014 | 2:02 pm
      ...and the project in case you need it
    • May 08 2014 | 3:34 pm
      Thanks, I tried with 4 speakers, works nicely ! Didn't know this method in live.
      Comparing with my m4l patch, I don't get which one works better. I need to test with more speakers..
    • May 08 2014 | 4:04 pm
      great! let me know how it goes!
    • May 08 2014 | 4:27 pm
      I also might have a solution for you. For a recent project I developed an Ambisonic based M4L device/Patch pair. It not in a release stable version at the moment therefore I would not like to publish here. But If you are interested you can e-mail me (jan[at]janmech[dot].de). It works, an I produced a multi-channel audio installation with it. The actual spatialziation is done by the max patch that receive the audio via external routing (i.e. SoundFlower and the information about the position in space of a Live Channel.) All movements can be recorded as automation in Live. As ambisonic is the base it't pretty flexible in loudspeaker setup, numbers of speakers and input channels.
      Let me know if you are interested.
    • May 08 2014 | 4:32 pm
      Nice work Jan, what about minimal latency vs stability?
      Also Salvador, here is a quadra-panner I did using only empty Audio Racks.
    • May 08 2014 | 5:05 pm
      hey GBRAVETTI,
      latency is a problem, as the IO vectors have to be rather large when using SoundFlower. I haven't tried JackAudio as a routing interface wich some people claim is superior to SoundFlower in some aspects. My bet for using ist with many speakers/channels in a live performance hardware routing would be necessary. It served me as a production tool, at the end I recorded the entire pice, so latency wasn't such a problem.
      The device itself is stable, but there are still some smaller bugs, the distance filter-option is not yet there where it should be... . There is also a joystick control build in which I used to record more organic movements, but this part is only designed to work with the joysticks I had ... These are mainly the reasons why I don't consider it as done.
    • May 09 2014 | 10:32 am
      regarding the earlier part of this thread regarding equal power panning using live sends:
      I did some work on this with Live 8 to make a equal-power 8 channel panner that compensated for the response curve of the Live send pot. Details at:
      I don't know if the response has changed for Live 9.
    • May 09 2014 | 4:47 pm
      Jan, Sounds great, hope Jack Audio improves latency etc,
    • May 14 2014 | 4:33 pm
      @Richard Garrett thanks, I'm looking to your solution, it seems interesting. will see how it goes. I'd like to find an arithmetic solution but it seems to be hard to find.
      @Jan I emailed you, I'm interested in having a look to your patch.
    • Jun 03 2015 | 10:09 am
      Hi Jan, I get a "Unrouteable address" for your mail address..
      Ciao, Christian
    • Jun 03 2015 | 10:25 am
      Hi Cristian, can you try to contact me via my website: I'll send you my email in the reply.
    • Jan 05 2017 | 6:25 pm
      Hi Guys,
      I am happy I found this topic. I am constructing a sound installation for a large maquette and want to make sound travel along a series of speakers. I decided to work with ableton live because I'm the most familiar with it and have a deadline to meet. Along the process I discovered that multichannel audio work is not exactly live's "niche" and researched some workarounds. Every solution has its flipside, being mainly that live is getting a bit quirky and sonic reproduction is a bit unpredictable at times. Anyway it is with great pleasure and admiration I read your chat and would like to ask a few questions.
      @ Gbravetti,
      Hi thanks for your explanation and especially the sample project. I imported it in live 9.7.3 and it works like a charm. There are a few things that puzzle me 1 When i try to recreate your patch I cannot create an empty instrument rack after an instrument. I created a similar rack before but then copied the sampler as well. Your approach is much nimbler but I can't seem to recreate it. 2 Where is the audio going????. I don't see it in the sends,only in the receiving channels. I cannot see any routing info in the Array Panner. Again I made something similar but then used abletons "external effect" plugin to route the signal via soundflower. This works but makes my live set bulkier and sometimes unstable.
      @Jan Do you still develop your ambisonic plugin/patch? If so I would be glad to try it if possible.
      Hope to hear from you. Best Regards,Ruud
    • Jan 05 2017 | 6:49 pm
      Hey Ruud,
      1) You can't create more than one instrument rack per track, the Quadra Panner rack is an Audio Effect Rack 2) If you check the instrument's track's output it says Sends Only, that's because you don't want audio going though. Instead you "suck" audio on the four channels (f L, f R, b L, b R). Those channels are connected to the 4 independent outs on your sound card.
      Basically you need to create those 4 tracks for each Quadra Panner you use on your Live Set. Then set the Audio From on each accordingly.
      If you need further help feel free to contact me on my email ( or Facebook (/gustavobravetti).
      Good luck!