コード例 #1
0
ファイル: mdaRezFilter.cpp プロジェクト: EQ4/lad
void mdaRezFilter::getParameterDisplay(int32_t index, char *text)
{
	switch(index)
  {
    case 0: int2strng((int32_t)(100 * fParam0), text); break;
    case 1: int2strng((int32_t)(100 * fParam1), text); break;
    case 2: int2strng((int32_t)(40 *fParam2 - 20),text); break;
    case 3: int2strng((int32_t)(200 * fParam3 - 100), text); break;
    case 4: float2strng((float)(-301.0301 / (getSampleRate() * log10(1.0 - att))),text); break;
    case 5: float2strng((float)(-301.0301 / (getSampleRate() * log10(rel))),text); break;
    case 6: int2strng((int32_t)(200 * fParam6 - 100), text); break;
    case 7: float2strng((float)pow(10.0f, 4.f*fParam7 - 2.f), text); break;
    case 8: if(tthr==0.f) strcpy(text, "FREE RUN");
            else int2strng((int32_t)(20*log10(0.5*tthr)), text); break;
    case 9: int2strng((int32_t)(100 * fParam9), text); break;
  }
}
コード例 #2
0
ファイル: BoostComp.cpp プロジェクト: WolfSound/BoostComp
void wolfBoostComp::getParameterDisplay(VstInt32 index, char *text) {
  switch(index) {
    case 0:
      if (adj1 > 1.e-6f) {
        float2strng(linear2dB(adj1), text);
      } 
      else {
        strcpy(text, "-Inf");
      }
      break;
    case 1:
      if (adj2 > 1.e-6f) {
        float2strng(linear2dB(adj2), text);
      } 
      else {
        strcpy(text, "-Inf");
      }
      break;
    case 2:
      if (adj3 > 0.f) {
        float2strng(linear2dB(adj3), text);
      } 
      else {
        strcpy(text, "-Inf");
      }
      break;
    case 3:
      float2strng(adj4 * 100.f, text);
      break;
    case 4:
      float2strng(adj5 * 100.f, text);
      break;
    case 5:
      float2strng(fParam6 * 100.f, text);
      break;
  }
}