I'd like to create a command for play, stop, rewind that is also works when PT is in the background.
In Keyboard Maestro i use MIDI commands, as PT recieves this also when it is not in focus. But there is a bug in PT on this so i like to use SF using HUI instead. How do i make a (HUI) command for
- PLAY
- STOP
- REWIND
The nice thing about a separate play and stop command is that when PT is playing and you press "PLAY" it will play again for the insert point. Using a STOP/PLAY (like the space bar) means i have to press twice. HUI (or midi-transport) has this option.
- Christian Scheuer @chrscheuer2018-10-21 14:17:09.928Z
Hi @Fokke.
We should create built in actions for this, but for now you can do it like this:
function huiClick(zone, port) { sf.midi.huiSend({ midiBytes: [ 0xb0, 0x0f, zone, /* Select zone */ 0xb0, 0x2f, 0x40 + port, /* Port on */ 0xb0, 0x0f, zone, /* Select zone */ 0xb0, 0x2f, 0x00 + port, /* Port off */ ] }); } //huiClick(0x0e, 0x04); //play //huiClick(0x0e, 0x03); //stop //huiClick(0x0e, 0x02); //forward //huiClick(0x0e, 0x01); //rewind
Simply uncomment the call you want to make at the bottom
Christian Scheuer @chrscheuer2018-10-21 14:18:04.731Z
I think I'll make a HUI package actually. That would be a nice concept for a package.
Christian Scheuer @chrscheuer2018-10-21 14:23:56.294Z
Haha and now I have published a package with those 4 scripts, including documentation. From idea to publish - 5 minutes - yay :)
The package is called "HUI Commands"
Fokke van Saane @Fokke
You are ridiculously fast
Fokke van Saane @Fokke
Question.
I use my stream deck for these play and stop and rewind buttons. I launch the web trigger. But for rewind i have a downside, the web trigger is a single-fire button. It does not see that i keep pressing it, so it rewinds a single frame. I would like to keep rewinding it until i let it go.
I read that you are working on stream deck integration. Is that already in function?Christian Scheuer @chrscheuer2018-10-21 17:41:03.753Z
@Fokke still working on it! The Elgato people say they will open up the beta later this fall but the SF integration is still under way and the Stream Deck beta is still under wraps. I am working on being allowed to invite some of you beta testers from here to help beta test the integrations / the new SD version, but it's gonna be at least a few more weeks I think
Fokke van Saane @Fokke
OK thanks.
When i assign functionkey20 to it in stream Deck and use F20 as trigger it works. But rewind is very slow. Compare it to the keypad1 key!
I think it does a key press-key release in the command itself that makes it slow.
Any other way to work around this?Christian Scheuer @chrscheuer2018-10-21 17:57:21.597Z
You could experiment with using two different triggers/commands (for now until it all is fully supported).
function huiClickDown(zone, port) { sf.midi.huiSend({ midiBytes: [ 0xb0, 0x0f, zone, /* Select zone */ 0xb0, 0x2f, 0x40 + port /* Port on */ ] }); } function huiClickUp(zone, port) { sf.midi.huiSend({ midiBytes: [ 0xb0, 0x0f, zone, /* Select zone */ 0xb0, 0x2f, 0x00 + port /* Port off */ ] }); } //To start rewinding: huiClickDown(0x0e, 0x01); //To stop rewinding: huiClickUp(0x0e, 0x01);
Fokke van Saane @Fokke
Thanks.
With the help of Keyboard Maestro for Key Up and key Down actions this should be possible, let me try.Fokke van Saane @Fokke
works. But gee, it needs a long way! Streamdeck sending key to KM, two KM macro's that send midi to two SF macro's. Hahaha! But it works.
Christian Scheuer @chrscheuer2018-10-21 18:51:02.418Z
Hahaha... Nice. That's proof of concept.
With the SD -> SF integration you'll be good to go :pFokke van Saane @Fokke
Make sure that the StreamDeck developers design that SD can differentiate between a key press and and a key up! For all actions like forward-rewind, zooming, scrolling and such this is necessary!
Christian Scheuer @chrscheuer2018-10-22 14:12:49.809Z
I looked through the API, looks like this is built in. I think it will end up being a very neat integration.
Fokke van Saane @Fokke
I also wonder if their software can work alongside yours.
Christian Scheuer @chrscheuer2018-10-22 16:16:24.765Z
They should work just fine. The integration is very well architected and I've been personally in touch with their lead developer for months now.
Fokke van Saane @Fokke
That's good to hear. Their email support was irritating.