Page 1 of 1

Call deck with OSC string instead of index

Posted: Sun Mar 11, 2018 21:16
by p8guitar
Is it possible with OSC to choose a deck with its name instead of it's index?
To select a deck called "Hall of Fate" I tried this synthax:
/composition/decks/Hall of Fate/select 1
But it doesn't work. Of course one can use the number of the deck like this:
/composition/decks/9/select 1

But because I have a lot of decks (one for every song), choosing the deck with its name would be very helpful! I'd like to be able to change the order of the decks without destroying the mapping.

Re: Call deck with OSC string instead of index

Posted: Mon Mar 12, 2018 10:27
by Joris
I'm having that weird french disease where everything happens twice

viewtopic.php?f=5&t=15135&p=64867&hilit ... ate#p64867

Re: Call deck with OSC string instead of index

Posted: Mon Mar 12, 2018 18:05
by p8guitar
Nice that you read every post, even the double-posts... ;-)
Can you help me with this question?

Re: Call deck with OSC string instead of index

Posted: Tue Mar 13, 2018 09:43
by Joris
Opening a deck via OSC string is not possible.

Re: Call deck with OSC string instead of index

Posted: Mon Mar 26, 2018 19:36
by sleepytom
no but you can do something with code :)

Sending a string of "?" to the /composition/decks/X/name address will return its name

So you could iterate through the deck addresses asking resolume for the names. Store the names in an array and then use that as a lookup table to know which deck is in which position, allowing you to load the deck over OSC even if you've inserted or deleted decks from your comp. Obviously you'd have to update your look up table directly before calling the deck to ensure nothing has changed but that shouldn't be too much of an overhead providing you don't have thousands of decks in a comp.