Anyone else wishing for a Python backend for Cubase like I am?
I’ve done my fair share of Reaper scripting, and primarily everyone uses Lua for that, which suuuuucccckkkkssssssssss as a language - having to mess around with meta-classes and things like that, and not benefiting from the excellent libraries out there for Python.
I’d quite like to see something similar for Cubase. Yes its devvy, and yes most people won’t use it, and yes the team could probably spend their efforts better in other areas, but this is something I’ve found invaluable for writing my own editing processors in Reaper over the years, and I’d like to do the same for Cubase one day.
Alternatively - is there anything remotely like this already for Cubase?
Lua would be probably faster than Python, and it’s already used in a lot of audio apps (including HALion).
Python is big and clunky when it comes to a real-time app, IMO.
(I’m coming from a visual effects/animation background and in that field, Python is pretty much the industry standard. It’s not that I don’t like it, but I don’t feel it’s a good option for Cubase).
I would have preferred to have Lua for the MIDI remote scripts as well, tbh.
I am absolutely for a proper embedded scripting language with bindings to all Cubase functions instead of the current clumsy macro system. I really do not care about the language, as long as it is not BrainFuck or Whitespace…
I doubt though that even if SB implemented this feature that they’d allow to load random external modules or libraries. I wouldn’t do that. Recipe for disaster, and most likely hell for support.
I also proposed an interactive command shell for Cubase some time ago, something like an embedded PowerShell, with cmdlets that operate on Cubase objects, and scripting functionality (Not exactly Powershell, that too big and too slow, but a similar concept).
Didn’t receive many votes, though. To be precise, exactly none.
Failing all that, I would settle for a better macro system with simple control structures (for, if-then-else) and parametrised commands (e.g. “DecrementEventVolume(5db)” )
That would be pretty awesome actually. I’ve been doing Python since 1994. While Lua is a great language, and I’d support any scripting, Python has an ecosystem and reach that’s hard to ignore. I really don’t think given the size and complexity of Cubase that Python would be overkill or too slow. Take a look at what the Faster CPython project has been able to accomplish for Python 3.11.
I’m running the Reapy addon for Python, and it runs in the background using a localhost server. Seems plenty fast enough to do the things I want to do, and means I can use libraries like Librosa and Numpy to do interesting things. I use Python in the 3D world too, to automate Blender more or less.
Lua is used a lot for hardware control (I’m pretty sure Ableton and NI controls all use Lua) but it is just such an ugly and nasty and limiting language. But I digress.
Regardless of language:
What would you want to achieve with the coding?
Well one example I’ll talk publicly about
Take audio regions, feed them into Librosa, work some MIR magic on them, feed that data into a Keras machine-learning model, add meta data to files, and re-arrange items on the timeline according to how they match across one or more attributes.
You mean like VST?
I’m not sure there’s a need for a dedicated script interface to Cubase, what with macros and things like the PLE, which get expanded every so often. I’m also not sure if Cubase would be the tool I’d choose for complex tasks like that either … there are already scripting possibilities in WaveLab, and as mentioned, there’s Lua in HALion.
One major advantage of a scripting language compared to PLE is being able to store values in custom variables. And that’s just the very first.
Anyone with just a bit of programming experience will see the major benefits of scripting compared to PLE.
Variables would be great in the PLE. This can be done by the Steinberg devs without implementing this massive request.
I wonder if what was started with the new MIDI remote API might be a foundation for a PLE replacement, in time.
Sure, but it might not be the wisest design choice to go building Python into Cubase.
At least three new words in that sentence that I need to look up. But hey, I’ve only been using computers for music since -91 or so I’m a bit inexperienced .
LOL! Wait till I throw out something like spectral centroid!!