[Script] Set Vocal Modes

Set Vocal Modes

The 1.8.1 update for Synthesizer V Studio added the ability to control vocal modes via parameters. This script allows you to set vocal modes for selected notes using this new feature. The script tries to retain existing values and any vocal modes set to -151% (default) will be ignored, so it should be safe to use over existing edits. Thanks to Bee for finding the names for the parameters!

Since every bank has different vocal modes, I manually inputted the vocal modes for each bank into a dictionary at the top of the script. I was only able to test this script for banks that I own, so let me know if there are any errors or missing banks/modes. Even if I don’t get around to updating this script, it’s pretty easy to add banks in yourself.

Limitations:

  1. Setting vocal modes in the voice parameters shifts the origin of the parameter curve. For example, if you have Emotional set to 100% then setting the value to “0” via script puts a point at 100%, not 0%. If you then want Emotional at 50%, you would have to set the value to “-50”. I’ve adjusted the range of the script to [-151,150] to account for this.
  2. I’m not aware of any way to determine the voice bank via scripting so the script will uses a huge drop down list with all the banks. As a workaround, you can skip this by setting the track name to the voice bank name.
  3. If you choose the wrong bank and give a value to a Vocal Mode that doesn’t exist, Synth V will generate a non-functioning Vocal Mode. Curves are also kept if you switch voice banks, regardless of this script.
  4. You’ll have to manually switch the parameter interpolation to Linear if you want straight lines since there’s no way to set it via script.
  5. This script actually starts one blick early and ends one blick late to create the correct shape because you can’t set two values for the same position. If it looks like the sides are slightly tilted inward, your eyes aren’t playing tricks on you.

Download: Google Drive

9 Likes

Oh my, this is soooo useful! grazie

2 Likes

Glad you found it useful!

I’ve updated the script to add Eleanor Forte AI (thanks to MC Saki for pointing this out) and an auto-detect feature. If the latter is enabled, the script will sample vocal modes from the center of the first note. This should save some time when using the script with existing edits. This is also applies when using the track name shortcut, which should speed things up if only using this script but may slow things down if you have hand-drawn curves.

I also fixed a major “bug”. It turns out that setting vocal modes in the parameters shifts the origin of the curve. For example, if you have Emotional set to 100% then setting the value to “0” via script puts a point at 100%, not 0%. If you then wanted Emotional at 50%, you would have to set the value to “-50”. I’ve adjusted the range of the script to [-151,150] to account for this. It’s kind of ugly, but -151 is the new “ignore” value. xD

As usual, let me know if anything breaks! One thing I realized is that notes tend to start “early” and end “late” when actually sung, so drawing boxes exactly over the length of the note may lead to “clipping” the vocal modes. I’m not sure if this is an issue in practice. It seems okay from my quick tests so far.

1 Like

Thank you for creating a very nice script!
I’m sure you must have had a hard time with the specification that the script cannot get the vocal mode of the track.

As a request, it would be great if you could apply it to a script that allows other parameters (loudness, pitch, etc.) to be specified numerically as well.

1 Like

You’re welcome. =)
It was indeed annoying being unable to determine the voice bank or vocal modes through scripting. xD

I’ve updated the script to include all voice parameters except Pitch Deviation since it doesn’t make much sense to set it like this. The default “ignore” value is now “-999” just to make it a bit more obvious, but you can still drag the bars all the way to the left to ignore a parameter if you incorrectly set something and/or are using auto-detect. Let me know if anything breaks since I didn’t test every use case.

I also added some options to give users more control over the script, mainly because this update adds a feature that some people might not want. They’re commented in the script but I’ll give a more detailed explanation below as well.

var defaultVoiceBank = "";

You can use this to set the default value of the voice bank dropdown for people who prefer the dropdown to quick mode (setting the track name to the voice bank name) for some reason.

var defaultAutoDetect = true;

