-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripting System #2221
Comments
Reminds me of a "record" feature. It could use the undo events as a way to repeat tasks over and over. The tricky part I feel would be knowing how to target the actions. |
This could be doable once we restructure all the controls to use Open Sound The difficult part is knowing which "scope" in which to run the command. Any of those are valid interpretations of the intended action. There's far Another point to be made is that if there's a series of actions you find |
@Wallacoloo -you almost get me going when you talk like that :p |
The most important part of software development is writing good code, which we're always in need of help on. C++ is a lot of work. Please don't make an SDLC term sound like it is more important than the late hours and hard work of the devs. Actions speak louder than words. 👍 |
@Wallacoloo What is the status of adding OSC control to LMMS? This would be very nice to have. I understand it is a big job, but just basic controls -- like being about to start, stop, detect beat (both within a measure and also the measure within the song) -- would be helpful. Thanks. |
@WilliamAHuston OSC is on hiatus until/unless somebody else picks it up. Some explanation can be found here. |
With regard to a general scripting system for LMMS, I've spent some time researching potential approaches--primarily from the perspective of integrating Qt-specific solutions into LMMS. Qt's in-built scripting system(s) are based on JavaScript/ECMAScript and are currently in a state of transition from a deprecated system to a "new hotness". Python seems to be the most commonly used language outside the officially supported JavaScript implementations (e.g. it's used by FreeCAD). For my future reference and anyone else who might be interested here's an outline of options and associated issues/documentation (via):
While I have a preference for Python as a language, due to the Qt "native" support of JS, I'd like to try a proof-of-concept using (Somewhat) related LMMS issues: #551, #19, #1911 (comment) |
Here's a proof-of-concept of a (simple) Javascript-able application (using the newer but less capable The application has a "dial" in its GUI and you can write a Javascript script to set the position of the dial: If you're interested in seeing how it's implemented the best place to start looking is probably here: https://github.com/follower/qtjs-test/blob/master/qtjs-test/appapi.h Potential LMMS hooks for scriptingI've been looking at places in LMMS where it might make sense to provide scripting functionality. There's some broad categories:
There's some blurring between categories. While (4) has been talked about previously it seems to be the most potentially problematic (a la Word documents with embedded VBA scripts). What seems to be a better approach would be to require explicit installation of a plugin (for example) rather than shipping the source with the song--even if that's possible. It seems like (3) would be most limited by performance constraints--and I don't know what they are currently. The ability to have (2) would potentially enable additional contributors without C++ skills to help enhance LMMS which seems potentially valuable but may require additional work to design/expose a lower level API that enables implementation of new functionality. Functionality implemented via (2) could potentially be shipped as part of LMMS or as a new style of e.g. "application extension" plugin. Category (1) lends itself most easily to "personal" scripting/automation tasks (e.g. macros--like "Oh, on the 2nd of every month I shift every 3rd note up an octave") which might in some cases be generally useful. I could see something like a "scripts" menu here. It would most likely require creation of an API implemented/exposed via "Proxy" objects of existing LMMS objects--or potentially with Qt's MetaObject system some of this could be implemented dynamically or through annotations on existing objects. Hey, it's free to dream, right? :) Anyway, this has been an interesting exercise so far, if for no other reason than highlighting some of the design decisions to be made--and having an automatable dial in a GUI test app! :) |
That would be great! One could almost use lmms for live producing instead of relying on time-expensive mouse mouvement. |
Most of applications use Python for scripting, If there would be Python API, it could make easier developing prototypes of some functions. If to compare Python and Javascript themselves, last would lose by all parameters. |
+1 for using Python
2018-04-18 20:07 GMT+01:00 Vladislav <notifications@github.com>:
… Most of applications use Python for scripting,
including Blender, Sublime Text, Gedit.
If there would be Python API, it could make easier developing prototypes
of some functions.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2221 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADlPbiKYxmhWFQaVGjugN0uUW1BtMwu7ks5tp47qgaJpZM4FiQcl>
.
|
Hi @hartsantler, thanks for your sharing your Qt Script integration commits. While Qt Script scores high on the ease of integration/functionality front, I'd have concerns about how wise it is to add a new feature like this using a technology that's already been deprecated for ~3.5 years. From what I've read, the support its unlikely to be removed before Qt 6 but it still seems to me to potentially be creating extra work for ourselves. Apparently JS standard support has improved in later versions of While I was researching the current state I discovered Mixxx uses Qt Script and have a tracking issue for potential replacement: "qt5: Replace deprecated QtScript with QJSEngine" (There's a bunch of informative links in the comments.) It seems like there's some fundamental issues with the implementation of Qt Script which could also make transitioning an interim API more difficult. (But maybe there's a way we can define a LMMS "Scriptable API" that would support a transition--and maybe Python too. cough :D ) Would you have any interest in comparing how possible it looks to get your Qt Script-based functionality working with QJSEngine? There's probably some trade-offs between backward-compatibility of Qt releases (i.e. minimum Qt version required to support useful QJSEngine functionality) but FWIW Qt 5.12 (which supports but deprecates Qt Script) has support until early 2020s. If code that works gets the functionality going then that's cool but I think it's wise to know the trade-offs we might be making. Thanks for reading. :) |
@hartsantler , sorry, I think, that Python will be better solution, than any Javascript-based language. It has dozens of available libraries, is enough fast, used in many different programs as scripting language, including with QT5 framework (for example, CryEngine Sandbox). Generally, thought, that most of UI could be controlled by Python, also, saving files, processing files and many-many non-realtime work could be implemented in Python to save developer's time. Offtop:Also I think, that C++ is awful language (not bad, but awful). At first - syntax. As I understood, for accessing different types of properties (types, methods, etc), there are needed different tokens (why ?), Second - need for .h to define properties, .cpp to write them Third - no normal package manager, dependencies installed system-wide, applied to project with command-line arguments, and etc., etc. Fourth - crashes. Every the most little mistake can crash all the program. I'd contribute to any project in any language (C#, Java, Vala, ...), but I just can't use C++ (my brain dislikes it, tried to start using it many times).Think, there will be much more contributors to Python part of LMMS (if it'll be added), rather than to Javascript's (for example) (because JS has not so powerful library support, implementing some features without cpp would be hard), or Lua (not so flexible, no good libraries at all), and rather to C++ (because entry threshold is too high). |
i have an idea: create a "platform" like VBA in Office apps, a script system to automate some processes, e.g. a special configuration for triple osc, or making some standard tricks like sidechaining or developing a 'Riff machine' using a small script by user.
I know that wants lots of time and programming but can be a nice feature to create a special ability to making musics.
The text was updated successfully, but these errors were encountered: