That old APC40 vs Resolume (with a bit of Bomes on the side)

Tony_Blend

2012-03-22 13:18:41

I've been playing around with Bomes on and off for quiet some time (even did 2 x 8 hour gigs restarting the trial version every 20 minutes or so), and have gotten myself a license (whoop!). Anyway, I've mapped Resolume via the APC first into Bomes then fired the messages onto Res4 in the past. This works to a fashion, but what I'm trying to achieve is a different colour button for each of the three layers.

So, I changed my approach to mapping Resolume. Resolume now only sends and receives MIDI to/from Bomes, and Bomes to then send the correct data to the APC40 for lighting it up. This, I figured would allow me to actually see what data is sent from the software when a layer is pressed by the mouse, or when a clip is selected. It does work (as you can see from the attached screengrab)
Screen Shot 2012-03-21 at 16.50.53.png
Screen Shot 2012-03-21 at 16.50.53.png (11.14 KiB) Viewed 12246 times
(not meaning to teach anyone to suck eggs here btw).

90 38 01 == So, it turns on the mapped clip/button on the APC (solid green).
90 54 00 == It switches off the mapped "layer" button I have setup on my controller.
and ...
90 53 01
90 53 01
90 53 01 == It sets the hell out of the newly lit "layer" button (I'm using scene change buttons 53/54/55 for layer selection).

What I would like to do is set a (I'm speculating here), for next loop that captures the entire midi data sent upon pressing the layer button, so i can intercept (via rules I'm guessing) and extract the info [90 38 01] and set that into global variables listing channel/button/colour etc.

Is this possible with advanced rules scripting or is it something completely different? Maybe a nested Bomes file/Translator?

It's still early days with this setup, but it's doing pretty much everything else I need.

Cheers.

T

DvlsAdvct

2012-03-26 19:39:58

Hi Tony_Blend

I think what you're asking is possible, but I'm not 100% sure what it is you're asking.

Do you want to store values from the software so when you change presets it remembers what you were doing and lights up accordingly?

Tony_Blend

2012-03-27 13:03:47

Hi there Devils, I think You have the gist of what I'm trying to achieve here. I'm looking to capture the currently lit "clip position" on each of three layers and display them in an individual colour on the clip view.

My original attempts at mapping the APC were started around capturing the keypresses from the controller and mapping those to the software. This time I'm attempting to use the data sent from Resolume, completely interpreted via Bomes and finally sent on to the APC. I think this offers a much more precise overview of twhat is being handled by the software. Especially as it seems to send the command to light the new layer 3 times (in this example).
N
So, using the screen grab above as my example, I'd like to capture the values sent from Resolume to Bomes in the first line "90 38 01" and the final line "90 53 01" and set global variables to hold layer information, clip position and state (colour).

L0 == layer info (53) / taken from the last line of data received
L1 == layer clip position (38) / taken from the first line of data received
L2 == layer colour (02 layer 1 / 04 layer 2 etc. ) / set from init variables global (at start of Bomes).

Once all three layer positions are stored (either by keypresses or a loop of some kind) Bomes would clear the colours on the APC clip position all to RED and then write in the three layer values over the top (I have a Bomes template I can send to show where in all this i am currently at.

Cheers!

Tony

DvlsAdvct

2012-03-27 15:52:37

Okay, I think I have an idea, and yes you can easily do what you're asking.

Send me across the MT preset, or just attach it to the forum, so I can take a look at it. It won't be until tonight as I am at my awful day job and am unable to have access to BMT while I'm here.

I am confused, however, as to the order of events you want to happen, once you get to
Once all three layer positions are stored (either by keypresses or a loop of some kind) Bomes would clear the colours on the APC clip position all to RED and then write in the three layer values over the top.
What we can do is have global variables set by the incoming messages 53 and 38, and we can set initialized variables as well, it's what you want to happen from there I'm lost on.

Tony_Blend

2012-03-28 16:15:59

Cheers again Devils, I may (unnecessarily be confusing the matter further by typing my query. The attached file will give you an overview though of the layout I'm using on the APC. I am a little confused as to how it is possible to capture only the first line of the MIDI data into Bomes from the Resolume software. I think once thats achieved, then setting global variables etc from that data should be relatively easy (famous last words I know).

I've attached the MIDI mapping from Resolume 4 as well. Since it is reading from Resolume, not the APC I'm afraid it may make more sense if a trial version of Res if used (unless your a user already).

Cheers for taking a look.


Tony
Resolume4_inputs.bmtp
MIDI input from Resolume 4 --> Bomes --> APC40
(2.58 KiB) Downloaded 722 times
contextualMidiShortcuts.xml
Resolume 4 default MIDI mapping
(6.63 KiB) Downloaded 718 times

DvlsAdvct

2012-03-28 17:14:43

Okay, being I'm at work I can walk through some ideas right now. I'm not a Resolume 4 user but I can download a trial tonight and check it out.

You only want it to capture the first line of MIDI data for what, though? Is this an on/off situation, or a series of messages from a volume fader? Once again, at work so can't look at this very moment?

Tony_Blend

2012-03-29 14:13:51

That first line of data illuminates the clip that is currently playing on layer 1 (2,3). I'm looking to enter the clip position into a global variable, as well as the layer number (I already have layer colours set elsewhere).
For example ...
L1 == layer 1 / LA == clip position 1
L2 == layer 2 / LB == clip position 2
L3 == layer 3 / LC == clip position 3
Once these global variable have been set, then I can add them to the code to set the clip area on the APC from RED, to include the three layer clips (in their individual colours).

Thanks again, for having a look. I'm still a little mystified how in Bomes you can intercept a batch of midi data and strip out of it the first three bytes though.

T

DvlsAdvct

2012-03-29 22:11:15

You can have it set to only respond to specific MIDI commands that come in, so in a series of 30 messages you can have MT only respond to 2 of them, regardless of the other 28. I'll take a look tonight when I get home and figure this out. :)

DvlsAdvct

2012-03-30 01:29:56

Alright, I've loaded the preset. Now this is kind of difficult as I don't have an APC40 or Resolume, but I should still be able to get the gist of things. unfortunately, your messages are coming up with a lot of errors on my screen.

The first preset, I'm guessing is supposed to be an initialize preset so the variables are set on opening the file. To do that, if I'm correct, you want to set the incoming action to Special -> On Project Load. That way, whenever you load the preset, the variables are automatically set to what you want.

I think the only way for us to get this preset moving the way you want is to get our definitions right so we are both talking about the same thing. From what I can gather you want this preset to:

A) Trigger clips in Resolume
B) Reflect the state of those clips on your APC40
C) Save the state of those clips so that when you switch layers it will accurately reflect the current state of Resolume

