VVI-World

Blog of Bouke his Musical Trips

  • Increase font size
  • Default font size
  • Decrease font size
VVI-World: Blog of Bouke his Musical Trips

Back to the drawing board...

E-mail Print PDF
User Rating: / 2
PoorBest 
Last night I finished the name, color and play status collection from available clips and fill the pad object with it (for the M4L Lemur ClipLauncher). The procedure works great, and the results are also 'ok'. But as the amount of visible tracks and scenes rise, the time to get the name, color and play status takes a very long time. I've tested this with a 16x16 grid, but scrolling through it just takes too long. So I guess it's back to the drawing board - I'm already looking at the "coll" object to cache the information and read from there. This project is becoming more and more challenging.
 

"route" vs. "zl delace" vs. "unpack"

E-mail Print PDF
User Rating: / 3
PoorBest 

Today I was wondering whether "route", "zl delace" and "unpack" is the fastest way to filter out the output of live.object (or live.observer), to write the best possible code. I discussed this today with Julien Bayleand it turns out (ROFL): there is no difference in performance. Check out this patch yourself (create some tracks in your live set):

<pre><code>
----------begin_max5_patcher----------
1413.3oc0a0zjiZCD8r2p1+CTT43rSgjZ0RjaoxgbI4VpbI0VagsYmgDL3xf
2LY1J+2CffwryrdP.BjlKlAY9n6mdcqteVyWe+613uM+g3Beuez6O81r4qUi
roYr5Q1zMvF+CQOrKMpn4B82dtrLOy+l1u6XT4t6Sxt6Smh2UpdRgrfaCtwC
X75CzftO89X2Mkc9PRVZbYySjzaz7ykuXX0Xk+6wX0i2eaT1c9WdXI6arq7s
+0GDD+lA+u2+t5iUGtQa+p5suM9zS90myyJyhNz7N8+oSIQoupKGnb4vFWFg
o4xz9u7hjGad4DZ0C6ZPQRVo+MuJhPmAhD+OUOhmb6x3GZ7V+xjCyFnPtBuF
.nnlBn9bZdTCTcEXhYdX5b1wnc+s2CdOLQrRnBcXpvIQvZQpdEXBV.1jWpW5
DQHDa.kPENQukac.had.5wTu6Nke93LYQhlHNBJWqPtWAkPyiRGOUkKzqAVl
EN0lYBCmVzVvPvTeXPLcX3PbQQzcwuDGtK1Dn.UksAoMbF4XIKjwSV99DEo4
IJoIeI91puo1kmWDkZoLIYZATFCiBWhbxambN4N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ZOiSuk7F0DNi2uWENX3dUPs5bFsTYDZUWM2NqpvQs
EWb80bPuoUNtPx8zVYFPjJw8ublQ7NPOdAeg7NIzy4ngfYcNt9B6t97Jtd7J
6TPfdzBvRoKzZwKvNKdA503icV1GzpYRXzIZYxdKrRYLytvJnU6ZL6zzASqv
XvNM5BLsluGcoygxdUNS.zrUNCZUN..1CRG13rCYDnZMeao0TzKsscpOtI6w
fpt.1Issd+.0r4qdZ8.UG9evJZMjp
-----------end_max5_patcher-----------
</code></pre>

This will give you this patch:

SpeedTest
You see, speed difference is none.

 

Empty clip names

E-mail Print PDF
User Rating: / 2
PoorBest 

Today I had to work around an issue with clipnames. When there is a clip present, but the name is empty, live.object will not bang the output (not even a bang!). To illustrate: start a new project in live, create a clip on a midi track, or put something in the Audio track. Next create new M4L device and put this in:

<pre><code>
----------begin_max5_patcher----------
788.3oc0X00aaBCE8YpT+OXwyrHrw70da+NVqh.hWh2HPD3z00p8ee1FSZR6
X3vGwrGpr70twm6gy85i7q2emkcZ4yjZavmAeEXY8JOhkLlHhUa.K68IOmkm
TK2ncA4mkoe21QsFi7LSFup7Hi.JR1SNs12JKXx.h0+REMI+zRGRXY6nEaWW
QxXM..6ux0AfhjCgdxItqbAO19+TbbOsHmvj3.dVT9I2FFc9YWSeQd1PD+GS
EuYurecfzbp11N7+d6PnajnkmheB4ZKC966uSLxGbzlkROxXkE8mtP+17bHY
KryrJMoXaGYk2vyp8j55jsjO9wmme6.4zmHqqILvSzZZZNYMqJI6G0.WPVN8
v557RV6jQIQBZXK+HIAF0Iog5gzzWh72IR7vIxtJhNTQKXiuHxSQTwCSV41G
CcNK3O8r.CjBxGEA.8kZDOzJ+aSWDY8V2cRBlgZtsjIPo.iaTJHCWKEN8pHQ
6nUhFSiifbkC9gCqTxaX2G0sRJZlHJ9JhLeTWcikEcAA8PUysVJd5onQatwq
4RKO3hwcCLdF5I8fM3A6AKhZtWGdVqay0QBNCEZujCpHaGpBxqgWTteBvCqJ
aRkPAyoAYUBe6cHCw++5PVQZKDKxPzBzhrhhvt2LOxQyiEYtIYP53HAkOYna
3vLJiGrQ4SFlc9WkhgKOeysMfQKBiyAKOeysRqElw4knu4VsT3hv3L78TTyt
34YwGdjPYxHV3cDWc4wpr1iQ4QvAbVBsgTynEILJ+x+21UzkaZGcyFRwEsY2
S2bnj24WADvic+4Targb0AaHey.NAwA6EbwWtq9AWfxSPSiqFeUWNS0ZC5Bk
WJHlMcYT+zcnYn6Hs.WfY.WnVfK1LfCqE3LTItmVfCaFvEqE3bMB3fZANXv0
1+wi631+zST6GgOMaZfsVn1LUJhpXTuX6pIz3nFy6RmVXOkKhKl4Kes.LLPt
SwrogrilGMB1eV0HhuCd8h5qtgEFEc1SpqxA4rIC05w0lQY2qWECc2oNzlY7
b.05lSHxLfSKhyLXSKijvQCMQ.9vePyTHMC
-----------end_max5_patcher-----------
</code></pre>