Set this to false to prevent the script from setting the defaults to existing values. There’s also a special exception in place here. Setting it to true will auto-detect both vocal modes and voice parameters, while setting it to any non-false value (e.g. “2”) will only detect vocal modes. This is for people who want to use the script for both vocal modes and voice parameters but have a lot of hand-drawn curves that would get messed up if auto-detecting both.

var defaultVoiceParameters = true;

Set this to false if don’t want the script to show voice parameters by default. It’s worth mentioning that ASTERIAN has so many vocal modes that the dialog can’t fit the OK/Cancel buttons with this on. You’ll have to press Return/Escape if you have voice parameters enabled with him.

3 Likes

Thank you!
It was a very nice script, so I made a Japanese translation.

function getTranslations(langCode) {
    if(langCode == "ja-jp") {
      return [
        ["Set Vocal Modes", "ボーカルスタイルをパラメータパネルにセットする"],
        ["Set track name to voice bank name to skip this step.", "トラック名を音源名にすることで、このダイアログをスキップできます。"],
        ["Parameters set to -999 or all the way left are ignored.", "-999、または左端に設定されたパラメータは無視されます。"],
        ["Include voice parameters", "ボーカルスタイル以外のパラメータも設定する"],
        ["Auto-detect vocal mode values from first note.", "最初の音符に設定されているパラメータ値を自動検出する"]
      ];
    }
    return [];
  }

Please don’t forget to enclose the text in the form with “SV.T()”.

3 Likes

Thanks for figuring out the voice mode parameter names! I think I have a working solution for getting the voicebank name–please check out:

https://github.com/billwhite-git/synthvscripts/blob/main/CreateParametersAnchors.lua

Feel free to reuse any code you want (I borrowed yours!)

2 Likes

Parsing the SVP for the voice database is really clever! Thanks for sharing this. =)
I’m not sure if file I/O is possible for scripts written in Javascript but I’ll definitely implement this trick if I can figure that out. Switching it to Lua would be a pain for me syntax-wise, though it might be the only option… I don’t actually use this script myself. xD

As a side-note, I most likely don’t have the correct “internal” names for all the voice banks for one reason or another. Off the top of my head, you’d want to switch STARDUST to “MEDIUM5\u00b7Stardust” and split Tsurumaki Maki into “Tsurumaki Maki AI (ENG)” and “Tsurumaki Maki AI (JPN)” (guessing from their Lite VB names).

@maiko3tattun Much appreciated! I’ve added in the translations and credited you. The overflow on “-999…” does cause an issue with ASTERIAN since he has too many vocal modes but I can’t think of any shorter way to reword it so I’ll leave it as-is for now.

This script is irreplaceable in my workflow, any way it could be updated for Hayden and the new VBs?

Open the file in any text editor and add a line for Hayden under the vocalModeDictionary variable. You’ll see all the other voices and their vocal modes listed there, so you can just follow the pattern.

Thanks for answering their question, claire!

I’ve updated the script to add Rap Intonation along with all the voice banks up to POPY/ROSE. Fingers crossed that I didn’t break anything while adding Rap Intonation since it seems to be purely implemented via note attributes and not automation curves, despite appearing in the parameters window (the other parameters are affected by both).

I also made the default voice bank “None”, which has a nice side-effect of displaying only properties and no vocal modes. You can pair this with disabling voice parameters for voice banks that have too many vocal modes to fit in the window.

Hi, when I try to use the script the whole program crashes after selecting the voicebank. I don’t know what the issue could be since I can’t seem to find crash logs anywhere.

some new voicebanks for your script (if you’re still updating it)

["Hayden"] = {"Soft", "Clear", "Heavy", "Powerful"};
["Sheena"] = {"Soft", "Clear", "Chest", "Tense"};
["SAROS"] = {"Bright", "Dark", "Falsetto", "Feminine", "Full", "Gentle", "Passionate", "Power", "Resounding", "Soft"};
["Ritchy"] = {"HighTone", "MidTone", "LowTone", "Singing"};