Deep-Symmetry / beat-link-trigger

Trigger events and automate shows in response to events on Pioneer CDJs
Eclipse Public License 2.0
443 stars 37 forks source link

Cue expressions window #158

Closed brunchboy closed 1 year ago

brunchboy commented 1 year ago

Is your feature request related to a problem? If so, please describe. When setting up a cue with multiple related expressions, it takes a lot of mouse movement to open the right expression editors, and simulate the right expressions.

Describe the solution or new capability you’d like This came out of the discussion for #157 on Zulip. In addition to that related enhancement, it would be nice to be able to open a window that shows all the expressions for a given cue (probably just as abbreviated text if the content is shown at all), with buttons for each expression to open its editor, simulate it, copy its code, and replace its code by pasting the clipboard and compiling immediately.

Of course this window would need to auto-close when the show closed (but perhaps it could stay open even if the track cues editor window closes).

This was originally conceive in the context of track cues, but it would be as useful for phrase trigger cues… and perhaps track expressions and phrase trigger expressions as well, and ordinary trigger expressions. So it’s starting to sound like a general mechanism should be built and reused for all these expression menu contexts.

Describe alternatives you've considered See the linked discussion.

Current Beat Link Trigger Version 7.1.0-SNAPSHOT

brunchboy commented 1 year ago

As an even simpler way to get a lot of the benefit from this, we can add a “Simulate” option to the expression editors’ File menu, and possibly a Simulate button next to the Update button (if the layout is practical, which is not looking promising), for expressions that have Simulate menu entries. To avoid duplication of code (and to help the editor builder function know when and how to do this), the function that is used to produce the simulated status object can be attached to the editor-info map under a new :simulate key. This would be a function passed a map holding whatever that kind of editor needs to build a simulated status/beat/etc. object, e.g. the track for a show track expression, and which would then return an appropriate object to call the expression with to simulate it firing. The editor-info maps could perhaps be reused in, e.g. show/track-simulate-menu rather than duplicating the status-creation code there.

brunchboy commented 1 year ago

All right, I think this is probably done, once I update the user guide to show how to use it!