This will give you this patch:

Empty Clip Name
Clip both buttons and see what it does in the Max Window. "zl reg", in combination of the "trigger" (t b b l b) is perfect for the job Wink.

Explenation of "zl reg":

In reg mode, the input or the most recently stored input value received in the right inlet.

*exactly* what we need.

 

Lemur blinking button

E-mail Print PDF
User Rating: / 2
PoorBest 

Today I found an excellent forum post, Trying to understand... - which I was looking for, for the blinking pad as soon as I hit the pad for launching a clip in Ableton Live.

The formula:
((remote_in==127||remote_in==1)*1+(remote_in==126)*0.5*((time%0.3)<0.15))*0.5-0.5

elj gave an excellent description:

Hi,
Is this script for a 'light' setting? I'm not familiar with the liveclip manipulator, but this is what it seems to be doing:

(remote_in==127||remote_in==1)*1

This part is testing whether remote_in is equal to either 127 OR 1. If either one is true, this part evaluates to 1... otherwise, it evaluates to 0.

(remote_in==126)*0.5*((time%0.3)<0.15)

If remote_in is NOT equal to 126, then this whole expression is 0. If remote_in IS equal to 126, then the time part can be calculated (otherwise, 0*anything = 0, so it doesn't matter what the next part is).

(time%0.3)<0.15

This expression switches between 0 and 1 over time, roughly every 1/3 of a second. You can see how this works if you set up two Monitor objects: set the value of the first one to 'time' (without quotes - 'time' is an internal Lemur variable), and the other set to (time%0.3)<0.15

Then, after all of that is evaluated, it's multiplied by 0.5, and 0.5 is subtracted.

(
(remote_in==127||remote_in==1)*1+ (remote_in==126)*0.5*((time%0.3)<0.15)
)*0.5 - 0.5

So, what this all means is that while remote_in is 126, the light switches between -0.5 and -.25. If remote_in is 1 or 127, the light is 0. If remote_in is not 1, 126, or 127, the light is -0.5.

Hope this helps!

I know for sure it's going to help me for the M4L ClipLauncher.

 

replace(a,b,position)

E-mail Print PDF
User Rating: / 1
PoorBest 

For my JazzMutant Lemur M4L Cliplauncher, I need to change the status of one of the clips when it's triggered from Live. I don't want to update the whole aray (imagine you have a 16x16 grid updates every time) and make things efficient as it can get.

I was reading the JazzMutant Lemur's manual and found one:

replace(a,b,position)
takes an array, and replace the items starting at “position” with b ( b can be an array or a singleton )

Examples:

replace({0,0,0,0}, {12,2}, 0) = {12, 2, 0, 0}
replace({0,0,0,0}, 0.15, 3) = {0, 0, 0, 0.15}
If position is not an integer, the parser converts it using the floor function (next lower integer)

So this is great stuff!

Let's take a look how I can observe whether a pad is hit (I monitor the whole track, since only one clip can be active at the same time). I use this patch to observe track 0 (the 0 is the first track):

ObserverTest
This patch shows how to observe the whole track. Once a clip is started, it should send some message.

Max_message

This is the response from the "print observer_response":
Message -2 means a stop (or empty slot without ARM or OVR enabled) is triggered, so the playing clip is stopping;
Message -1 means that no clip is being activated, this message is always send after an action (or at loadbang);
Message 0 means the top clip is fired;
Message 1 means the next (so the second clip on that track) is fired, and so on...

So the above example is: I started clip 0, waited some time, fired 1, waited some time, clicked the track stop, and the first -1 is the loadbang - an actual status telling you that no clip is being fired.

What can we do with this information? We need a patch that remembers what clip was last started, at the moment it gets a positive number, the lights should blink and go on at -1 message. When a next one is fired, 1 is received, remember the old clip (since that one should go out), blink the new one, remember this one too. At -1, enable the light, and switch the old on off. And forget the old one, keep the new one.

I'll try to create this patch tonight.

 
More Articles...


Page 2 of 3

Subscribe to feed

feed-image Feed Entries

My Favorite Links

Cycling '74
Mainsite
Forum
Documentation
LOM

Ableton
Mainsite
Forum

JazzMutant
Mainsite
Forum

Other Projects
THE PROTODECK

Great Tutorials
http://www.max4live.info/

Great Patches
http://www.maxforlive.com/index.php

License

Creative Commons License
Musical Blog & Tutorials by Bouke Groenescheij is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
Based on a work at www.vvi-world.com.