geigr / jupyterlab-daw

Audio and music in JupyterLab
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Schedule notebook cell execution #6

Open benbovy opened 1 year ago

benbovy commented 1 year ago

Notebook cell metadata could be used for triggering execution of arbitrary cells at given time(s) along the Tonejs transport timeline.

Although this likely won't work well for real-time audio/music (e.g., trigger notes or samples) due to the latency of the kernel -> frontend communication, it could be useful for other kinds of "narrative events" that we want to occur along the played audio / or music and that do not require high scheduling precision, like exposing UI widgets (cell outputs or jupyterlab widgets) relevant to the part of a song. It might still be possible to expose a fixed number value as a setting (and/or other cell metadata value) to try compensate the kernel/front-end comm latency.