Integrate the SpiderMoneky JavaScript engine for scriptable (pattern) transforms
brain storm I think a really interesting project would be to give users control over the pattern data, or in fact any of the song's data, via scripts.It would be really cool (and a first in the tracking world afaik) if we could integrate the SpiderMonkey JavaScript engine into OpenMPT.
An example scenario would be: user selects some pattern data, opens context menu, and there is a "custom scripts" submenu. In there are a number of pattern transformations such as "reverse pattern data", or "generate random volume variations". These point to .js files containing javascript pattern data transformations that anyone can develop and share without touching the guts of OpenMPT. We'd need to convert the selected pattern data into javascript objects and pass them to the engine (or convert all the pattern data and pass the selected area as a separate reference, in case the transformation stretches beyond the selection (e.g. grow selection)). There's TONS of documentation on how to use spidermonkey, and it doesn't seem too dauntingly hard. Certainly worth experimenting with. One could imagine providing a GUI for scripts that require parameters, just like Audacity's Nyquist scripting engine.
Version 1.4 last modified by rewbs on 23/03/2006 at 15:40
Document data
Attachments:
No attachments for this document


Comments: 0