When you reference Clip Position, though, I get lost. When I think Clip Position I think the location of the track on a timeline, as opposed to Clip State (whether or not it is currently playing). Resolume sends MIDI feedback (thank god) so you can easily put translators in to trigger LEDs. The way I do this involves two translators, one with a timer to set a global variable, and one to trigger on the activation of the preset (layer) you want reflected. The easiest way to do this is to create a preset for all of your LEDs that is always on. Those presets would look something like this:

Code: Select all

Translator Name: Clip 1 State
Incoming Action: 90 00 pp
Rules: if pp==0 then ga=0
if pp==127 then ga=1
Outgoing Action: Timer Clip 1 State 0ms delay
Now, the local variable (pp) depends on Resolume's output, and how you want it triggered. I'm assuming there are only two values: on and off. If there are other states like loaded but paused, then have that reflected in your pp values and the related ga value.

Then in your actual layered preset you'll have two presets related to this LED. One is related to the timer, whereas the other is related to the preset loading. They look exactly the same, except for the incoming action.

Code: Select all

Translator Name: Clip 1 State
Incoming Action: Timer Clip 1 State
Rules: if ga==0 then pp=0
if ga==1 then pp=1
Outgoing Action: 90 53 pp
So now, whenever that timer goes off it triggers the LEDs tied to that global variable. And then, when you create a mirrored translator with On Preset Activation it will trigger the same thing when the preset turns on.

Now, this brings us to a whole other layer, which is triggering presets on and off. Right now you have it set so one button triggers a whole slew of values at once. An alternative to that is have the LED ins trigger all of those for you based off of the timers you can set. Does that make sense?

This is a lot, and only the tip of the ice berg. I think I see what you're trying to get to, and it might require a bit of work but I think we have the right idea. :)

This help at all?

Tony_Blend

2012-03-30 21:31:38

Wow! That's pretty much the basis for what I'm after, each layer to have it's own colour and to be updated across the board when any other layer / clip is triggered indeed. Thanks for the sample code, I was swaying towards setting up a for next loop to set the default state of "off clips" and the parsing of the first line of MIDI data in makes so much more sense as it can be interpreted as it comes in from Resolume (it didn't occur to me that it works sequentially! Doh!).

I've included a grab from Resolume, the layer selection is on the left (click each individual layer), and the "clip position" is to the right. Each is mapped to the APC in midi map mode (even though it's not directly accessed) so I have data to send to Bomes.
Screen Shot 2012-03-30 at 09.46.48.png
I think from what you say, I'll start off small (I'm not the greatest at nested codeing yet (last time I looked at code, it was Cobol/Pascal)) so will create a Bomes file that works on MIDI in data in the region of 90 xx 01 (or the clips being pressed on Resolume translating to APC). It won't be as tidy as a scripted setup admittedly, but it'll work (in theory) until I give it a proper go.

Thanks for all you help so far, much appreciated.

T

DvlsAdvct

2012-03-30 21:41:50

No problem, Tony :)

Just start small and build from there. The easiest way to manage this, in my experience, is to build it with an outline. Every preset, in my opinion, should have an "initialize" preset that on loading the project sets all of your variables, an LED capture preset and a preset dedicated toward switching presets.

From there you figure out how many layers you need, program in the presets and the necessary switches, and code your outs, so you know your logic is sound.

From there you code in your LEDs so you can have everything line up properly. That way if changes need to be made in the logic it usually can happen before the outs have been coded. :)

Good luck. ANd be sure to provide us with results.

Tony_Blend

2012-03-31 13:32:33

Just a quick update, I've got around to tidying up a side project that may be handy for all APC20/40 users.
Bomes MIDI Translator APC20/40 template - http://www.bome.com/forums/viewtopic.php?f=3&t=3801

Tony_Blend

2012-06-25 15:19:46

It's been a while since I actually sat down and had another go with Resolume and Bomes on the APC40. So after various threads, and changing how I use the controller, I (about a month ago) started from scratch and came up with this work in progress.

http://vimeo.com/43073087

As I also use Modul8 and Madmapper in my sets, I intend to integrate those apps as well into the completed patch.

T