Tuning Virtual Studio Technology instruments (VSTs)

Virtual Studio Technology instruments (VSTs) – are a key tool for Music Producers. For example, Serum and Kontakt. The problem with these tools is that they don’t respond to the tuning in the DAW (Digital Audio Workstation) e.g. Logic Pro. They each instead have their own tuning mechanisms – so, if you use lots of VSTs in your workflow, it would be a pain to set up the tuning in all of them.

Well, a friend of mine pointed out that in Apple Logic Pro anyway there’s a utility called the Scripter which is a MIDI FX and can alter the MIDI pitch information before it gets to the VST. In this way, we can have one tuning setup in Logic and then all the VSTs your using will automatically be in tune with that set up well.

Well, without further ado, here’s the Scripter script and a screen-shot of where you set it up in Apple Logic Pro. Also, I’ve shown the offsets to achieve the tuning I believe is the ultimate tuning because not only is the G note the frequency of a Day, but the D note is the frequency of the Sun, and it reflects the B-flat and F notes I discovered in 2016 which I’ve written about on the home-page and all over this web-site.

Set up Logic like this. Notice how the Scripter is in the MIDI FX slot (in green, on the left), before the VST instrument which in this case is Serum. Just paste the Scripter script below into the Scripter and click “Run Script” at the top of the Scripter and this handy slidy bar thing will show up like on the right-hand side. Set the offsets as per the screen-shot (they’re not cents) – and if you want to check the resulting frequency in Hertz, you can put a Tuner like “NA Tuner” after that.

The offsets shown below (e.g. “C -660”) will give you the following tuning which, for reasons explained here, I believe is the ultimate tuning:

  • B-flat 230.4 Hz
  • B 485.452
  • C 259.2
  • C# 273.066
  • D 288
  • Eb 307.2
  • E 323.63
  • F 345.6
  • F# 364.09
  • G 388.36148148
  • Ab 409.6
  • A 432

By the way, with this B-flat major tuning, if you Transpose by minus 2 (-2) all the notes of the scale will be white notes, so it’s easier to play the most consonant chords and notes.

So now, music creators everywhere (at least the ones using Logic) who are using VST Instruments can easily configure the tuning for their whole workflow in one Scripter script. Conceivably, we could create offsets for other scales corresponding to other combinations of Earth harmonics such as I’ve documented here – but why would we if this is the ultimate tuning?!

Paste the following into the Scripter:

var pitches = [“C”,”C#”,”D”,”D#”,”E”,”F”,”F#”,”G”,”G#”,”A”,”A#”,”B”];
var detuned = [0,0,0,0,0,0,0,0,0,0,0,0]
function findPitch(midiNote){
var mod = midiNote % 12;
var result = pitches[mod]
return result;
}

var PluginParameters = [
{
name:”C”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”C#”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”D”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”D#”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”E”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”F”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”F#”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”G”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”G#”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”A”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”A#”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
{
name:”B”,
type:”lin”,
defaultValue:0,
minValue:-4000,
maxValue:4000,
numberOfSteps:2000,
currentValue:-1450,
callBack: function(value){
this.currentValue = value;
}
},
]

function ParameterChanged(param,value){
PluginParameters[param].callBack(value);
}

function HandleMIDI(event)
{
var bend = new PitchBend();
if(event.status === 144){
var note = findPitch(event.pitch);
var index = pitches.indexOf(note);
Trace(index)
bend.value = PluginParameters[index].currentValue; // Set in UI
bend.inStartFrame = 1;
bend.send();
}

event.send();
}

Leave a Reply