This project has moved. For the latest updates, please go here.

VST-ID looks different?

Topics: Build, Debugging, Documentation, Getting Started, Host Compatibility, Host Development, Host Processing, Newbie, Other, Plugin Development, Plugin Parameters, Plugin Persistence, Plugin Programs, VST.NET Core, VST.NET Framework, VST.NET Interop
Aug 3, 2012 at 9:43 PM
Edited Aug 4, 2012 at 11:58 PM

Hello,

i wonder, because i used "JACOBIE VST SAMPLES HOST" and the VST-ID looks different. I watched for the real unique id and the real unique id was like "208i". But "jacobi vst host example" gave me the VST-ID-number"842020969". Why? What about the unique 4-int number?

I used "JACOBIE VST SAMPLES HOST" within C# (VS2008Pro/Ultimate, DEMO)

Within "PlugInForm.cs" there is a call like this: PluginContext.PluginInfo.PluginID.ToString());

But why i can´t get the real ID? How can i "read" the true VST-ID or convert? What´s my false thought?

Thank you very much for assistance

Coordinator
Aug 5, 2012 at 9:32 AM

Every plugin is identified by a unique ID. You're suppose to request a unique ID at Steinberg, but for the samples I just created a fictional one.

The Plugin Id is a 4-character code. These four characters are packaged into an int and returned as an ID.

Unfortunately you can not use the FourCharacterCode class to decipher the int back to 4 chars....

Hope it helps,
Marc 

Aug 5, 2012 at 12:10 PM
Edited Aug 5, 2012 at 12:16 PM

@obiwanjacobi

Thank you very much for your reply and assistance. Well, i can´t speak and read english very well, but i´ll try my best.

 

Is this right?

With "VST-NET SDK" it isn´t possible to create/write an "DAW/HOST" Software which can "read" the unique-ID?

I want to create an simple programm that load an plugin and show me some information. But the unique ID is very important for me.

 

So, is this possible or not? Or is it not possible, if i use this => PluginContext.PluginInfo.PluginID.ToString());

I know C++ VST-SDK, Delphi VST-SDK and JAVA VST-SDK. And i thought i can read the unique Id with VB.NET-VST-SDK also. ( "i know" means, i have only heard about that!)

How do this cubase, fl-studio, reaper, sadie, proTools, logic, ableton?

How can i "decipher"? I thought, i call the "MAIN"-Function, load a plugin and get the real ID?

Is this with VB.NET-VST-SDK possible or i confuse the issue and basic-knowledge about that?

 

Maybe you can help me again. Thank you very much!

 

Thomas

 

 

By the way: You are very smart and thanks a lot for this work. I´m just a beginner, but i want to learn more and more.

Coordinator
Aug 5, 2012 at 4:48 PM

Yes you have found the correct property. That property gives you an int. If you call ToString() you will get the int value as a string NOT the four charcaters!

An int is 4 bytes and each byte represents one of the four characters.

If you look at the FourCharacterCode class source code you can see how the four characters are packed into the int. You have to reverse that in order to retrieve the four characters from that int.

Have you looked at the Host sample application? Its not a real host but it demonstrates some of the calls you will need to make in order to load plugins...

I hope I answered your question.
Marc 

Aug 5, 2012 at 10:34 PM
Edited Aug 5, 2012 at 10:46 PM

@obiwanjacobi

Thank you very much for your help & assistance again. Okay, i´ll try it again. Thank you, Thomas

 

Edit:

Okay, i found it. Thanks!

Nov 23, 2012 at 8:49 PM
obiwanjacobi wrote:

...If you call ToString() you will get the int value as a string NOT the four charcaters!

An int is 4 bytes and each byte represents one of the four characters.

If you look at the FourCharacterCode class source code you can see how the four characters are packed into the int. You have to reverse that in order to retrieve the four characters from that int.

Please, can someone post a function to reverse the FourCharacterCode in the four charcaters ?

thanks, vespadj

Coordinator
Nov 23, 2012 at 9:48 PM

You mean from an int to a string with four chars?

There is currently no support for that.

Mask of each byte in the int and reconstruct the string that way.

Or you can hang on to the FourCharacterCode instance and use its ToString method...

Hope it helps.
Marc 

Nov 24, 2012 at 6:19 PM
Edited Nov 24, 2012 at 6:20 PM

Done:

private string HexAsciiConvert(Int32 uid)
{
    // Convert a decimal integer as a hex in a string variable
    string hex = uid.ToString("X");
    // Convert the hex string back to the number
    // int decAgain = int.Parse(hex, System.Globalization.NumberStyles.HexNumber);
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i <= hex.Length - 2; i += 2)
    {
        sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hex.Substring(i, 2),
        System.Globalization.NumberStyles.HexNumber))));
    }
    return sb.ToString();
}