As LPChip has been asking about the status of this, here are some concept I have been writing up over the last few months. Feel free to discuss and add remarks. It is very much possible that I've forgot about important functions that should be available to the scripts.
Concept: Running scripts
Obviously there would be some kind of button / shortcut: Run Script
This would open the "Scripts" dialog, which offers a list of existing scripts (most recently used script would be preselected).
Frequently used scripts could be assigned to freely configurable shortcuts (maybe 10 of them?).
Concept: Actual Scripting
Things that the scripts should have access to:
- Order list
Actual interface functions
- Read / write playback/edit position
- Read / write access to Order list
- Read / write / create / delete / switch sequences
- Read / write access to patterns: GetNote(chn, row), GetInstrument(chn, row), ..., SetNote(chn, row)..., ForEachModCommand style callback functions (with row, channel, order parameters), AddChannel, RemoveChannel, MoveChannel, ResizePattern, ShrinkPattern, GrowPattern
- CreatePattern (concept: returns new pattern number, -1 if failed), DeletePattern, DuplicatePattern
- Read / write access to sample data, create samples
- UI access: Get and set selection boundaries (pattern data / order items / sample data)
- Dialogs: GetInteger / GetFloat / GetString input boxes (all with optional min/max parameters), Message Boxes
- Callback functions that are called on every tick / row / pattern change.