diff --git a/templates/vst3/src/data.h b/templates/vst3/src/data.h index a8e5f4b..4841551 100644 --- a/templates/vst3/src/data.h +++ b/templates/vst3/src/data.h @@ -18,54 +18,54 @@ * File author: Stefano D'Angelo */ -#define DATA_COMPANY_NAME "{{=it.tibia.CGetUTF8StringLiteral(it.company.name, 63)}}" -#define DATA_COMPANY_URL "{{=it.tibia.CGetUTF8StringLiteral(it.company.url, 255)}}" -#define DATA_COMPANY_EMAIL "{{=it.tibia.CGetUTF8StringLiteral(it.company.email, 127)}}" +#define DATA_COMPANY_NAME "{{=it.tibia.CGetUTF8StringLiteral(it.company.name, 63)}}" +#define DATA_COMPANY_URL "{{=it.tibia.CGetUTF8StringLiteral(it.company.url, 255)}}" +#define DATA_COMPANY_EMAIL "{{=it.tibia.CGetUTF8StringLiteral(it.company.email, 127)}}" -#define DATA_PRODUCT_NAME "{{=it.tibia.CGetUTF8StringLiteral(it.product.name, 63)}}" -#define DATA_PRODUCT_VERSION "{{=(it.product.version + '.' + it.product.buildVersion).substring(0, 63)}}" +#define DATA_PRODUCT_NAME "{{=it.tibia.CGetUTF8StringLiteral(it.product.name, 63)}}" +#define DATA_PRODUCT_VERSION "{{=(it.product.version + '.' + it.product.buildVersion).substring(0, 63)}}" -static Steinberg_char16 dataProductNameW[64] = { {{~Array.from(it.product.name).slice(0, 63) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; -static Steinberg_char16 dataProductVersionW[64] = { {{~Array.from(it.product.version + "." + it.product.buildVersion).slice(0, 63) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; +static Steinberg_char16 dataProductNameW[64] = { {{~Array.from(it.product.name).slice(0, 63) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; +static Steinberg_char16 dataProductVersionW[64] = { {{~Array.from(it.product.version + "." + it.product.buildVersion).slice(0, 63) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; -#define DATA_VST3_SDK_VERSION "VST 3.7.9" -static Steinberg_char16 dataVST3SDKVersionW[64] = { {{~Array.from("VST 3.7.9") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; +#define DATA_VST3_SDK_VERSION "VST 3.7.9" +static Steinberg_char16 dataVST3SDKVersionW[64] = { {{~Array.from("VST 3.7.9") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; static Steinberg_char16 dataVST3ControllerNameW[64] = { {{~Array.from(it.product.name + " Controller").slice(0, 63) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }; -#define DATA_VST3_PLUGIN_CID_1 0x{{=it.vst3.plugin.cid.substring(0, 8)}} -#define DATA_VST3_PLUGIN_CID_2 0x{{=it.vst3.plugin.cid.substring(8, 16)}} -#define DATA_VST3_PLUGIN_CID_3 0x{{=it.vst3.plugin.cid.substring(16, 24)}} -#define DATA_VST3_PLUGIN_CID_4 0x{{=it.vst3.plugin.cid.substring(24, 32)}} +#define DATA_VST3_PLUGIN_CID_1 0x{{=it.vst3.plugin.cid.substring(0, 8)}} +#define DATA_VST3_PLUGIN_CID_2 0x{{=it.vst3.plugin.cid.substring(8, 16)}} +#define DATA_VST3_PLUGIN_CID_3 0x{{=it.vst3.plugin.cid.substring(16, 24)}} +#define DATA_VST3_PLUGIN_CID_4 0x{{=it.vst3.plugin.cid.substring(24, 32)}} -#define DATA_VST3_CONTROLLER_CID_1 0x{{=it.vst3.controller.cid.substring(0, 8)}} -#define DATA_VST3_CONTROLLER_CID_2 0x{{=it.vst3.controller.cid.substring(8, 16)}} -#define DATA_VST3_CONTROLLER_CID_3 0x{{=it.vst3.controller.cid.substring(16, 24)}} -#define DATA_VST3_CONTROLLER_CID_4 0x{{=it.vst3.controller.cid.substring(24, 32)}} +#define DATA_VST3_CONTROLLER_CID_1 0x{{=it.vst3.controller.cid.substring(0, 8)}} +#define DATA_VST3_CONTROLLER_CID_2 0x{{=it.vst3.controller.cid.substring(8, 16)}} +#define DATA_VST3_CONTROLLER_CID_3 0x{{=it.vst3.controller.cid.substring(16, 24)}} +#define DATA_VST3_CONTROLLER_CID_4 0x{{=it.vst3.controller.cid.substring(24, 32)}} -static const Steinberg_TUID dataPluginCID = SMTG_INLINE_UID(DATA_VST3_PLUGIN_CID_1, DATA_VST3_PLUGIN_CID_2, DATA_VST3_PLUGIN_CID_3, DATA_VST3_PLUGIN_CID_4); +static const Steinberg_TUID dataPluginCID = SMTG_INLINE_UID(DATA_VST3_PLUGIN_CID_1, DATA_VST3_PLUGIN_CID_2, DATA_VST3_PLUGIN_CID_3, DATA_VST3_PLUGIN_CID_4); static const Steinberg_TUID dataControllerCID = SMTG_INLINE_UID(DATA_VST3_CONTROLLER_CID_1, DATA_VST3_CONTROLLER_CID_2, DATA_VST3_CONTROLLER_CID_3, DATA_VST3_CONTROLLER_CID_4); -#define DATA_VST3_SUBCATEGORY "{{=it.vst3.subCategory}}" +#define DATA_VST3_SUBCATEGORY "{{=it.vst3.subCategory}}" -#define DATA_PRODUCT_BUSES_AUDIO_INPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").length}} -#define DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").length}} -#define DATA_PRODUCT_BUSES_MIDI_INPUT_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length}} -#define DATA_PRODUCT_BUSES_MIDI_OUTPUT_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "output").length}} +#define DATA_PRODUCT_BUSES_AUDIO_INPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").length}} +#define DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").length}} +#define DATA_PRODUCT_BUSES_MIDI_INPUT_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length}} +#define DATA_PRODUCT_BUSES_MIDI_OUTPUT_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "output").length}} -#define DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0)}} -#define DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0)}} +#define DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0)}} +#define DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0)}} #if DATA_PRODUCT_BUSES_AUDIO_INPUT_N > 0 static struct Steinberg_Vst_BusInfo busInfoAudioInput[DATA_PRODUCT_BUSES_AUDIO_INPUT_N] = { {{~it.product.buses.filter(x => x.type == "audio" && x.direction == "input") :b}} { - /* .mediaType = */ Steinberg_Vst_MediaTypes_kAudio, - /* .direction = */ Steinberg_Vst_BusDirections_kInput, - /* .channelCount = */ {{=b.channels == "mono" ? 1 : 2}}, - /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, - /* .flags = */ 0{{?b.cv}} | Steinberg_Vst_BusInfo_BusFlags_kIsControlVoltage{{?}}{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} + /* .mediaType = */ Steinberg_Vst_MediaTypes_kAudio, + /* .direction = */ Steinberg_Vst_BusDirections_kInput, + /* .channelCount = */ {{=b.channels == "mono" ? 1 : 2}}, + /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, + /* .flags = */ 0{{?b.cv}} | Steinberg_Vst_BusInfo_BusFlags_kIsControlVoltage{{?}}{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} }, {{~}} }; @@ -75,12 +75,12 @@ static struct Steinberg_Vst_BusInfo busInfoAudioInput[DATA_PRODUCT_BUSES_AUDIO_I static struct Steinberg_Vst_BusInfo busInfoAudioOutput[DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N] = { {{~it.product.buses.filter(x => x.type == "audio" && x.direction == "output") :b}} { - /* .mediaType = */ Steinberg_Vst_MediaTypes_kAudio, - /* .direction = */ Steinberg_Vst_BusDirections_kOutput, - /* .channelCount = */ {{=b.channels == "mono" ? 1 : 2}}, - /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, - /* .flags = */ 0{{?b.cv}} | Steinberg_Vst_BusInfo_BusFlags_kIsControlVoltage{{?}}{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} + /* .mediaType = */ Steinberg_Vst_MediaTypes_kAudio, + /* .direction = */ Steinberg_Vst_BusDirections_kOutput, + /* .channelCount = */ {{=b.channels == "mono" ? 1 : 2}}, + /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, + /* .flags = */ 0{{?b.cv}} | Steinberg_Vst_BusInfo_BusFlags_kIsControlVoltage{{?}}{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} }, {{~}} }; @@ -90,12 +90,12 @@ static struct Steinberg_Vst_BusInfo busInfoAudioOutput[DATA_PRODUCT_BUSES_AUDIO_ static struct Steinberg_Vst_BusInfo busInfoMidiInput[DATA_PRODUCT_BUSES_MIDI_INPUT_N] = { {{~it.product.buses.filter(x => x.type == "midi" && x.direction == "input") :b}} { - /* .mediaType = */ Steinberg_Vst_MediaTypes_kEvent, - /* .direction = */ Steinberg_Vst_BusDirections_kInput, - /* .channelCount = */ 16, - /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, - /* .flags = */ 0{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} + /* .mediaType = */ Steinberg_Vst_MediaTypes_kEvent, + /* .direction = */ Steinberg_Vst_BusDirections_kInput, + /* .channelCount = */ 16, + /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, + /* .flags = */ 0{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} }, {{~}} }; @@ -105,12 +105,12 @@ static struct Steinberg_Vst_BusInfo busInfoMidiInput[DATA_PRODUCT_BUSES_MIDI_INP static struct Steinberg_Vst_BusInfo busInfoMidiOutput[DATA_PRODUCT_BUSES_MIDI_OUTPUT_N] = { {{~it.product.buses.filter(x => x.type == "midi" && x.direction == "output") :b}} { - /* .mediaType = */ Steinberg_Vst_MediaTypes_kEvent, - /* .direction = */ Steinberg_Vst_BusDirections_kOutput, - /* .channelCount = */ 16, - /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, - /* .flags = */ 0{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} + /* .mediaType = */ Steinberg_Vst_MediaTypes_kEvent, + /* .direction = */ Steinberg_Vst_BusDirections_kOutput, + /* .channelCount = */ 16, + /* .name = */ { {{~Array.from(b.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .busType = */ {{?b.sidechain}}Steinberg_Vst_BusTypes_kAux{{??}}Steinberg_Vst_BusTypes_kMain{{?}}, + /* .flags = */ 0{{?!b.optional}} | Steinberg_Vst_BusInfo_BusFlags_kDefaultActive{{?}} }, {{~}} }; @@ -122,91 +122,91 @@ static uint32_t midiInIndex[DATA_PRODUCT_BUSES_MIDI_INPUT_N] = { }; #endif -#define DATA_PRODUCT_PARAMETERS_N {{=it.product.parameters.filter(x => !x.isLatency).length}} +#define DATA_PRODUCT_PARAMETERS_N {{=it.product.parameters.filter(x => !x.isLatency).length}} #if DATA_PRODUCT_PARAMETERS_N + DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 static struct Steinberg_Vst_ParameterInfo parameterInfo[DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N] = { {{~it.product.parameters.filter(x => !x.isLatency) :p:i}} { {{?p.isBypass}} - /* .id = */ {{=(it.tibia.vst3.sdbm("Bypass") & 0x7fffffff) >>> 0}}, - /* .title = */ { {{~Array.from("Bypass") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .shortTitle = */ { {{~Array.from("Bypass") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .units = */ { 0 }, - /* .stepCount = */ 1, - /* .defaultNormalizedValue = */ 0.0, - /* .unitId = */ 0, - /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsBypass | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate + /* .id = */ {{=(it.tibia.vst3.sdbm("Bypass") & 0x7fffffff) >>> 0}}, + /* .title = */ { {{~Array.from("Bypass") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .shortTitle = */ { {{~Array.from("Bypass") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .units = */ { 0 }, + /* .stepCount = */ 1, + /* .defaultNormalizedValue = */ 0.0, + /* .unitId = */ 0, + /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsBypass | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate {{??}} - /* .id = */ {{=(it.tibia.vst3.sdbm(p.name) & 0x7fffffff) >>> 0}}, - /* .title = */ { {{~Array.from(p.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .shortTitle = */ { {{~Array.from(p.shortName) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .units = */ { {{~Array.from(p.unit in it.tibia.vst3.units ? it.tibia.vst3.units[p.unit] : "") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .stepCount = */ {{=p.toggled ? 1 : (p.list && p.scalePoints.length > 1 ? p.scalePoints.length - 1 : (p.integer ? p.maximum - p.minimum : 0))}}, - /* .defaultNormalizedValue = */ {{?p.map == "logarithmic"}}{{=Number(Math.log(p.defaultValue / p.minimum) / (2 * Math.log(Math.sqrt(p.minimum * p.maximum) / Math.abs(p.minimum)))).toExponential()}}{{??}}{{=Number((p.defaultValue - p.minimum) / (p.maximum - p.minimum)).toExponential()}}{{?}}, - /* .unitId = */ 0, - /* .flags = */ {{?p.direction == "input"}}Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate{{??}}Steinberg_Vst_ParameterInfo_ParameterFlags_kIsReadOnly{{?}} + /* .id = */ {{=(it.tibia.vst3.sdbm(p.name) & 0x7fffffff) >>> 0}}, + /* .title = */ { {{~Array.from(p.name) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .shortTitle = */ { {{~Array.from(p.shortName) :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .units = */ { {{~Array.from(p.unit in it.tibia.vst3.units ? it.tibia.vst3.units[p.unit] : "") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .stepCount = */ {{=p.toggled ? 1 : (p.list && p.scalePoints.length > 1 ? p.scalePoints.length - 1 : (p.integer ? p.maximum - p.minimum : 0))}}, + /* .defaultNormalizedValue = */ {{?p.map == "logarithmic"}}{{=Number(Math.log(p.defaultValue / p.minimum) / (2 * Math.log(Math.sqrt(p.minimum * p.maximum) / Math.abs(p.minimum)))).toExponential()}}{{??}}{{=Number((p.defaultValue - p.minimum) / (p.maximum - p.minimum)).toExponential()}}{{?}}, + /* .unitId = */ 0, + /* .flags = */ {{?p.direction == "input"}}Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate{{??}}Steinberg_Vst_ParameterInfo_ParameterFlags_kIsReadOnly{{?}} {{?}} }, {{~}} {{~it.product.buses.filter(x => x.type == "midi" && x.direction == "input") :b:i}} { - /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Channel Pressure") & 0x7fffffff) >>> 0}}, - /* .title = */ { {{~Array.from(b.name + " Channel Pressure") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .shortTitle = */ { {{~Array.from(b.shortName + " Chan Pres") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .units = */ { 0 }, - /* .stepCount = */ 0, - /* .defaultNormalizedValue = */ 0.0, - /* .unitId = */ 0, - /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate + /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Channel Pressure") & 0x7fffffff) >>> 0}}, + /* .title = */ { {{~Array.from(b.name + " Channel Pressure") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .shortTitle = */ { {{~Array.from(b.shortName + " Chan Pres") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .units = */ { 0 }, + /* .stepCount = */ 0, + /* .defaultNormalizedValue = */ 0.0, + /* .unitId = */ 0, + /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate }, { - /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Pitch Bend") & 0x7fffffff) >>> 0}}, - /* .title = */ { {{~Array.from(b.name + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .shortTitle = */ { {{~Array.from(b.shortName + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .units = */ { 0 }, - /* .stepCount = */ 0, - /* .defaultNormalizedValue = */ 0.5, - /* .unitId = */ 0, - /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate + /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Pitch Bend") & 0x7fffffff) >>> 0}}, + /* .title = */ { {{~Array.from(b.name + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .shortTitle = */ { {{~Array.from(b.shortName + " Pitch Bend") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .units = */ { 0 }, + /* .stepCount = */ 0, + /* .defaultNormalizedValue = */ 0.5, + /* .unitId = */ 0, + /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate }, { - /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Mod Wheel") & 0x7fffffff) >>> 0}}, - /* .title = */ { {{~Array.from(b.name + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .shortTitle = */ { {{~Array.from(b.shortName + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, - /* .units = */ { 0 }, - /* .stepCount = */ 0, - /* .defaultNormalizedValue = */ 0.0, - /* .unitId = */ 0, - /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate + /* .id = */ {{=(it.tibia.vst3.sdbm(b.name + " Mod Wheel") & 0x7fffffff) >>> 0}}, + /* .title = */ { {{~Array.from(b.name + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .shortTitle = */ { {{~Array.from(b.shortName + " Mod Wheel") :c}}0x{{=c.charCodeAt(0).toString(16)}}, {{~}}0 }, + /* .units = */ { 0 }, + /* .stepCount = */ 0, + /* .defaultNormalizedValue = */ 0.0, + /* .unitId = */ 0, + /* .flags = */ Steinberg_Vst_ParameterInfo_ParameterFlags_kIsHidden | Steinberg_Vst_ParameterInfo_ParameterFlags_kCanAutomate }, {{~}} }; # if DATA_PRODUCT_PARAMETERS_N > 0 -# define DATA_PARAM_BYPASS 1 -# define DATA_PARAM_TOGGLED (1<<1) -# define DATA_PARAM_INTEGER (1<<2) -# define DATA_PARAM_MAP_LOG (1<<3) +# define DATA_PARAM_BYPASS 1 +# define DATA_PARAM_TOGGLED (1<<1) +# define DATA_PARAM_INTEGER (1<<2) +# define DATA_PARAM_MAP_LOG (1<<3) static struct { - size_t index; - double min; - double max; - double def; - uint32_t flags; - double mapK; + size_t index; + double min; + double max; + double def; + uint32_t flags; + double mapK; // scalePoints? } parameterData[DATA_PRODUCT_PARAMETERS_N] = { {{~it.product.parameters.filter(x => !x.isLatency) :p:i}} { - /* .index = */ {{=p.paramIndex}}, - /* .min = */ {{=p.minimum.toExponential()}}, - /* .max = */ {{=p.maximum.toExponential()}}, - /* .def = */ {{=p.defaultValue.toExponential()}}, - /* .flags = */ {{?p.isBypass}}DATA_PARAM_BYPASS{{??}}0{{?p.toggled}} | DATA_PARAM_TOGGLED{{?}}{{?p.integer}} | DATA_PARAM_INTEGER{{?}}{{?p.map == "logarithmic"}} | DATA_PARAM_MAP_LOG{{?}}{{?}}, - /* .mapK = */ {{?p.map == "logarithmic"}}{{=Number(2.0 * Math.log(Math.sqrt(p.maximum * p.minimum) / Math.abs(p.minimum))).toExponential()}}{{??}}0.0{{?}} + /* .index = */ {{=p.paramIndex}}, + /* .min = */ {{=p.minimum.toExponential()}}, + /* .max = */ {{=p.maximum.toExponential()}}, + /* .def = */ {{=p.defaultValue.toExponential()}}, + /* .flags = */ {{?p.isBypass}}DATA_PARAM_BYPASS{{??}}0{{?p.toggled}} | DATA_PARAM_TOGGLED{{?}}{{?p.integer}} | DATA_PARAM_INTEGER{{?}}{{?p.map == "logarithmic"}} | DATA_PARAM_MAP_LOG{{?}}{{?}}, + /* .mapK = */ {{?p.map == "logarithmic"}}{{=Number(2.0 * Math.log(Math.sqrt(p.maximum * p.minimum) / Math.abs(p.minimum))).toExponential()}}{{??}}0.0{{?}} }, {{~}} }; @@ -216,10 +216,10 @@ static struct { #endif {{?it.product.parameters.find(x => x.isLatency)}} -#define DATA_PARAM_LATENCY_INDEX {{=it.product.parameters.find(x => x.isLatency).paramIndex}} +#define DATA_PARAM_LATENCY_INDEX {{=it.product.parameters.find(x => x.isLatency).paramIndex}} {{?}} {{?it.product.ui}} #define DATA_UI -#define DATA_UI_USER_RESIZABLE {{=it.product.ui.userResizable ? 1 : 0}} +#define DATA_UI_USER_RESIZABLE {{=it.product.ui.userResizable ? 1 : 0}} {{?}} diff --git a/templates/vst3/src/vst3.c b/templates/vst3/src/vst3.c index 29dc96e..adcf8ee 100644 --- a/templates/vst3/src/vst3.c +++ b/templates/vst3/src/vst3.c @@ -22,18 +22,18 @@ #include typedef struct { - void * handle; - const char * format; - const char * (*get_bindir)(void *handle); - const char * (*get_datadir)(void *handle); + void *handle; + const char *format; + const char *(*get_bindir)(void *handle); + const char *(*get_datadir)(void *handle); } plugin_callbacks; typedef struct { - void * handle; - const char * format; - const char * (*get_bindir)(void *handle); - const char * (*get_datadir)(void *handle); - void (*set_parameter)(void *handle, size_t index, float value); + void *handle; + const char *format; + const char *(*get_bindir)(void *handle); + const char *(*get_datadir)(void *handle); + void (*set_parameter)(void *handle, size_t index, float value); } plugin_ui_callbacks; #pragma GCC diagnostic push @@ -86,8 +86,8 @@ typedef struct Steinberg_ITimerHandlerVtbl { /* methods derived from "Steinberg_FUnknown": */ Steinberg_tresult (SMTG_STDMETHODCALLTYPE* queryInterface) (void* thisInterface, const Steinberg_TUID iid, void** obj); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); /* methods derived from "Steinberg_ITimerHandler": */ void (SMTG_STDMETHODCALLTYPE* onTimer) (void* thisInterface); @@ -104,8 +104,8 @@ typedef struct Steinberg_IEventHandlerVtbl { /* methods derived from "Steinberg_FUnknown": */ Steinberg_tresult (SMTG_STDMETHODCALLTYPE* queryInterface) (void* thisInterface, const Steinberg_TUID iid, void** obj); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); /* methods derived from "Steinberg_IEventHandler": */ void (SMTG_STDMETHODCALLTYPE* onFDIsSet) (void* thisInterface, int fd); @@ -123,8 +123,8 @@ typedef struct Steinberg_IRunLoopVtbl { /* methods derived from "Steinberg_FUnknown": */ Steinberg_tresult (SMTG_STDMETHODCALLTYPE* queryInterface) (void* thisInterface, const Steinberg_TUID iid, void** obj); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); - Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* addRef) (void* thisInterface); + Steinberg_uint32 (SMTG_STDMETHODCALLTYPE* release) (void* thisInterface); /* methods derived from "Steinberg_IRunLoop": */ Steinberg_tresult (SMTG_STDMETHODCALLTYPE* registerEventHandler) (void* thisInterface, struct Steinberg_IEventHandler* handler, int fd); @@ -196,35 +196,35 @@ static double parameterAdjust(int i, double v) { } typedef struct pluginInstance { - Steinberg_Vst_IComponentVtbl * vtblIComponent; - Steinberg_Vst_IAudioProcessorVtbl * vtblIAudioProcessor; - Steinberg_Vst_IProcessContextRequirementsVtbl * vtblIProcessContextRequirements; - Steinberg_uint32 refs; - Steinberg_FUnknown * context; - plugin p; - float sampleRate; + Steinberg_Vst_IComponentVtbl *vtblIComponent; + Steinberg_Vst_IAudioProcessorVtbl *vtblIAudioProcessor; + Steinberg_Vst_IProcessContextRequirementsVtbl *vtblIProcessContextRequirements; + Steinberg_uint32 refs; + Steinberg_FUnknown *context; + plugin p; + float sampleRate; #if DATA_PRODUCT_PARAMETERS_N > 0 - float parameters[DATA_PRODUCT_PARAMETERS_N]; + float parameters[DATA_PRODUCT_PARAMETERS_N]; #endif #if DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N > 0 - const float * inputs[DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N]; + const float *inputs[DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N]; #endif #if DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N > 0 - float * outputs[DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N]; + float *outputs[DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N]; #endif #if DATA_PRODUCT_BUSES_AUDIO_INPUT_N > 0 - char inputsActive[DATA_PRODUCT_BUSES_AUDIO_INPUT_N]; + char inputsActive[DATA_PRODUCT_BUSES_AUDIO_INPUT_N]; #endif #if DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N > 0 - char outputsActive[DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N]; + char outputsActive[DATA_PRODUCT_BUSES_AUDIO_OUTPUT_N]; #endif #if DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 - char midiInputsActive[DATA_PRODUCT_BUSES_MIDI_INPUT_N]; + char midiInputsActive[DATA_PRODUCT_BUSES_MIDI_INPUT_N]; #endif #if DATA_PRODUCT_BUSES_MIDI_OUTPUT_N > 0 - char midiOutputsActive[DATA_PRODUCT_BUSES_MIDI_OUTPUT_N]; + char midiOutputsActive[DATA_PRODUCT_BUSES_MIDI_OUTPUT_N]; #endif - void * mem; + void *mem; } pluginInstance; static Steinberg_Vst_IComponentVtbl pluginVtblIComponent; @@ -293,10 +293,10 @@ static Steinberg_tresult pluginInitialize(void *thisInterface, struct Steinberg_ p->context = context; plugin_callbacks cbs = { - /* .handle = */ (void *)p, - /* .format = */ "vst3", - /* .get_bindir = */ get_bindir_cb, - /* .get_datadir = */ get_datadir_cb + /* .handle = */ (void *)p, + /* .format = */ "vst3", + /* .get_bindir = */ get_bindir_cb, + /* .get_datadir = */ get_datadir_cb }; plugin_init(&p->p, &cbs); #if DATA_PRODUCT_PARAMETERS_N > 0 @@ -558,24 +558,24 @@ static Steinberg_tresult pluginGetState(void* thisInterface, struct Steinberg_IB static Steinberg_Vst_IComponentVtbl pluginVtblIComponent = { /* FUnknown */ - /* .queryInterface = */ pluginIComponentQueryInterface, - /* .addRef = */ pluginIComponentAddRef, - /* .release = */ pluginIComponentRelease, + /* .queryInterface = */ pluginIComponentQueryInterface, + /* .addRef = */ pluginIComponentAddRef, + /* .release = */ pluginIComponentRelease, /* IPluginBase */ - /* .initialize = */ pluginInitialize, - /* .terminate = */ pluginTerminate, + /* .initialize = */ pluginInitialize, + /* .terminate = */ pluginTerminate, /* IComponent */ - /* .getControllerClassId = */ pluginGetControllerClassId, - /* .setIoMode = */ pluginSetIoMode, - /* .getBusCount = */ pluginGetBusCount, - /* .getBusInfo = */ pluginGetBusInfo, - /* .getRoutingInfo = */ pluginGetRoutingInfo, - /* .activateBus = */ pluginActivateBus, - /* .setActive = */ pluginSetActive, - /* .setState = */ pluginSetState, - /* .getState = */ pluginGetState + /* .getControllerClassId = */ pluginGetControllerClassId, + /* .setIoMode = */ pluginSetIoMode, + /* .getBusCount = */ pluginGetBusCount, + /* .getBusInfo = */ pluginGetBusInfo, + /* .getRoutingInfo = */ pluginGetRoutingInfo, + /* .activateBus = */ pluginActivateBus, + /* .setActive = */ pluginSetActive, + /* .setState = */ pluginSetState, + /* .getState = */ pluginGetState }; static Steinberg_tresult pluginIAudioProcessorQueryInterface(void *thisInterface, const Steinberg_TUID iid, void ** obj) { @@ -853,19 +853,19 @@ static Steinberg_uint32 pluginGetTailSamples(void* thisInterface) { static Steinberg_Vst_IAudioProcessorVtbl pluginVtblIAudioProcessor = { /* FUnknown */ - /* .queryInterface = */ pluginIAudioProcessorQueryInterface, - /* .addRef = */ pluginIAudioProcessorAddRef, - /* .release = */ pluginIAudioProcessorRelease, + /* .queryInterface = */ pluginIAudioProcessorQueryInterface, + /* .addRef = */ pluginIAudioProcessorAddRef, + /* .release = */ pluginIAudioProcessorRelease, /* IAudioProcessor */ - /* .setBusArrangements = */ pluginSetBusArrangements, - /*. getBusArrangement = */ pluginGetBusArrangement, - /* .canProcessSampleSize = */ pluginCanProcessSampleSize, - /* .getLatencySamples = */ pluginGetLatencySamples, - /* .setupProcessing = */ pluginSetupProcessing, - /* .setProcessing = */ pluginSetProcessing, - /* .process = */ pluginProcess, - /* .getTailSamples = */ pluginGetTailSamples + /* .setBusArrangements = */ pluginSetBusArrangements, + /*. getBusArrangement = */ pluginGetBusArrangement, + /* .canProcessSampleSize = */ pluginCanProcessSampleSize, + /* .getLatencySamples = */ pluginGetLatencySamples, + /* .setupProcessing = */ pluginSetupProcessing, + /* .setProcessing = */ pluginSetProcessing, + /* .process = */ pluginProcess, + /* .getTailSamples = */ pluginGetTailSamples }; static Steinberg_tresult pluginIProcessContextRequirementsQueryInterface(void *thisInterface, const Steinberg_TUID iid, void ** obj) { @@ -892,31 +892,31 @@ static Steinberg_uint32 pluginGetProcessContextRequirements(void* thisInterface) static Steinberg_Vst_IProcessContextRequirementsVtbl pluginVtblIProcessContextRequirements = { /* FUnknown */ - /* .queryInterface = */ pluginIProcessContextRequirementsQueryInterface, - /* .addRef = */ pluginIProcessContextRequirementsAddRef, - /* .release = */ pluginIProcessContextRequirementsRelease, + /* .queryInterface = */ pluginIProcessContextRequirementsQueryInterface, + /* .addRef = */ pluginIProcessContextRequirementsAddRef, + /* .release = */ pluginIProcessContextRequirementsRelease, /* IProcessContextRequirements */ - /* .getProcessContextRequirements = */ pluginGetProcessContextRequirements + /* .getProcessContextRequirements = */ pluginGetProcessContextRequirements }; typedef struct plugView plugView; typedef struct controller { - Steinberg_Vst_IEditControllerVtbl * vtblIEditController; - Steinberg_Vst_IMidiMappingVtbl * vtblIMidiMapping; + Steinberg_Vst_IEditControllerVtbl *vtblIEditController; + Steinberg_Vst_IMidiMappingVtbl *vtblIMidiMapping; #ifdef DATA_UI //Steinberg_Vst_IConnectionPointVtbl * vtblIConnectionPoint; #endif - Steinberg_uint32 refs; - Steinberg_FUnknown * context; + Steinberg_uint32 refs; + Steinberg_FUnknown *context; #if DATA_PRODUCT_PARAMETERS_N + DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 - double parameters[DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N]; + double parameters[DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N]; #endif - struct Steinberg_Vst_IComponentHandler * componentHandler; + struct Steinberg_Vst_IComponentHandler *componentHandler; #ifdef DATA_UI - plugView ** views; - size_t viewsCount; + plugView **views; + size_t viewsCount; #endif } controller; @@ -929,10 +929,10 @@ static Steinberg_Vst_IEditControllerVtbl controllerVtblIEditController; # include typedef struct { - Steinberg_ITimerHandlerVtbl * vtblITimerHandler; - Steinberg_uint32 refs; - void * data; - void (*cb)(void *data); + Steinberg_ITimerHandlerVtbl *vtblITimerHandler; + Steinberg_uint32 refs; + void *data; + void (*cb)(void *data); } timerHandler; static Steinberg_tresult timerHandlerQueryInterface(void *thisInterface, const Steinberg_TUID iid, void ** obj) { @@ -983,12 +983,12 @@ static void timerHandlerOnTimer(void* thisInterface) { static Steinberg_ITimerHandlerVtbl timerHandlerVtblITimerHandler = { /* FUnknown */ - /* .queryInterface = */ timerHandlerQueryInterface, - /* .addRef = */ timerHandlerAddRef, - /* .release = */ timerHandlerRelease, + /* .queryInterface = */ timerHandlerQueryInterface, + /* .addRef = */ timerHandlerAddRef, + /* .release = */ timerHandlerRelease, /* ITimerHandler */ - /* .onTimer = */ timerHandlerOnTimer + /* .onTimer = */ timerHandlerOnTimer }; # elif defined(__APPLE__) @@ -1000,19 +1000,19 @@ static Steinberg_ITimerHandlerVtbl timerHandlerVtblITimerHandler = { # endif typedef struct plugView { - Steinberg_IPlugViewVtbl * vtblIPlugView; - Steinberg_uint32 refs; - Steinberg_IPlugFrame * frame; - plugin_ui * ui; - controller * ctrl; + Steinberg_IPlugViewVtbl *vtblIPlugView; + Steinberg_uint32 refs; + Steinberg_IPlugFrame *frame; + plugin_ui *ui; + controller *ctrl; # ifdef __linux__ - Steinberg_IRunLoop * runLoop; - timerHandler timer; - Display * display; + Steinberg_IRunLoop *runLoop; + timerHandler timer; + Display *display; # elif defined(__APPLE__) - CFRunLoopTimerRef timer; + CFRunLoopTimerRef timer; # elif defined(_WIN32) || defined(__CYGWIN__) - UINT_PTR timer; + UINT_PTR timer; # endif } plugView; @@ -1134,14 +1134,14 @@ static Steinberg_tresult plugViewAttached(void* thisInterface, void* parent, Ste return Steinberg_kInvalidArgument; plugin_ui_callbacks cbs = { - /* .handle = */ (void *)v, - /* .format = */ "vst3", - /* .get_bindir = */ get_bindir_cb, - /* .get_datadir = */ get_datadir_cb, + /* .handle = */ (void *)v, + /* .format = */ "vst3", + /* .get_bindir = */ get_bindir_cb, + /* .get_datadir = */ get_datadir_cb, # if DATA_PRODUCT_PARAMETERS_N > 0 - /* .set_parameter = */ plugViewSetParameterCb + /* .set_parameter = */ plugViewSetParameterCb # else - /* .set_parameter = */ NULL + /* .set_parameter = */ NULL # endif }; v->ui = plugin_ui_create(1, parent, &cbs); @@ -1163,11 +1163,11 @@ static Steinberg_tresult plugViewAttached(void* thisInterface, void* parent, Ste } # elif defined(__APPLE__) CFRunLoopTimerContext ctx = { - /* .version = */ 0, - /* .info = */ v, - /* .retain = */ NULL, - /* .release = */ NULL, - /* .copyDescription = */ NULL + /* .version = */ 0, + /* .info = */ v, + /* .retain = */ NULL, + /* .release = */ NULL, + /* .copyDescription = */ NULL }; v->timer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 20.0 / 1000.0, 0, 0, plugViewTimerCb, &ctx); CFRunLoopAddTimer(CFRunLoopGetCurrent(), v->timer, kCFRunLoopCommonModes); @@ -1356,23 +1356,23 @@ static void plugViewOnTimer(void *thisInterface) { static Steinberg_IPlugViewVtbl plugViewVtblIPlugView = { /* FUnknown */ - /* .queryInterface = */ plugViewQueryInterface, - /* .addRef = */ plugViewAddRef, - /* .release = */ plugViewRelease, + /* .queryInterface = */ plugViewQueryInterface, + /* .addRef = */ plugViewAddRef, + /* .release = */ plugViewRelease, /* IPlugView */ - /* .isPlatformTypeSupported = */ plugViewIsPlatformTypeSupported, - /* .attached = */ plugViewAttached, - /* .removed = */ plugViewRemoved, - /* .onWheel = */ plugViewOnWheel, - /* .onKeyDown = */ plugViewOnKeyDown, - /* .onKeyUp = */ plugViewOnKeyUp, - /* .getSize = */ plugViewGetSize, - /* .onSize = */ plugViewOnSize, - /* .onFocus = */ plugViewOnFocus, - /* .setFrame = */ plugViewSetFrame, - /* .canResize = */ plugViewCanResize, - /* .checkSizeConstraint = */ plugViewCheckSizeConstraint + /* .isPlatformTypeSupported = */ plugViewIsPlatformTypeSupported, + /* .attached = */ plugViewAttached, + /* .removed = */ plugViewRemoved, + /* .onWheel = */ plugViewOnWheel, + /* .onKeyDown = */ plugViewOnKeyDown, + /* .onKeyUp = */ plugViewOnKeyUp, + /* .getSize = */ plugViewGetSize, + /* .onSize = */ plugViewOnSize, + /* .onFocus = */ plugViewOnFocus, + /* .setFrame = */ plugViewSetFrame, + /* .canResize = */ plugViewCanResize, + /* .checkSizeConstraint = */ plugViewCheckSizeConstraint }; #endif @@ -1457,7 +1457,7 @@ static Steinberg_tresult controllerInitialize(void* thisInterface, struct Steinb #endif #if DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 for (int i = DATA_PRODUCT_PARAMETERS_N; i < DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N; i += 3) { - c->parameters[i] = 0.0; + c->parameters[i ] = 0.0; c->parameters[i + 1] = 0.5; c->parameters[i + 2] = 0.0; } @@ -1741,28 +1741,28 @@ static struct Steinberg_IPlugView* controllerCreateView(void* thisInterface, Ste static Steinberg_Vst_IEditControllerVtbl controllerVtblIEditController = { /* FUnknown */ - /* .queryInterface = */ controllerIEditControllerQueryInterface, - /* .addRef = */ controllerIEditControllerAddRef, - /* .release = */ controllerIEditControllerRelease, + /* .queryInterface = */ controllerIEditControllerQueryInterface, + /* .addRef = */ controllerIEditControllerAddRef, + /* .release = */ controllerIEditControllerRelease, /* IPluginBase */ - /* .initialize = */ controllerInitialize, - /* .terminate = */ controllerTerminate, + /* .initialize = */ controllerInitialize, + /* .terminate = */ controllerTerminate, /* IEditController */ - /* .setComponentState = */ controllerSetComponentState, - /* .setState = */ controllerSetState, - /* .getState = */ controllerGetState, - /* .getParameterCount = */ controllerGetParameterCount, - /* .getParameterInfo = */ controllerGetParameterInfo, - /* .getParamStringByValue = */ controllerGetParamStringByValue, - /* .getParamValueByString = */ controllerGetParamValueByString, - /* .normalizedParamToPlain = */ controllerNormalizedParamToPlain, - /* .plainParamToNormalized = */ controllerPlainParamToNormalized, - /* .getParamNormalized = */ controllerGetParamNormalized, - /* .setParamNormalized = */ controllerSetParamNormalized, - /* .setComponentHandler = */ controllerSetComponentHandler, - /* .createView = */ controllerCreateView + /* .setComponentState = */ controllerSetComponentState, + /* .setState = */ controllerSetState, + /* .getState = */ controllerGetState, + /* .getParameterCount = */ controllerGetParameterCount, + /* .getParameterInfo = */ controllerGetParameterInfo, + /* .getParamStringByValue = */ controllerGetParamStringByValue, + /* .getParamValueByString = */ controllerGetParamValueByString, + /* .normalizedParamToPlain = */ controllerNormalizedParamToPlain, + /* .plainParamToNormalized = */ controllerPlainParamToNormalized, + /* .getParamNormalized = */ controllerGetParamNormalized, + /* .setParamNormalized = */ controllerSetParamNormalized, + /* .setComponentHandler = */ controllerSetComponentHandler, + /* .createView = */ controllerCreateView }; static Steinberg_tresult controllerIMidiMappingQueryInterface(void* thisInterface, const Steinberg_TUID iid, void** obj) { @@ -1808,12 +1808,12 @@ static Steinberg_tresult controllerGetMidiControllerAssignment(void* thisInterfa static Steinberg_Vst_IMidiMappingVtbl controllerVtblIMidiMapping = { /* FUnknown */ - /* .queryInterface = */ controllerIMidiMappingQueryInterface, - /* .addRef = */ controllerIMidiMappingAddRef, - /* .release = */ controllerIMidiMappingRelease, + /* .queryInterface = */ controllerIMidiMappingQueryInterface, + /* .addRef = */ controllerIMidiMappingAddRef, + /* .release = */ controllerIMidiMappingRelease, /* IMidiMapping */ - /* .getMidiControllerAssignment = */ controllerGetMidiControllerAssignment + /* .getMidiControllerAssignment = */ controllerGetMidiControllerAssignment }; #ifdef DATA_UI @@ -1855,14 +1855,14 @@ static Steinberg_tresult controllerIConnectionPointNotify(void* thisInterface, s static Steinberg_Vst_IConnectionPointVtbl controllerVtblIConnectionPoint = { /* FUnknown */ - /* .queryInterface = */ controllerIConnectionPointQueryInterface, - /* .addRef = */ controllerIConnectionPointAddRef, - /* .release = */ controllerIConnectionPointRelease, + /* .queryInterface = */ controllerIConnectionPointQueryInterface, + /* .addRef = */ controllerIConnectionPointAddRef, + /* .release = */ controllerIConnectionPointRelease, /* IConnectionPoint */ - /* .connect = */ controllerIConnectionPointConnect, - /* .disconnect = */ controllerIConnectionPointDisconnect, - /* .notify = */ controllerIConnectionPointNotify + /* .connect = */ controllerIConnectionPointConnect, + /* .disconnect = */ controllerIConnectionPointDisconnect, + /* .notify = */ controllerIConnectionPointNotify }; # endif #endif @@ -2087,22 +2087,22 @@ static Steinberg_tresult factorySetHostContext(void* thisInterface, struct Stein static Steinberg_IPluginFactory3Vtbl factoryVtbl = { /* FUnknown */ - /* .queryInterface = */ factoryQueryInterface, - /* .addRef = */ factoryAddRef, - /* .release = */ factoryRelease, + /* .queryInterface = */ factoryQueryInterface, + /* .addRef = */ factoryAddRef, + /* .release = */ factoryRelease, /* IPluginFactory */ - /* .getFactoryInfo = */ factoryGetFactoryInfo, - /* .countClasses = */ factoryCountClasses, - /* .getClassInfo = */ factoryGetClassInfo, - /* .createInstance = */ factoryCreateInstance, + /* .getFactoryInfo = */ factoryGetFactoryInfo, + /* .countClasses = */ factoryCountClasses, + /* .getClassInfo = */ factoryGetClassInfo, + /* .createInstance = */ factoryCreateInstance, /* IPluginFactory2 */ - /* .getClassInfo2 = */ factoryGetClassInfo2, + /* .getClassInfo2 = */ factoryGetClassInfo2, /* IPluginFactory3 */ - /* .getClassInfoUnicode = */ factoryGetClassInfoUnicode, - /* .setHostContext = */ factorySetHostContext + /* .getClassInfoUnicode = */ factoryGetClassInfoUnicode, + /* .setHostContext = */ factorySetHostContext }; static Steinberg_IPluginFactory3 factory = { &factoryVtbl };