Introducing Binding Expressions

Yes, in addition to what you described I like to see how to do a MIDI value > MIDI value binding that uses the Expression and actually produces a MIDI out. I tried this simple style of binding to do it and while it recieves the source input it doesn’t produce messages to the target.

1 Like

+1 on MIDI as target of expression bindings working - currently, it is just not producing any MIDI output

1 Like

Experimental Build 4152 is up now with some new functions

These are also documented in the Function reference.

scalarToPosition and positionToScalar

These functions use the user-selected control curves to map a value between a position and a scalar gain value.

  • The first parameter is the name of the control curve to use and can be “gain”, “midi” or “levels”.
  • The second parameter is the value to convert.
  • Scalar means a gain multiplier where 0 = -oo and 1 = 0db.
  • Position means a position on a slider from 0.0 to 1.0

eg: to convert a MIDI CC value (0-127) to a gain value using the MIDI control curve:

positionToScalar("midi", Input / 127)

eg: to convert a gain level to a MIDI CC Value:

int(scalarToPosition("midi", Input) * 127)

GainToCC and CCToGain

Because the above is a bit verbose, the following functions perform the equivalent:

CCToGain(Input)

and

GainToCC(Input)

GainToFineCC and and FineCCToGain

If you’re using a fine controller (0-16383), these functions are available:

FineCCToGain(Input)

and

GainToFineCC(Input)

Velocity Curves

I’ve also made available a function to calculate velocity curves:

curve(curveName, curveAmount, value)

Where:

  • curveName - one of "enhance", "expand", "enhance-1" or "expand-1" (where -1 denotes the inverse version of the curve).
  • curveAmount - the curve amount (from -1.0 to 1.0 and where 0.0 = linear mapping)
  • value - the value to convert (0.0 to 1.0) (the x-axis of the graph)
  • The result is the value of the curve at that position (0.0 to 1.0) (the y-axis of the graph)

A Couple of Examples

Mapping a CC to a gain setting:

Mapping a gain setting to a CC:

You can do this by using a build of Cantabile where it works :slight_smile: Build 4152 should address this.

6 Likes

This is great! Thanks for the new functions, they will make this a lot easier to use. I have already set up a song to exercise it and I’m getting great results. We had simple comparison before but now we have complex comparison capability where the condition of several values of elements in your session or song to decide when a binding will fire. I already set up some control buttons that can change their function depending on the selected song state using several bindings that can be left enabled all the time. I used to do this but would have to disable bindings using states. This, in my case eliminates that practice. For me, this new change is huge, I’ll be tinkering for a while I’ve got a feeling. :slight_smile:

Thanks Much @brad !!

Dave

Hmm… Build 4152 crashes on trying to load the first song in my preloaded setlist - without even sending a crash report.

@brad: how can I best generate the relevant crash information for you to find what is causing this? Reverting to 4151 made things stable again…

Ugh. I just reviewed all the changes in build 4152 and there weren’t that many. My main suspicion is the changes related to this - which should be a simple fix, but I can’t reproduce it and it’s being difficult.

Easiest way to confirm that would be to back that change out and get you to test it, but I’d prefer to understand what’s going on with it so if you’ve got time to crash a crash dump that’d be great.

To capture a crash report you can use Microsoft’s Debug Diagnostics Tool.

OK, using the Diagnostics Tool is a bit of a non-starter. Having the capture task active will make my pre-loading process take AGES - I noticedthe Korg plugins (Wavestation, M1) take more than a minute each to load with the Diagnostics Collection active, but it’s not only the Korg stuff, but also others like UVI Workstation. Seems there is a bit of an incompatibility with the plugin loading process.

After waiting more than 15 minutes for UVI Workstation to load, I finally gave up on trying to capture a crash report using the Diagnostics Tool. @brad, that might be something for you to look into when you have a minute…

But what I found: I don’t even need to start Cantabile 4152 with the full pre-loaded setlist - starting it empty is sufficient to make it crash every time.

I can actually start Cantabile when I tell it to not activate the audio engine, but as soon as I activate the audio engine, everything comes crashing down.

Here are the logs (Cantabile and Diagnostics Tool) - @brad, I hope you can make something of them.

Crash.zip (10.0 KB)

Looks like Cantabile is crashing in the middle of starting the audio driver - no such problems with 4151.

Cheers,

Torsten

Hi @torsten,

I’ve had a look at this and all I can tell right now it’s a stack overflow exception (which is why Cantabile couldn’t capture it)

The fact that it’s happening when starting the audio engine is a bit mysterious as nothing there has changed. I expected to see something like a view layout issue with GuiKit, but I guess I’m off base.

When you captured this with DebugDiag, did it also generate a .mdmp file? That would be really helpful if you have it.

If it didn’t, you could try this approach with procdump. (Or maybe not… I’ve just been testing with this and struggling to get it work)

If it didn’t, I’ve updated the page here to describe how to install ProcDump as a post-mortem crash capture tool.

In the meantime, I’ll see if I can figure out how to map the addresses listed in the stack overflow trace back to functions and see if I can understand what’s happening. But that’s going to be hard because it looks like all the module load addresses in the DebugDiag log have been truncated to 32-bit - so I can’t even confirm what module it’s in.

No idea what’s happened here.

Brad

I wonder if something in your background rack is triggering this. Can you send me a copy?

You’re right - with an empty rack as a background rack, 4152 starts without a problem.

Here’s my background rack:
Global Rack.zip (28.9 KB)

Dump created and uploaded to your Dropbox.

the Cantabile log shows that starting with an empty Background Rack works nicely, but as soon as I set my specific Background rack, Cantabile crashes when returning from Options and starting the audio engine.

Hope this helps!

Cheers,

Torsten

Hey Torsten,

I’ve reproduced this with your background rack… investigating now.

Brad

1 Like

I think this should be fixed in 4153 (available now)

It was related to the fix for MIDI binding expressions and bindings that send sys-ex data (which your background rack does).

3 Likes

Seems to work nicely - no crashes so far!

Thanx for the fast turn-around!

Great, relieved that’s sorted.

Thanks for the help.

1 Like

Are these new features available under the Solo license?

As I’ve mentioned before, I’m never sure which features are allowed in which license version, and it often turns out that new ones are only available under the more expensive licenses. It would be good if this information could be added to the documentation in a clear and transparent way, preferably so that reading any one page of documentation in isolation makes that clear.

Hi @AndyHornBlower,

Yes, I’ve got a todo task to try and clarify some of this. In the meantime this summarizes the recent changes:

  • Routing Diagram Improvements - All Editions
  • New Binding System - Solo and Performer
  • Balanced Sends - All Editions
  • Duplicate Command - All Editions
  • User Interface Clean up - All Editions
  • MIDI Handling Improvements
    • MIDI filters improvements - Solo and Performer
    • MIDI Clock improvements - Performer
    • Wake on MIDI - All Editions
  • Rack Comments and Tooltips - All Editions
  • Binding Expressions - Solo and Performer
  • Note On Deduplicator - Solo and Performer
  • State Management Changes - Performer

Note even though Solo got the new binding system and binding expressions, bindings are still limited to mostly MIDI in -> Cantabile/Plugin settings.

Brad

3 Likes

Thanks, Brad.

1 Like

Can’t fault the support we get for our subscriptions :slight_smile:

4 Likes

Hey @brad, could you post an example of the new curve function with respect to the new expression mapping for bindings? Just wanted a little guidance on how to apply it. I got it going but the range was limited to “1” so the gain slider I was binding to only went to 0db and not max or 7.3db.

Any help appreciated, :slight_smile:

Dave