Bitfocus Companion Proof of Concept / v 0.1

I wanted an open-source alternative to Stream Deck stuff, so I’ve been working on a phone controller that mimics Stream Deck Mobile by using the WebSockets API with the open-source app, Bitfocus Companion. I’ve got a basic version up and running, although I haven’t made it pretty (text only buttons).

Companion is not as user-friendly as Stream Deck, so beware. The basics are fairly well documented, and there’s a Facebook group.

  1. Install and run Bitfocus Companion: Bitfocus - Companion
  2. Change network interface to your LAN IP address rather than localhost and Launch GUI
  3. Import/Export tab: Unzip and import the attached
    DoricoCompanion-v0.1.zip (5.9 KB)
    configuration file. Leave all boxes checked and click Reset/Import
  4. URL for interface should be http://yourIPaddress:8000/emulator/A6sN4JcgdrxrvGSpX97FV (obviously this is best with a static IP)
  5. Open Dorico
  6. Navigate to Page 99 in the emulator (phone) or the Buttons tab. If you’re on the first page, press Page Down
  7. Click the firstConnect button. This initiates the handshake with Dorico. You will see a dialog in Dorico that you must approve. This will save the session token in Companion temporarily.
  8. After approving the dialog in Dorico, click the acceptSession button in Companion. This will confirm the session token back to Dorico and store it permanently.
  9. You should not have to connect ever again (see the Trigger tab), but you can redo the process. Buttons should work now.

Let me know if you get it running and what you think!

9 Likes

Welcome to the forum, @Jon_Arnold, and thanks for sharing your work. It’s good to see new things being built on top of Dorico’s remote API.

Version 0.2:
Moved system and frame break to dynamics page only. Added duplicate to staff above and below to first page, and added reduce/explode to articulations page (next to requisite copy).

DoricoCompanion-v0.2.zip (6.0 KB)

3 Likes

Hey @Jon_Arnold, amazing! I just tried it out and it works very nicely! This is a very good start for your Dorico Companion (is this now its official name ? :slight_smile: ), and I will for sure use your controller and suggest it further.

The only unexpected thing I have noticed his that the arrow up and down functionality seems swapped: clicking UP I would expect to reach the page before (from page 3 to page 2 for example: now it brings me from page 3 to page 4), and with down the page after (now it brings me for example from page 3 to page 2, instead). Or did I miss something?

I am very curious and look forward for the further development of this useful controller!

2 Likes

Hi @Christian_R - thanks so much for trying it out and letting me know it works for you! I do like that name!

I agree that the paging behavior could be counter-intuitive, and I’ve gone the wrong direction myself. That’s the default Companion way, basically affecting the current page number. Would something like this make more sense to you?


It would also prevent the user from going to an empty page by mistake.

1 Like

Ok, I see the logic of Companion here (UP means bigger page number, DOWN means smaller page number), but as you said is counterintuitive.

Is not possible to swap the logic between UP and DOWN?

Your alternative (using horizontal arrows instead, if I understand correctly) could be possibly be more straightforward. But testing it in real life would tell if it works as expected.

Ok try this version.
DoricoCompanion-v0.3.zip (6.4 KB)

If upgrading, when importing, only check Buttons. This will leave custom variables intact so that you don’t need to reconnect/handshake.

First installation instructions change:
6. Navigate to Page 99 (Connect) in the emulator (phone) or the Buttons tab in the GUI. If you’re on the first page, press Connect

v 0.3 - Button symbol additions and coloring. More intuitive page buttons (thanks Christian_R). Removed erroneous feedback settings from Force Duration and decrescendo hairpin.

Yes, the horizontal arrows work better (and as expected “right” will increase the page number, and left will decrease it, as turning pages in a book).

I like the 3D lock duration icon :slight_smile:

I noticed that some articulation icons use the “below” symbol. Not a big deal for most of them but for marcato and staccatissimo is maybe better to use the “above” symbol (as in Dorico panels) ?:

Yes, that would look much better. The buttons are all text only, which keeps them contained within the config file itself. I would have to figure out how to distribute the icons to the right directory for the config file to read on import.

If you want to do it manually, I made some buttons here:
articulationIcons.zip (12.7 KB)

To set them up, you would go into the button editor in the GUI, delete the button text, and set the attached PNG files. The PNGs would need to be in a consistent directory for Companion to read.

1 Like

This looks like what I want. I use a second, large monitor for Dorico and my touchscreen laptop montor 1 could easily serve me well.

Great! Check out the tablet interface (called Web Buttons in the GUI): http://yourIP:8000/tablet
That might work better on a laptop screen, and you can scroll it. You could also create another emulator under Surfaces for a wider screen.

Two updates:

  1. I was mistaken about upgrade importing- importing by the main dialog does a full reset of all settings, which necessitates a “firstConnect” and “acceptSession” again. You can avoid this by using the Buttons tab within the Import tab after you’ve selected a file.
  2. I’ve learned that it is possible to bundle button icons with the configuration and gotten permission to use some of Dorico’s icons, so an update will be coming with icons that match Dorico as much as I can.

Hi @Jon_Arnold, I have a maybe impossible question:

would it be possible to have a page of Dorico Companion :wink: that populates automatically with the scripts present in the Dorico script menu (the user recorded ones) so that they can be executed with one click? The squares are of course too little for a descriptive text, but maybe to have a sort of list… (?)

I don’t see anything in the list of available commands related to scripts or macros. @dspreadbury ?

An alternative is that Companion buttons can do multiple actions, so you could recreate the actions of a script there. I hope to eventually build a module so that all the available commands can be easily added in Companion without user knowledge of the API. If you have one that would be really helpful to your work flow, I could work on it for you.

2 Likes

Correct, at the moment there’s no way to enumerate the scripts available to Dorico via the remote API.

2 Likes

v. 0.4 updated with icons from DoricoIcons font as available. Absolute dynamics still use text for smoother edges and filesize.

Config file zipped: DoricoCompanion-v0.4.zip (41.8 KB)

Screenshots:

To avoid resetting connection variables, use the Buttons tab on Import. Otherwise, redo the connection steps 5-8 in first post.

2 Likes