WebUI causes Cantabile 4 to stall

Hi Brad,

Does that mean a new end point (e.g. ‘SetLists’ ) with such a method like ‘loadSetlistByName(name)’ and a property like ‘items’ giving all setlist names in the configured folder?

That would be awesome.

Another feature i have on my list is ‘Global Transpose’. How can i control that? Do I need to use ‘commands’ end point or are there other ways?

Paul

I’ve updated the set list endpoint with two new methods:

Using JS api:

console.log(await C.setList.available());

will produce

[
  "list1",
  "list2",
  "subfolder/list3",
]

and load a set list like this:

C.setList.loadSetList("subfolder/list3")

Available now in build 4339 and latest jsapi

1 Like

Awesome. Thank you.

Will evaluate this. Probably next week, as i’m currently migrating my code to TypeScript.

Hi Paul,

Just letting you know I’ve been modernizing cantabile-js a little. Specifically:

  1. It’s now an ES6 module
  2. The browser version has been renamed from cantabile-js.js to cantabile.js (and .min.js equivalents)
  3. Version has been bumped v0.2
  4. Lots of fixes to the jsdocs (and the online reference has been updated)
  5. Now uses rollup for bundling (instead of browerify/uglify)
  6. At the moment, it’s on a separate git branch v0.2
  7. The v0.2 api should be considered unstable for the moment as I’m considering reworking it a bit and things might change/break.

See here for node and browser usage instructions.

Next version of Cantabile will include both the new and old versions and Cantabile’s WebUI will be updated to use the new version.

Brad

Thank you for that information. Will evaluate the new module as well.

Do you intend to provide type declaration files for TypeScript developers?

Paul

After wrapping my head around the asynchronous behaviour of that available() method, I got it working. Thanks again.

Paul

1 Like

Hi @Brad,
I like the new API methods for setlist. I’m wondering about additional functionality for songs.
I would love the ability to:

  1. load the list of songs in the Songs folder;
  2. open (load) a song, by name. This would help in the ability to handle a song request.

Thank you - David

Yes, that’s probably possible through a similar mechanism to what the set lists use. Leave it with me. (but ping me if you don’t hear back by next week sometime).

Next build will have two similar methods on the song endpoint:

  • available() - returns an array of available song files
  • loadSong(name, state = null) - loads a song.
1 Like

Hi @Brad,
Did you update the docs (Cantabile JavaScript API) for these new methods? I couldn’t find them.

Oops, forgot to push it up. Should be there now.

1 Like