New Audio & MIDI Scripting Plug-In
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5821 posts since 8 Sep, 2004 from Paris (France)
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!
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!
-
- KVRAF
- 1550 posts since 3 Oct, 2001 from Thailand
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.
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5821 posts since 8 Sep, 2004 from Paris (France)
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).
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).
- KVRist
- 168 posts since 19 Apr, 2014 from London
This is fantastic
-
- KVRAF
- 6827 posts since 28 Apr, 2004 from france
-
- KVRian
- 1256 posts since 15 Mar, 2007 from Yorkshire, England
looks very interesting
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5821 posts since 8 Sep, 2004 from Paris (France)
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
Blue Cat’s Plug’n Script: Bringing MIDI and Audio Scripting into your DAW
-
- KVRian
- 573 posts since 1 Jan, 2013 from Denmark
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5821 posts since 8 Sep, 2004 from Paris (France)
-
- KVRAF
- 7400 posts since 17 Feb, 2005
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.
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.
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5821 posts since 8 Sep, 2004 from Paris (France)
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!
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!
-
- KVRer
- 5 posts since 30 Nov, 2007 from Nancy, France
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 ?
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 ?
-
- KVRist
- 268 posts since 14 Oct, 2013 from San Francisco Bay Aea
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.
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.