View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000875||OpenMPT||[All Projects] Feature Request||public||2016-09-13 23:35||2017-01-03 23:35|
|Target Version||Fixed in Version|
|Summary||0000875: Simple script system implemented in OpenMPT|
As Saga Musix suggested in issue 0000064, a simple script system in OpenMPT would rock! "Welcome to OpenMPT script." thumbs up
Imagine what you can do with such a feature! For example:
And LOTS of other funny and usable things!
So instead of implementing all sorts of special window pop up screens for every single tiny user wish, you could concentrate all these special wishes in a simple script system, where no special coding abilities are needed.
How the script language works would have to be explained in the OpenMPT manual, for sure.
I give it a big thumbs up!
|Has the bug occurred in previous versions?|
|Tested code revision (in case you know it)|
FWIW, a lot of things have already been discussed in the development section: https://forum.openmpt.org/index.php?topic=4078.0 Now that we will start targeting C++11 with OpenMPT 1.27, implementing scripting will become a little bit easier (as in, less cumbersome), but there are still a lot of internal things that need to be refactored to be able to implement scripting properly.
Okay, but still looking forward to it even if it takes some time.
Bumping this as a "I really want to make and contribute scripts" vote.
Thanks for your interest. If you have any specific ideas of what you would like to be able to do with the scripting API, please post them here, as this will help shaping up the API and deciding what's needed and what isn't.
Sure. Ideas I have about what I would do with a scripting system and how I'd expect it to work:
Pattern shortcut keys to do these things
Scripts that fill in instrument data.
Scripts to help prepare a track for export or make it more fluid to downgrade formats(e.g. I am writing for a webgame and plan to use .XM, but initially write in MPTM for convenience)
For the API model of most of these I would expect to be working from within a input data->output data callback that lets me do "CRUD" operations on the native data structures, with UI limited to a pre-action menu, maybe with some buttons, sliders, or lists of presets; for numeric entries the UI should be able to remap ranges, e.g. dB power to % amplitude. For the scripts that are more like shortcuts, they might rely on a separate configuration step, i.e. there is some kind of data persistence they're relying on, with the config taking place in a different script. Scripts might want to declare up front what parts of the persistent store they use(and if they are read, write, or both), so that the UI can expose dependencies, conflicts or maintenance issues to the user.UI gets trickier when I consider more elaborate UI situations such as a "wizard" style system where it cycles between user prompts and batch processing, or a concurrent UI that is synchronized as the user scrolls through the pattern view or makes other edits. I don't have specific ideas about that.I am not very particular about the programming language syntax or runtime; it's more important that the API be flexible and have good examples, and that the language have a type system appropriate for the context(e.g. a unified numeric type like JS may be inappropriate), and good tooling(errors, debugging features, etc). Neither do I expect the scripting to have the throughput or real-time requirements needed to perform DSP; the most latency-dependent situation I outlined above was for the sampler front-end. For DSP code I would be referencing the many audio programming languages that are out there(e.g. Pure Data, Supercollider, Faust, CSound), while my interest here is in scripting OpenMPT's existing data model.
|2016-09-13 23:35||Rapture||New Issue|
|2016-09-14 10:30||Saga Musix||Note Added: 0002662|
|2016-09-14 10:30||Saga Musix||Tag Attached: scripting|
|2016-09-14 12:52||Rapture||Note Added: 0002667|
|2017-01-03 22:00||triplefox||Note Added: 0002822|
|2017-01-03 22:23||Saga Musix||Note Added: 0002826|
|2017-01-03 23:35||triplefox||Note Added: 0002827|