本文整理汇总了C++中IParam::SetDisplayText方法的典型用法代码示例。如果您正苦于以下问题:C++ IParam::SetDisplayText方法的具体用法?C++ IParam::SetDisplayText怎么用?C++ IParam::SetDisplayText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IParam
的用法示例。
在下文中一共展示了IParam::SetDisplayText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateParams
void SpaceBass::CreateParams() {
for (int i = 0; i < kNumParams; i++) {
IParam* param = GetParam(i);
const parameterProperties_struct& properties = parameterProperties[i];
switch (i) {
// Enum Parameters:
case mOsc1Waveform:
case mOsc2Waveform:
param->InitEnum(properties.name,
Oscillator::OSCILLATOR_MODE_SAW,
Oscillator::kNumOscillatorModes);
// For VST3:
param->SetDisplayText(0, properties.name);
break;
case mLFOWaveform:
param->InitEnum(properties.name,
Oscillator::OSCILLATOR_MODE_TRIANGLE,
Oscillator::kNumOscillatorModes);
// For VST3:
param->SetDisplayText(0, properties.name);
break;
case mFilterMode:
param->InitEnum(properties.name,
Filter::FILTER_MODE_LOWPASS,
Filter::kNumFilterModes);
break;
// Double Parameters:
default:
param->InitDouble(properties.name,
properties.defaultVal,
properties.minVal,
properties.maxVal,
parameterStep);
break;
}
}
GetParam(mFilterCutoff)->SetShape(2);
GetParam(mVolumeEnvAttack)->SetShape(3);
GetParam(mFilterEnvAttack)->SetShape(3);
GetParam(mVolumeEnvDecay)->SetShape(3);
GetParam(mFilterEnvDecay)->SetShape(3);
GetParam(mVolumeEnvSustain)->SetShape(2);
GetParam(mFilterEnvSustain)->SetShape(2);
GetParam(mVolumeEnvRelease)->SetShape(3);
GetParam(mFilterEnvRelease)->SetShape(3);
for (int i = 0; i < kNumParams; i++) {
OnParamChange(i);
}
}
示例2: CreateParams
void Vega::CreateParams() {
for (int i = 0; i < kNumParams; i++) {
IParam* param = GetParam(i);
const paramProperties& properties = paramProps[i];
switch (i) {
// Enum Parameters:
case mOsc1Wave:
case mOsc2Wave:
case mOsc3Wave:
case mLFOWave:
param->InitEnum(properties.name,
Oscillator::OSCILLATOR_MODE_SAW,
Oscillator::kNumOscillatorModes);
// For VST3:
param->SetDisplayText(0, properties.name);
break;
case mFilterType:
param->InitEnum(properties.name,
Filter::FILTER_MODE_LOWPASS,
Filter::kNumFilterModes);
param->SetDisplayText(0, properties.name);
break;
// Integer Parameters (Using double notation)
case mOsc1Oct:
case mOsc2Oct:
case mOsc3Oct:
case mOsc1Pitch:
case mOsc2Pitch:
case mOsc3Pitch:
case mOsc1Phase:
case mOsc2Phase:
case mOsc3Phase:
case mBendRange:
case mOsc1Voices:
case mOsc2Voices:
case mOsc3Voices:
case mFilterSlope:
param->InitInt(properties.name,
(int)properties.defaultVal,
(int)properties.minVal,
(int)properties.maxVal);
break;
// Double Parameters:
default:
param->InitDouble(properties.name,
properties.defaultVal,
properties.minVal,
properties.maxVal,
parameterStep);
break;
}
}
GetParam(mVolAttack)->SetShape(3);
GetParam(mVolDecay)->SetShape(3);
GetParam(mVolSustain)->SetShape(2);
GetParam(mVolRelease)->SetShape(3);
GetParam(mFilterCutoff)->SetShape(2);
GetParam(mFilterCtlCutoff)->SetShape(2);
GetParam(mFilterAttack)->SetShape(3);
GetParam(mFilterDecay)->SetShape(3);
GetParam(mFilterSustain)->SetShape(2);
GetParam(mFilterRelease)->SetShape(3);
for (int i = 0; i < kNumParams; i++) {
OnParamChange(i);
}
}