Scripting in Studio One
-
- KVRist
- 124 posts since 29 Oct, 2024
Cakewalk Sonar just added Lua as their scripting language and glancing at it, it looks good. While I wouldn't want to go to Cakewalk again, I wish that Studio Pro would follow suit though I know they are heavily invested in Javascript. Still seeing Cake offer it, it would be nice to expose a scripting language API to the public.
-
- KVRer
- 5 posts since 21 Apr, 2011
My main question is how to assign any sound variation index to a selected note. I hope there is a function like "setSoundVariation(...)" but I don't know how to check it?Fidelitymusic wrote: Mon Jun 29, 2026 1:54 am Not much you can do from what's currently known. That just returns a 0-based index for which variation is assigned to a note, -1 = none, 0 = first, 1 = second, etc.
-
- KVRist
- 183 posts since 12 Mar, 2014
As of right now there isn't.
You could possibly achieve what you're looking for using commands in your script: https://csources.github.io/Studio-Pro-S ... -variation
You could possibly achieve what you're looking for using commands in your script: https://csources.github.io/Studio-Pro-S ... -variation
-
- KVRer
- 5 posts since 21 Apr, 2011
Yes, I can try using the commands. I didn't know I could integrate them into scripts.Fidelitymusic wrote: Tue Jun 30, 2026 1:45 am As of right now there isn't.
You could possibly achieve what you're looking for using commands in your script: https://csources.github.io/Studio-Pro-S ... -variation
Thanks for pointing that out.
-
- KVRist
- 183 posts since 12 Mar, 2014
I found soundVariationMap with lookupVariationByID, so you can get the actual names, not just an index number.
Here's a Select by Sound Variation script, inspired by Lukas' Select Notes by Sound Variations. It selects notes in the Note Editor (Piano View) based on their assigned Sound Variations. This one has a ListView so you can select them. Get it here.
Here's a Select by Sound Variation script, inspired by Lukas' Select Notes by Sound Variations. It selects notes in the Note Editor (Piano View) based on their assigned Sound Variations. This one has a ListView so you can select them. Get it here.
You do not have the required permissions to view the files attached to this post.
-
- KVRer
- 5 posts since 21 Apr, 2011
Hi Fidelitymusic,Fidelitymusic wrote: Mon Jul 06, 2026 7:39 am I found soundVariationMap with lookupVariationByID, so you can get the actual names, not just an index number.
Here's a Select by Sound Variation script, inspired by Lukas' Select Notes by Sound Variations. It selects notes in the Note Editor (Piano View) based on their assigned Sound Variations. This one has a ListView so you can select them. Get it here.
select-sound-variation.png
I tried out your new "Select by Sound Variation" script but ran into an issue: the script works very well and displays a ListView showing the names of the first 50 sound variations defined in the soundVariationMap. The problem is that it displays the sound variation names while ignoring the folder structure. When I use the script with VSL instruments, the displayed names are very misleading, as you can see in the screenshot below:

Do you know if there is a way to display the folder structure alongside the sound variation names?
I would appreciate any help.
Thanks again for your work; I’m learning a lot by studying your script examples.