Scripting in OpenMPT

Started by Saga Musix, August 25, 2010, 18:02:18

Previous topic - Next topic

Saga Musix

Quote from: LPChip on July 09, 2017, 10:32:24
Can it open a textfile, read its content, parse it, and perform actions based on that?
Lua has a file I/O package, yes, and I will enable all the default Lua packages.

Quote from: LPChip on July 09, 2017, 10:32:24Can it also get information FROM the tracker?
Yes, that is the entire point of the API. ;)

Quote from: LPChip on July 09, 2017, 10:32:24Oh, and if possible, can the script generate a dialog with buttons and perform actions based on custom button presses?
Oh come on, it's even being discussed in the first post on this page...
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Okay, I admit, that last one I got carried away in enthusiasm and it was a bit of teasing on my end. :P
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

I like how my post is now referring to itself recursively due to the page break.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Quote from: Saga Musix on July 09, 2017, 10:43:58
I like how my post is now referring to itself recursively due to the page break.

Hahahaha I hadn't noticed. I read first post of this topic, not page...
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

JanKXSKI

I am very sorry to revive an old thread, but any update on this? I cannot find references to scripting in the doc/version history. I would like to export pattern data from OpenMPT to json.

Saga Musix

I work on this every now and then, but there's not so much progress. It's a huge and difficult task. The current state can be tried at https://github.com/sagamusix/openmpt but I don't remember if accessing pattern data currently works. libopenmpt might currently be an easier / more stable way to get pattern data out of module files, or maybe copying all patterns to the clipboard and then transforming the text data to json with an external tool.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

JanKXSKI

Thank you for the reply and the effort! I'll look into the alternatives you suggested.