[ANSWERED] Accessing Resolume's Rest API webserver in Isadora
-
Hello! I've been out for a few months on projects and am back to work with Isadora. Early in the year, I spent a whole bunch of time working on an isadora video performance patch for our generative audio/visual collective FFoB. I really struggled with the programming around the clip player and such using JSONs, Javascript and Streamdeck midi plugin scripting. Creating ways of saving patch information etc proved to be overly complex and just not what I wanted to be doing.
I have moved to Resolume for the clip player and effects chain portion of the work but I am continue to use Isadora to control and modulate parameters, clip sequencing etc. I feel that the logic and tools in Isadora lends itself to thinking about relating materials in interesting ways.
I have Isadora and resolume talking quite nicely with OSC. I am wondering, though, if there is a way of acessing the resolume rest api in isadora. It's a webserver based system. https://resolume.com/support/e...
I would love to be able to retrieve values from resolume to use for modulating paramaters and do things like switch decks from isadora.
Please let me know if anyone might be able to point me in the right direction.
Thanks,
- J
-
After a brief look at the page you linked, it seems that the 'Get/Post URL Text' actor should allow you to communicate with the server.
-
@dusx, Thank-you! This works perfectly and is very exctiting. For example, if I want to build a random clip sequencer for a resolume layer that I can trigger using some fun logic or a wave in isadora, I can get the number of clips in the resolume layer using:
Get/Post URL actor with this URL to the Rest AP for the layer/[index] information:
http://127.0.0.1:8080/api/v1/composition/layers/1
It returns a huge JSON. I parse the json for the clip info and loop through all of the clip slots and count the number of non-empty clips and return that value:
// iz_input 1 "layerInfoJSON" - The JSON string from Isadora's global variable actor // iz_output 1 "clipCount" - The number of clips with media in the layer function main() { // Parse the input JSON string const layerInfo = JSON.parse(arguments[0]); // Initialize the clip count let clipCount = 0; // Count the clips that have media (name exists and is not empty) layerInfo.clips.forEach(clip => { if (clip.name && clip.name.value) { clipCount++; } }); // Return the clip count return clipCount; }
Then I can use this count for a shuffle actor to choose a clip index that is in range and then and send an osc command:
/composition/layers/1/clips/[clip index]/select
Using a combination of OSC and the Rest API, I am going to be able to control Resolume to a very deep degree. It's super exciting as I can use their nice "deck", "layer", compositing and playback system to do the hardcore playback stuff and then use Isadora's logical depth for all of the parameter modulation, sequencing etc.
I even have a python script to build decks in resolume from a set of media folders to emulate the "rebuild media from folders" function in Isadora.
Sunny day.
-
Wow, that looks like a powerful combo!