New Audio & MIDI Scripting Plug-In

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi,

As announced in this thread, we have released a new scripting plug-in that lets you write your own audio or MIDI effects or virtual instruments, Blue Cat's Plug'n Script.

It uses the AngelScript language, originally developed for video games, together with an open source JIT for optimal performance. Many scripts and presets are included to get started with the API, which is very simple, and pretty fast to learn.

The syntax of the scripting language is close to Java, C#, C++ or JavaScript, making it very easy to learn. It is also convenient to reuse your scripts into native code, or integrate code snippets found on the web into your script.

So if you want to learn DSP or are looking for a quick prototyping tool for your algorithms, it might be what you need!

Post

Definitely interested. Is it compiled to native code or to intermediate code like JVM- or CLR-based languages? Is the language low-level like C/C++ or higher-level like Java/C#?
Peace, my friends. I'm not seeking arguments here. ;)

Post

The JIT Compiler compiles the bytecode into "native" machine code, so it is not interpreted but directly executed by the processor. The language itself is very high level (more like C# and Java), but the basic syntax is close to C++ anyway.

You will not have the same performance as native C/C++ code compiled with a modern compiler, though. But the advantage of the scripting engine is that it is sandboxed: it will not crash, even if you make mistakes in the code (it will just tell you).

Post

Thanks for the info. I think I'll give it a try then. :)
Peace, my friends. I'm not seeking arguments here. ;)

Post

This is fantastic

Post

Very nice !

Post

looks very interesting

Post

Thank you all for your interest. We have written a short post on our blog to give a bit more details about the plug-in and what you can expect from it:

Blue Cat’s Plug’n Script: Bringing MIDI and Audio Scripting into your DAW

Post

Seems familiar :P

Post

Mayae wrote:Seems familiar :P
:?:

Post

Use the link in his sig!
Mayae I promise I will donate a few bucks for your work like I said I would, eventually.
One thing that you need to implement is a custom parameter readout scaling option.

Not trying to take away from BlueCat's work, but the idea of using YASL (yet another scripting language) is very unappealing.

Post

Ah ok! That's indeed a nice project that you have there! But our approaches are quite different in the end, aren't they?

About the "yet another scripting language": I understand your point. But it's an existing language that has been there for a couple of years already (mostly used for video games, not DSP, that's right), so we haven't re-invented the wheel. And the syntax is close enough to C++, C#, Java and others not to be a problem for most programmers. In fact, apart from one detail (handles), it's hard to tell from the DSP scripts that you are not using C++ (or C#)!

So why choosing AngelScript instead of another scripting language or just plain C/C++?
- it is sandboxed: if your code is buggy, it will just tell you, instead of crashing the app.
- it is easier to learn than C/C++, and the errors generated by the compiler are probably easier to understand for non-experts. It also avoids linking/dependencies issues etc...
- performance is still quite good thanks to the JIT and the type-safe syntax (compared to JavaScript for example - actually the first version of our plug-in that was written 5 years ago was based on JavaScript, and it was dropped in favor of AngelScript). The garbage collector will also not be triggered randomly...

There were a couple of other candidates that were investigated or prototyped during the past few years: clang compiler, python, JavaScript, LUA, custom scripting language, several C++ scripting dialects... But none of them made us happy enough until we dicovered AngelScript :-).

It definitely don't think it is better or worse, just a different choice!

Post

You are a forward thinking company. Great idea!
no sig

Post

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 ?

Post

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. I don't care too much about that because Reaper is the only host I use.

What other advantages does this new product have for Reaper users?

[edit] I should add that many years ago I was a C++ programmer. I think it would come back to me. On the other hand, I learned other languages (Pascal, Visual Basic, dBase) so I don't think I would find JS intimidating either.

Post Reply

Return to “DSP and Plugin Development”