Call deck with OSC string instead of index

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
p8guitar
Hasn't felt like this about software in a long time
Posts: 51
Joined: Sat Sep 16, 2017 18:20

Call deck with OSC string instead of index

Post by p8guitar » Sun Mar 11, 2018 21:16

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.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5180
Joined: Fri May 22, 2009 11:38

Re: Call deck with OSC string instead of index

Post by Joris » Mon Mar 12, 2018 10:27

I'm having that weird french disease where everything happens twice

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

p8guitar
Hasn't felt like this about software in a long time
Posts: 51
Joined: Sat Sep 16, 2017 18:20

Re: Call deck with OSC string instead of index

Post by p8guitar » Mon Mar 12, 2018 18:05

Nice that you read every post, even the double-posts... ;-)
Can you help me with this question?

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5180
Joined: Fri May 22, 2009 11:38

Re: Call deck with OSC string instead of index

Post by Joris » Tue Mar 13, 2018 09:43

Opening a deck via OSC string is not possible.

sleepytom
Hasn't felt like this about software in a long time
Posts: 230
Joined: Fri Sep 12, 2008 11:11
Location: sussex by the sea

Re: Call deck with OSC string instead of index

Post by sleepytom » Mon Mar 26, 2018 19:36

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.

Post Reply