New Audio & MIDI Scripting Plug-In

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

rrichard63 wrote:I hope someone here can post a quick comparison with Reaper's JS scripting language. I have been planning to learn JS but haven't started yet. The projects I have in mind (so far) are pretty simple and I know that JS can do them.

Plug'n Script clearly has an advantage when a pretty user interface makes a difference. Also, Plug'n Script scripts developed in Reaper can be used in other hosts.
Though that's also possible for JS scripts via the ReaJS plugin (free).

Post

alcofribas wrote:In the manual you say that function calls are expensive and should be avoided. Your code examples use the standard math library for things like sin. People on this list would rather use their own fast approximations for such functions... but this would increase the number of function calls a lot (and there are no inline functions).

So do you have an idea of what is the faster of the two approaches here ? And are you considering making users able to add custom C++ libraries to your port of Angelscript ?
The fastest approach would be to actually inline your approximations by hand, but it would probably become a bit painful if you are using them a lot. The ideal solution would be implementing inlining in the AngelScript engine, but we are not there yet!

So if manual inlining is not an option, using the standard functions provided with the engine could be the fastest approach (it may be hard to built a faster approximation without vectorization nor assembly). But it probably depends on your implementation and the function you are trying to replace. The best here is to try both and see what happens.

Adding custom C++ libraries to the scripts would indeed be possible, but this raises several issues:
- there is no sandboxing anymore, so the plug-in may crash.
- if the libraries are not available for all platforms (Win/Mac & 32/64-bit), the scripts cannot be used everywhere.

So we are looking at other options to improve the performance and/or integrate native code differently...

Post

No_Use wrote:Though that's also possible for JS scripts via the ReaJS plugin (free).
It is available only as a VST plug-in, isn't it?

Post

No_Use wrote:Though that's also possible for JS scripts via the ReaJS plugin (free).
Thanks. I didn't know about ReaJS. It appears to be VST 2.4 only, though (no AAX, AU, RTAS).

Post

Ah yes, true that it's only available as Win VST.
(sometimes I forget about other formats because that's what I use :oops: )

Post

:lol:

Post

This looks great!

Post

Blue Cat Audio wrote: The fastest approach would be to actually inline your approximations by hand, but it would probably become a bit painful if you are using them a lot. The ideal solution would be implementing inlining in the AngelScript engine, but we are not there yet!
I don't know how high this is in your list of priorities, but it would be nice, certainly. It's too bad that the syntactic complexity of C-style languages makes it impossible to have a less-than-terrible macro system.
So if manual inlining is not an option, using the standard functions provided with the engine could be the fastest approach (it may be hard to built a faster approximation without vectorization nor assembly). But it probably depends on your implementation and the function you are trying to replace. The best here is to try both and see what happens.
Are there VST hosts with some kind of profiling tools? I mean more than just a %cpu meter. Hell, a reliable "%cpu for this plugin" meter would be appreciated!
Adding custom C++ libraries to the scripts would indeed be possible, but this raises several issues:
- there is no sandboxing anymore, so the plug-in may crash.
- if the libraries are not available for all platforms (Win/Mac & 32/64-bit), the scripts cannot be used everywhere.

So we are looking at other options to improve the performance and/or integrate native code differently...
Well, I'm looking forward to see what will come out!

On second thoughts, the libraries that matter the most should be easy to develop and port everywhere, and not be the kind that crash easily. Or perhaps the source of potential bugs is in the AngelScript/C++ bridge.

I think the future for implementing such applications as Plug'n Script belongs to metaprogramming, things like http://terralang.org/. Anybody on this list interested in developing a Lua-based audio synthesis language?

I write my own synths in Reaktor Kore, with homegrown DSP, but it would be nice to have something more lightweight for this (and how do you do 256x oversampling in Kore ?). So Plug'n Script is a real contender. Gotta overcome my visceral hatred of C++ -style languages though.

Post

If the libraries you are talking about are included in the plug-in, it is indeed not a problem as we can guarantee that they are properly built and available on all platforms. The problem is with libs that may be added by third party developers (if you want to build your own native libraries).

What dont you like about the C++/C#/Java-ish languages btw?

Post

Abstraction VS Procedure IMO. DSP is fairly straight forward, an object oriented approach is only required for the framework.

Post

The DSP API we have designed is actually only procedural. You can use objects if you wish for your internals, but it's definitely not mandatory.

Post

Dear fellow developers,

We are happy to announce that Blue Cat's Plug'n Script 1.1 is now available. This new version of our scripting plug-in mainly adds MIDI FX support for Logic Pro X, new controls in the user interface, new audio file playing and recording scripts, as well as new APIs for developers and several bug fixes (full list below).

You can read more details about these new features on the blue cat audio team blog, or on the Blue Cat's Plug'n Script page.

The special introduction offer is still available, until October 15th.

Also, make sure to visit our new GitHub repository to check the new scripts and post yours!

New in 1.1:
- Audio Unit can now be loaded as a MIDI effect in Logic Pro X.
- The user interface now displays switch buttons for boolean parameters instead of knobs.
- Discrete parameter values can now be selected from a dropdown menu.
- New API: scripts can now use plain strings as user input.
- New API: scripts can now read and write files.
- New scripts and presets: added audio player and recorder scripts and a wave file utility class.
- Developers can now share their scripts on a dedicated GitHub repository.
- Fixed: implemented pass-thru for MIDI events when no processing function is declared (default script for example).
- Fixed: Audio Unit Synth version did not appear as an Instrument.
- Fixed: script was reloaded when starting playback in Reaper, and the effect was not applied immediately.

And of course, the update from 1.0 to 1.1 is free.

Post

You might be happy to know that Blue Cat's Plug'n Script intro offer has been extended: you can still get the plug-in with 25% off until Sunday evening!

Also, new (and FREE) presets are available for download, including musicalentropy's latest scripts (filters, modulation effects, non linear dynamics and waveshaping...).

Free presets and scripts downloads

Full source code for the new scripts can also be browsed directly on our GitHub repository.

Enjoy!

Post

Great, so now the fun part of writing a plugin can take up proportionally even less of a developer's time than it does already :cry:

But more seriously, this looks like it will be a useful tool, good to see you making it available for all and not just keeping it as an in house special 8)

Post

:)

Post Reply

Return to “DSP and Plugin Development”