# impossible puzzle with stream deck & cakewalk?



## chillbot (Jul 23, 2019)

Super clickbait-y title sorry.

But I think that it actually is impossible, hence the title. Still... you all are smarter than me so maybe it's worth a shot.

Sonar (I stubbornly refuse to call it Bandlab) took away the visual indicator of whether automatic crossfades are on/off years ago and I've been livid about it every since. It is a feature that I used constantly and is very important to me. No, there are no workarounds. Why they would take away a feature I have no idea.

Then along comes stream deck! (Makes me so happy.) Now there IS a workaround. I can have an auto-crossfade toggle button on the stream deck that lights up to indicate when it is on/off. (I turn auto-crossfade on/off a hundred times a day, hence the importance to me.)

I'm happy with this as a workaround, the minor bug is that Sonar saves the state of the auto-crossfades with the project. So every time I open a project I have to manually sync up the button to be in the proper state.

Additionally, I found it super useful to have the same toggle on/off button for "snap to grid" and click on/off. Those are slightly easier to sync up (state is also saved on a per-project basis) as they do have visual indicators. Every time I open a file I just have to look and click them on or off to match the stream deck. The auto-crossfade has a visual indicator, if you want to be technical about it, but it will be a checkmark next to a menu item under the options menu in the track view.

So this is a fairly minor issue (though I will go through 7-8 projects per day), however I like puzzles and I keep thinking there ought to be some way to get the stream deck to sync up automatically.

The problem is there are no separate key commands for these functions on or off, it is the same to toggle it on or off.

And Sonar will not output the state of these that I am aware of. The only way to tell is maybe if there was screen-recognition software that you could tell it where to look on the screen and report if it was on/off... does that exist? And I can't see any combination of key commands that would always result in the functions being toggled off, for example. And can't find anyway to "reset" these to off or on in Sonar.

Any scripts or thoughts or workarounds or ideas welcome. Or maybe it's just not possible?


----------



## chillbot (Jul 23, 2019)

chillbot said:


> The only way to tell is maybe if there was screen-recognition software that you could tell it where to look on the screen and report if it was on/off... does that exist?


To answer my own question, yes this exists, so this is technically possible, but I'm not sure if it's worth all the time and expense. Macro Scheduler is one program I found that has screen-recognition software but the cheapest version with it is $150. Hoping someone else would come up with a brilliant and simple solution to this that I haven't thought of yet.


----------



## pmcrockett (Jul 23, 2019)

I've never used a Stream Deck and I don't know its exact syncing/input process, so I'm not sure what to do with the data once it's outside of Sonar -- but it should technically be possible to at least get the data out of Sonar.

Say you have a dedicated data track in the project and a virtual MIDI port leading to some program that accepts MIDI and can either be read by the Stream Deck or can send button commands on its own. On the data track, you have CC values that represent toggle states (e.g. CC1=0 is auto crossfades off, CC1=127 is auto crossfades on). A CAL script that toggles these CC values is bound to the same Stream Deck button as auto crossfade on/off so the values will toggle as the actual setting toggles. (You may need to manually sync these values once when you first create the project unless auto crossfade always starts in the same state in a new project.)

So when you load the project, you run another CAL script that sends the data track's CC value to the MIDI port leading to the external program, and that external program and/or the Stream Deck reads those values and knows what toggle state the setting is in.

EDIT
Another possible option:
Save two versions of a project file, one with auto crossfade enabled and one with it disabled, then use a hex editor to compare the two project files for differences to see where in the file the auto crossfade state is stored. If it turns out that data is something that could be easily located by trawling the raw file with a script, then it would theoretically be possible to write a script that would read the file and tell the Stream Deck the saved toggle state.


----------



## JJP (Jul 23, 2019)

The only solution I can imagine is, as you found, a macro program that can grab the state of a menu or option. I'm on a Mac so I use Keyboard Maestro for these types of things.

However , I have found having a macro program in conjunction with Stream Deck is very efficient. Create a long, convoluted macro to do some repetitive mundane task, assign it to a key (cntrl-alt-shift-yourmama or whatever), then have Steam Deck trigger that. Pow! One button magic!

When I was doing a lot of arranging for a TV show every week where I was using a lot block voicings I could enter the saxes all on one staff. Then hit a key and they would explode out to their individual staves, articulations and dynamics would get copied, etc.

Having a macro program will make you start looking at repetitive things differently.


----------



## chillbot (Jul 24, 2019)

pmcrockett said:


> (You may need to manually sync these values once when you first create the project unless auto crossfade always starts in the same state in a new project.)


Not sure if I follow this completely, but therein lies the rub... how to create a way to sync the stream deck to EXISTING files. Sometimes I am working with up to 100 projects at a time. If I was only working with new projects I think the simplest solution may be to train myself or remember to turn all 3 buttons off on exit so that every project is stored and opens in the same state.


----------



## MartinH. (Jul 24, 2019)

How do the buttons on a stream deck feel? Any issues running the software under win7? I'm interested in adding another macro device to my desk, but I'm hesitant about adding yet another thing that needs a driver to run and also I wonder if I even like the feel of the buttons on the stream deck. 



One thought about scripts and recognizing the state of this setting: autohotkey (under windows, not sure if it's available for mac) so far has never failed to impress me with what it can do. I wouldn't rule out that it's possible to read a setting from a program window with it. 


Autohotkey has become an invaluable tool for me in terms of macros and shortcuts. I highly recommend spending the time to learn to use it.


----------



## chillbot (Jul 24, 2019)

Thanks I will look into Autohotkey, it looks like it does have an ImageSearch function which might be a solution.

Can't comment on Win7 but I love the feel of the buttons on the stream deck. They are 'fun' and feel just right to me. I could never wrap my head around using a touchscreen or tablet for this because I hate the lack of feedback on touchscreens. It might be a generational thing.


----------



## JJP (Jul 24, 2019)

Oh, I should also add, even with a macro program, I haven't been able to remotely change the on/off status of a Stream Deck key. Haven't looked into it much since the last update, though.


----------



## MartinH. (Jul 24, 2019)

chillbot said:


> I love the feel of the buttons on the stream deck. They are 'fun' and feel just right to me


Sounds good, thanks! I might have to give it a try some day.



chillbot said:


> I could never wrap my head around using a touchscreen or tablet for this because I hate the lack of feedback on touchscreens. It might be a generational thing.


I think buttons are objectively better, but I've heard rumors of people being able to "touch-type" without looking on those flat glass surfaces too, so maybe it's an acquired skill that I just don't have.


----------



## msorrels (Jul 24, 2019)

You should be able to get the menu status in Cakewalk for the Crossfade option with Autohotkey. Might take a bit of detective work but it should be doable. Might have to do some magic to find the right trackview window though (if you have multiple projects open in Cakewalk, you need to find the one that has the focus) and then grab the window handle for the menu, find the crossfade menu item and get the check box status. Then it becomes a matter of how to get that information to the Stream Deck. Autohotkey can do just about anything(or can run actual real software and pass the data that way), if Stream Deck has some sort of API or way to access it you should be able to work this out.


----------

