Beispiel #1
0
	ofxVSTPlugin(audioMasterCallback audioMaster): AudioEffectX (audioMaster, 1, 1) {

		plugin = ofxAudioPlugin_getPlugin(this);
		
		
#ifdef ofxAudioPlugin_IsSynth
		setNumInputs(0);
		isSynth();
#else
		setNumInputs (2);		// stereo in
#endif
		setNumOutputs (2);		// stereo out
		setUniqueID (ofxAudioPlugin_PluginCode);	// identify
		canProcessReplacing ();	// supports replacing output

		
		fGain = 1.f;			// default to 0 dB
		vst_strncpy (programName, "Default", kVstMaxProgNameLen);	// default program name
		
		cEffect.numPrograms = 3;
		
		
		cEffect.numParams = plugin->getNumParameters();
		cEffect.numParams = 1;
		
		parametersChanged();
	}
Beispiel #2
0
//-------------------------------------------------------------------------------------------------------
e6::e6 (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, nParams )	// 1 program, 1 parameter only
{
	setNumInputs (0);		// no in
	setNumOutputs (0);		// no out
	setUniqueID ('e6e6');	// identify

	// we don't do audio !
	canProcessReplacing (false);	// supports replacing output
	canDoubleReplacing (false);	// supports double precision processing


	for ( int id=0; id<nParams; id++ ) 
	{
		sprintf( params[id].name,"param_%d", id );
		strcpy( params[id].label, "db" ); 
		params[id].value = 0.0f; 
	}

	vst_strncpy (programName, "Default", kVstMaxProgNameLen);	// default program name

	logFile = fopen("e6.log", "wb" );
	int res = sock.connect( "localhost", 9999 );
	if ( res = SOCKET_ERROR )
	{
		fprintf( logFile, "could not connect to localhost on 9999\n" );
		fflush( logFile );
	}
	else
	{
		fprintf( logFile, "connected to localhost on 9999\n" );
		fflush( logFile );
	}
}
Beispiel #3
0
SorolletVSTi::SorolletVSTi(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, kNumPrograms, kNumParams)
{
	if (audioMaster)
	{
		// TODO: load default / more varied programs!

		// initialize programs
		programs = new SorolletVSTiProgram[kNumPrograms];
		for (VstInt32 i = 0; i < 16; i++)
			channelPrograms[i] = i;

		mSorolletVoice = new SorolletVoice();

		if (programs)
		{
			setProgram(0);
		}

		setNumInputs(0); // no inputs
		setNumOutputs(kNumOutputs); // 2 outputs
		canProcessReplacing();
		isSynth();
		setUniqueID('so02');

		currentEvent = EVENT_NULL;

		initProcess();
		suspend();
	}
}
Beispiel #4
0
//-----------------------------------------------------------------------------
SurroundDelay::SurroundDelay (audioMasterCallback audioMaster)
: ADelay (audioMaster)
, plugInput (0)
, plugOutput (0)
{
	
	// The first buffer is allocated in ADelay's constructor
	for (int i = 1; i < MAX_CHANNELS; i++)
	{
		sBuffers[i] = new float[size];
	}
	
	setNumInputs (MAX_CHANNELS);
	setNumOutputs (MAX_CHANNELS);

	// We initialize the arrangements to default values.
	// Nevertheless, the host should modify them via
	// appropriate calls to setSpeakerArrangement.
	allocateArrangement (&plugInput, MAX_CHANNELS);
	plugInput->type = kSpeakerArr51;

	allocateArrangement (&plugOutput, MAX_CHANNELS);
	plugOutput->type = kSpeakerArr51;

	setUniqueID ('SDlE');	// this should be unique, use the Steinberg web page for plugin Id registration

	// create the editor
	editor = new SDEditor (this);

	resume ();
}
mdaDetune::mdaDetune(audioMasterCallback audioMaster): AudioEffectX(audioMaster, NPROGS, NPARAMS)
{
  setNumInputs(2);
  setNumOutputs(2);
  setUniqueID('mdat');  ///identify mdaDetune-in here
	DECLARE_VST_DEPRECATED(canMono) ();
  canProcessReplacing();

  programs[0].param[0] = 0.20f; //fine
  programs[0].param[1] = 0.90f; //mix
  programs[0].param[2] = 0.50f; //output
  programs[0].param[3] = 0.50f; //chunksize
  strcpy(programs[0].name, "Stereo Detune");
  programs[1].param[0] = 0.20f;
  programs[1].param[1] = 0.90f;
  programs[1].param[2] = 0.50f;
  programs[1].param[3] = 0.50f;
  strcpy(programs[1].name,"Symphonic");
  programs[2].param[0] = 0.8f;
  programs[2].param[1] = 0.7f;
  programs[2].param[2] = 0.50f;
  programs[2].param[3] = 0.50f;
  strcpy(programs[2].name,"Out Of Tune");

  ///initialise...
  curProgram=0;
  suspend();
  
  semi = 3.0f * 0.20f * 0.20f * 0.20f;
  dpos2 = (float)pow(1.0594631f, semi);
  dpos1 = 1.0f / dpos2;
  wet = 1.0f;
  dry = wet - wet * 0.90f * 0.90f;
  wet = (wet + wet - wet * 0.90f) * 0.90f;
}
Beispiel #6
0
mdaAmbience::mdaAmbience(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 4)	// programs, parameters
{
  //inits here!
  fParam0 = 0.7f; //size
  fParam1 = 0.7f; //hf
  fParam2 = 0.9f; //mix
  fParam3 = 0.5f; //output

  size = 0;

	buf1 = new float[1024];
	buf2 = new float[1024];
	buf3 = new float[1024];
	buf4 = new float[1024];

  fil = 0.0f;
  den = pos=0;

  setNumInputs(2);
	setNumOutputs(2);
	setUniqueID("mdaAmb");    // identify here
	DECLARE_LVZ_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Small Space Ambience");

  suspend();		// flush buffer
  setParameter(0, 0.7f); //go and set initial values!
}
Beispiel #7
0
//-----------------------------------------------------------------------------
// Plug-In constructor
// 1) create programs
// 2) initialize Plug-in
CSoftExciter::CSoftExciter (audioMasterCallback audioMaster)
			: AudioEffectX (audioMaster, kNumPrograms, kNumParams)
{
	// create our inner plugin
	//
	// This also initializes all the controls; the plugin also
	// stores all its presets so no need to write those objects any more!
    m_pRAFXPlugIn = new CHarmonicSecond;
    m_pRAFXPlugIn->initialize();

	// if you are sr dependent
	m_fSampleRate = getSampleRate();

	// stereo IN
	setNumInputs(2);

	// stereo OUT
	setNumOutputs(2);

	// our GUID
	setUniqueID ('ALNS');

	// IF you have a custom GUI, un-comment this line otherwise will default to
	// standard I/F
	// cEffect.flags |= effFlagsHasEditor;

	// PAUSE function
	suspend ();		// flush buffer
}
Beispiel #8
0
TimedFader::TimedFader(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 1, 3)
{
	//inits here!
	fOutput = 1.0f;
	faderSteps = 15;
	currentFaderFrameCount = 1;

	setNumInputs(2);
	setNumOutputs(2);
	setUniqueID('tFd1');    // identify here
	DECLARE_VST_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Timed Fader 1");

	setParameter(PARAM_PlayDuration, 30.0f); // 10 seconds  //0.166667); //~30 seconds
	setParameter(PARAM_FadeDuration, 3.0f);  // 3 seconds

	fPlaySecondsRemaining = fPlayDuration;
	fFadeSecondsRemaining = fFadeDuration;
	state = STATE_DONE;

	muteGain = (float)pow(10.0f, 0.05f * -60.0f);
	muteGain *= 0.01f;

	fSecondsPerFrame = 1 / sampleRate;
	
	// Create the editor
	faderDisplay = new FaderDisplay(this);
	editor = faderDisplay;

	suspend();		// flush buffer
}
Beispiel #9
0
mdaRezFilter::mdaRezFilter(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 10)	// programs, parameters
{
  //inits here!
  fParam0 = 0.33f; //f
  fParam1 = 0.70f; //q
  fParam2 = 0.50f; //a
  fParam3 = 0.85f; //fenv
  fParam4 = 0.00f; //att
  fParam5 = 0.50f; //rel
  fParam6 = 0.70f; //lfo
  fParam7 = 0.40f; //rate
  fParam8 = 0.00f; //trigger
  fParam9 = 0.75f; //max freq

  fff = fq = fg = fmax = env = fenv = att = rel = 0.0f;
  flfo = phi = dphi = bufl = buf0 = buf1 = buf2 = tthr = env2 = 0.0f;
  lfomode = ttrig = tatt = 0;

  setNumInputs(2);
	setNumOutputs(2);
	setUniqueID("mdaRezFilter");
	DECLARE_LVZ_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Resonant Filter");

  suspend();		// flush buffer
  setParameter(2, 0.5f); //go and set initial values!
}
Beispiel #10
0
NitroSynth::NitroSynth(audioMasterCallback pCallback)
:	AudioEffectX(pCallback, 0, 128),
	fSamplePeriod(1.0f/44100.0f),
	bRecording(false),
	iRecorderState(IDLE)
{
	if ( pCallback )
	{
		setNumInputs(0);
		setNumOutputs(2);
		canProcessReplacing();
		isSynth();
		setUniqueID('SRTN');
	}

	for ( int i = 0 ; i < 8 ; i++ )
		if ( i < 6 )
			pInstruments[i] = new Instrument(new WaveDuty(), & pParameters[i]);
		else
			pInstruments[i] = new Instrument(new Noise(), & pParameters[i]);

#ifndef NO_VST_GUI
	setEditor(new NitroSynthInterface(this));
#endif // NO_VST_GUI
}
mdaTalkBox::mdaTalkBox(audioMasterCallback audioMaster): AudioEffectX(audioMaster, NPROGS, NPARAMS)
{
  setNumInputs(2);
  setNumOutputs(2);
  setUniqueID('mda&');  ///identify plug-in here
  //canMono();
  canProcessReplacing();

  ///initialise...
  buf0 = new float[BUF_MAX];
  buf1 = new float[BUF_MAX];
  window = new float[BUF_MAX];
  car0 = new float[BUF_MAX];
  car1 = new float[BUF_MAX];
  N = 1; //trigger window recalc
  K = 0;

  programs = new mdaTalkBoxProgram[NPROGS];
  if(programs)
  {
    ///differences from default program...
    //programs[1].param[0] = 0.1f;
    //strcpy(programs[1].name,"Another Program");

    setProgram(0);
  }
  
  suspend();
}
Beispiel #12
0
mdaCombo::mdaCombo(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 7)	// programs, parameters
{
  //inits here!
  fParam1 = 1.00f; //select
  fParam2 = 0.50f; //drive
  fParam3 = 0.50f; //bias
  fParam4 = 0.50f; //output
  fParam5 = 0.00f; //stereo
  fParam6 = 0.00f; //hpf freq
  fParam7 = 0.50f; //hpf reso

  size = 1024;
  bufpos = 0;
	buffer = new float[size];
	buffe2 = new float[size];

  setNumInputs(2);
	setNumOutputs(2);
	setUniqueID("mdaCombo");    // identify here
	DECLARE_LVZ_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Amp & Speaker Simulator");
	suspend();		// flush buffer

  setParameter(0, 0.f); //go and set initial values!
}
mdaLimiter::mdaLimiter(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 5)	// 1 program, 4 parameters
{
	fParam1 = (float)0.60; //thresh 		
  fParam2 = (float)0.60; //trim
  fParam3 = (float)0.15; //attack
  fParam4 = (float)0.50; //release
  fParam5 = (float)0.40; //knee

  setNumInputs(2);		    // stereo in
	setNumOutputs(2);		    // stereo out
	setUniqueID('mdaL');    // identify
	DECLARE_VST_DEPRECATED(canMono) ();				      
	canProcessReplacing();	// supports both accumulating and replacing output
	strcpy(programName, "Limiter");	// default program name

  if(fParam5>0.5) //soft knee
  {
    thresh = (float)pow(10.0, 1.0 - (2.0 * fParam1));
  }
  else //hard knee
  {
    thresh = (float)pow(10.0, (2.0 * fParam1) - 2.0);
  }
  trim = (float)(pow(10.0, (2.0 * fParam2) - 1.0));
  att = (float)pow(10.0, -0.01 - 2.0 * fParam3);//wavelab overruns with zero???
  rel = (float)pow(10.0, -2.0 - (3.0 * fParam4));
  gain = 1.0;
}
Beispiel #14
0
mdaTracker::mdaTracker(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 8)	// programs, parameters
{
  //inits here!
  fParam1 = (float)0.00; //Mode
  fParam2 = (float)1.00; //Dynamics
  fParam3 = (float)1.00; //Mix
  fParam4 = (float)0.97; //Tracking
  fParam5 = (float)0.50; //Trnspose
  fParam6 = (float)0.80; //Maximum Hz
  fParam7 = (float)0.50; //Trigger dB
  fParam8 = (float)0.50; //Output

  setNumInputs(2);
	setNumOutputs(2);
	setUniqueID("mdaTracker");    // identify here
	DECLARE_LVZ_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Pitch Tracker");

  dphi = 100.f/getSampleRate(); //initial pitch
  min = (int32_t)(getSampleRate()/30.0); //lower limit
  res1 = (float)cos(0.01); //p
  res2 = (float)sin(0.01); //q

  fi = fo = thr = phi = ddphi = trans = buf1 = buf2 = dn = bold = wet = dry = 0.0f;
  dyn = env = rel = saw = dsaw = res1 = res2 = buf3 = buf4 = 0.0f;
  max = min = num = sig = mode = 0;

  setParameter(0, 0.0f);
}
//-------------------------------------------------------------------------------------------------------
gsBEncoder::gsBEncoder (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, num_params())	// 1 program, N parameters
, gen(0)
, bufferSize(512)
, sampleRate(44100)
, blockSize(512)
{
	inputBuffers.resize(num_inputs());
	outputBuffers.resize(num_outputs());

	for(int i=0; i < inputBuffers.size(); i++) {
		inputBuffers[i] = new t_sample[bufferSize];
	}
	for(int i=0; i < outputBuffers.size(); i++) {
		outputBuffers[i] = new t_sample[bufferSize];
	}

	gen = (CommonState *)create(sampleRate, blockSize);
	setNumInputs (num_inputs());
	setNumOutputs (num_outputs());
	setUniqueID ('GSE_I');	// identify
	canProcessReplacing ();	// supports replacing output
	canDoubleReplacing ();	// supports double precision processing

	vst_strncpy (programName, VST_NAME, kVstMaxProgNameLen);	// default program name
}
Beispiel #16
0
CLlconVST::CLlconVST ( audioMasterCallback AudioMaster ) :
    AudioEffectX ( AudioMaster, 1, 0 ), // 1 program with no parameters (=0)
    Client ( LLCON_DEFAULT_PORT_NUMBER )
{
    // stereo input/output
	setNumInputs  ( 2 );
	setNumOutputs ( 2 );

	setUniqueID ( 'Llco' );

    // capabilities of llcon VST plugin
	canProcessReplacing();	// supports replacing output

    // set default program name
    GetName ( strProgName );

    // we want a single shot timer to shut down the connection if no
    // processing is done anymore (VST host has stopped the stream)
    TimerOnOff.setSingleShot ( true );
    TimerOnOff.setInterval   ( VST_STOP_TIMER_INTERVAL );

    // connect timer event
    connect ( &TimerOnOff, SIGNAL ( timeout() ),
        this, SLOT ( OnTimerOnOff() ) );

// TODO settings
Client.SetServerAddr ( DEFAULT_SERVER_ADDRESS );
}
Beispiel #17
0
LowPass::LowPass(audioMasterCallback audioMaster)
: AudioEffectX(audioMaster, NUM_PRESETS, kNumParams)
{
  programs = new LowPassProgram[numPrograms];
  
  sr = getSampleRate();
  if(sr<0.f) sr = 44100.f;

  fcutoff = log(cutoffDefault/cutoffMin)/(log(cutoffMax/cutoffMin));

  // instantiate callback
  
	// Initialize the internal states
	lambda = lp1 = lp2 = 0.;
   	


  if(programs) setProgram(0);

  setUniqueID(ID);
  setNumInputs(NUM_INPUTS);
  setNumOutputs(NUM_OUTPUTS);
  canProcessReplacing(CAN_PROCESS_REPLACING);
  canMono(CAN_MONO);
}
mdaLooplex::mdaLooplex(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, NPROGS, NPARAMS)
{

  Fs = 44100.0f; //won't we know the sample rate by the time we need it?

  //initialise...
  bypass = bypassed = busy = status = 0; //0=not recorded 1=first pass 2=looping
  bufmax = 882000;
  buffer = new short[bufmax + 10];
  memset(buffer, 0, (bufmax + 10) * sizeof(short));
  bufpos = 0;
  buflen = 0;
  recreq = 0;
  oldParam0 = oldParam1 = oldParam2 = 0.0f;
  modwhl = 1.0f;

  programs = new mdaLooplexProgram[NPROGS];
	if(programs) setProgram(0);

  if(audioMaster)
	{
		setNumInputs(NOUTS);				
		setNumOutputs(NOUTS);
		canProcessReplacing();
    //needIdle(); idle is broken in VST2.4
		setUniqueID('MDA~');	///
	}

  update();
	suspend();
  
  idleList.next = new IdleList(this, idleList.next); //add to idle list, start timer if not running...
}
Beispiel #19
0
Silence::Silence(audioMasterCallback audio_master)
  : AudioEffectX(audio_master, 1, 1) {
  setNumInputs(2);
  setNumOutputs(2);
  setUniqueID('Silence');
  canProcessReplacing();
  canDoubleReplacing();

  vst_strncpy(program_name, "Default", kVstMaxProgNameLen);
}
Beispiel #20
0
mdaBandisto::mdaBandisto(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 10)	// programs, parameters
{
  //inits here!
  fParam1 = (float)1.00; //Listen: L/M/H/out
  fParam2 = (float)0.40; //xover1
  fParam3 = (float)0.50; //xover2
  fParam4 = (float)0.50; //L drive    (1)
  fParam5 = (float)0.50; //M drive
  fParam6 = (float)0.50; //H drive
  fParam7 = (float)0.50; //L trim     (2)
  fParam8 = (float)0.50; //M trim
  fParam9 = (float)0.50; //H trim
  fParam10 = (float)0.0; //unipolar/bipolar

  setNumInputs(2);
	setNumOutputs(2);
	setUniqueID("mdaBand");    // identify here
	DECLARE_LVZ_DEPRECATED(canMono) ();
	canProcessReplacing();
	strcpy(programName, "Multi-Band Distortion");

  //calcs here!
  driv1 = (float)pow(10.0,(6.0 * fParam4 * fParam4) - 1.0);
  driv2 = (float)pow(10.0,(6.0 * fParam5 *fParam5) - 1.0);
  driv3 = (float)pow(10.0,(6.0 * fParam6 *fParam6) - 1.0);

  valve = int(fParam10 > 0.0);
  if(valve)
  {
    trim1 = (float)(0.5);
    trim2 = (float)(0.5);
    trim3 = (float)(0.5);
  }
  else
  {
    trim1 = 0.3f*(float)pow(10.0,(4.0 * pow(fParam4,3.f)));//(0.5 + 500.0 * pow(fParam4,6.0));
    trim2 = 0.3f*(float)pow(10.0,(4.0 * pow(fParam5,3.f)));
    trim3 = 0.3f*(float)pow(10.0,(4.0 * pow(fParam6,3.f)));
  }
  trim1 = (float)(trim1 * pow(10.0, 2.0 * fParam7 - 1.0));
  trim2 = (float)(trim2 * pow(10.0, 2.0 * fParam8 - 1.0));
  trim3 = (float)(trim3 * pow(10.0, 2.0 * fParam9 - 1.0));

  switch(int(fParam1*3.9))
  {
    case 0: trim2=0.0; trim3=0.0; slev=0.0; break;
    case 1: trim1=0.0; trim3=0.0; slev=0.0; break;
    case 2: trim1=0.0; trim2=0.0; slev=0.0; break;
    default: slev=0.5; break;
  }
  fi1 = (float)pow(10.0,fParam2 - 1.70); fo1=(float)(1.0 - fi1);
  fi2 = (float)pow(10.0,fParam3 - 1.05); fo2=(float)(1.0 - fi2);
  fb1 = fb2 = fb3 = 0.0f;
}
Beispiel #21
0
//-------------------------------------------------------------------------------------------------------
JackVST::JackVST (audioMasterCallback audioMaster)
	: AudioEffectX (audioMaster, 1, 1)	// 1 program, 1 parameter only
{
	fGain = 1.;				// default to 0 dB
	setNumInputs (2);		// stereo in
	setNumOutputs (2);		// stereo out
	setUniqueID ('JACK-ASinsert');	// identify
	canMono ();				// makes sense to feed both inputs with the same signal
	canProcessReplacing ();	// supports both accumulating and replacing output
	strcpy (fProgramName, "Default");	// default program name
	fStatus = kIsOff;
}
Convolver2::Convolver2(audioMasterCallback audioMaster)
: AudioEffectX(audioMaster, 0, NUM_PARAMS) {
  setNumInputs(NUM_INPUTS);
  setNumOutputs(NUM_OUTPUTS);
  setUniqueID(UNIQUE_ID);

  editor = new Convolver2Editor(this);
  core = new Convolver2Core(NUM_PARAMS, VERSION, DEF_PRODUCT);
  core->setParameter(PRM_SAMPLE_RATE, getSampleRate(), true);
  ((Convolver2Editor*)editor)->setCore(core);
  ((Convolver2Core*)core)->setEditor((Convolver2Editor*)editor);
}
Beispiel #23
0
//------------------------------------------------------------------------------------
TutorialVST2Effect::TutorialVST2Effect (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, kNumParameters)
{
	setUniqueID (CCONST('G', 'U', 'I', '0'));
	setNumInputs (2);
	setNumOutputs (2);
	parameters[kLeftVolumeParameter] = 1.f;
	parameters[kRightVolumeParameter] = 1.f;

	extern AEffGUIEditor* createEditor (AudioEffectX*);
	setEditor (createEditor (this));
}
Beispiel #24
0
Vst2413r::Vst2413r(audioMasterCallback audioMaster)
:   AudioEffectX(audioMaster, 0, 0),
    driver_(44100)
{
    if(audioMaster != NULL) {
        setNumInputs(0);
        setNumOutputs(1);
        setUniqueID(kUniqueId);
        canProcessReplacing();
        isSynth();
    }
    suspend();
}
Beispiel #25
0
//-------------------------------------------------------------------------------------------------------
JackVST::JackVST (audioMasterCallback audioMaster)
	: AudioEffectX (audioMaster, 1, 1),c_jar(NULL),c_error(JARInsert::kNoErr)// 1 program, 1 parameter only
{
	fGain = 1.;				// default to 0 dB
	setNumInputs(2);		// stereo in
	setNumOutputs(2);		// stereo out
	setUniqueID('JACK');	// identify
	canProcessReplacing();	// supports both accumulating and replacing output
	strcpy(programName, "Default");	// default program name
	
	c_jar = new JARInsert('vst ');
	c_error = c_jar->GetError();
}
Beispiel #26
0
//-------------------------------------------------------------------------------------------------------
AGain::AGain (audioMasterCallback audioMaster)
    : AudioEffectX (audioMaster, 1, 11)	// 1 program, 1 parameter only
{
    setNumInputs (2);		// stereo in
    setNumOutputs (2);		// stereo out
    setUniqueID ('Band');	// identify
    canProcessReplacing ();	// supports replacing output
    canDoubleReplacing ();	// supports double precision processing

    fGain = 1.f;			// default to 0 dB
    vst_strncpy (programName, "Default", kVstMaxProgNameLen);	// default program name
    UdpLog::setup( 7777, "localhost" );
}
mdaLoudness::mdaLoudness(audioMasterCallback audioMaster): AudioEffectX(audioMaster, NPROGS, NPARAMS)
{
  setNumInputs(2);
  setNumOutputs(2);
  setUniqueID('mdal');
	DECLARE_VST_DEPRECATED(canMono) ();				      
  canProcessReplacing();

  programs = new mdaLoudnessProgram[NPROGS];
  setProgram(0);

  suspend();
}
Beispiel #28
0
plugin::plugin(audioMasterCallback audioMaster)
: AudioEffectX(audioMaster, 1, PARAMETERS)
{
	setNumInputs(2);
	setNumOutputs(2);
	setUniqueID(ID);
	canProcessReplacing();
	canDoubleReplacing();
	vst_strncpy(programName, "Init", kVstMaxProgNameLen);
	#if (PARAMETERS > 0)
	::construct_params(params);
	#endif
	::construct(&data);
}
Beispiel #29
0
//------------------------------------------------------------------------------
Reverb::Reverb (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, kNumParams)	// 1 program, 1 parameter only
{
	setNumInputs (kNumInputs);		// stereo in
	setNumOutputs (kNumOutputs);		// stereo out
	setUniqueID ('Rvrb');	// identify
	canProcessReplacing ();	// supports replacing output
    
    
	vst_strncpy (programName, "Default", kVstMaxProgNameLen);	// default program name
    
	// internal state var declaration and initialization
    
	fs = getSampleRate();
    
	pcoefs = coefs;									// pointer for filter coef assignment
    
        
    T60LowValue = 3.5;      // time, in seconds, for low freqs to decay 60dB
	T60LowKnob = SmartKnob::value2knob(T60LowValue, T60LowLimits, T60LowTaper);
    
	T60HighValue = 0.5;			// time, in seconds, for high freqs to decay 60dB
	T60HighKnob = SmartKnob::value2knob(T60HighValue, T60HighLimits, T60HighTaper);

	TransitionValue = 6700.0;			// transition freq, in Hz, between low and high freqs
	TransitionKnob = SmartKnob::value2knob(TransitionValue, TransitionLimits, TransitionTaper);
    
	WetDryKnob = 0.2;		// output (wet/dry) mix
    
	for(int i=0; i<kNumDelays; i++){		
		dl[i].SetDelay(dlens[i]);						// set reverb delay lengths
		designShelf(pcoefs,dlens[i], TransitionValue, T60LowValue, T60HighValue);	// design filters for feedback loop
		fbfilt[i].SetCoefs(coefs);							// assign filter coefs
	}
    
    ParametricFcValue = 5000.0;
    ParametricFcKnob = SmartKnob::value2knob(ParametricFcValue, ParametricFcLimits, ParametricFcTaper);
    ParametricGammaValue = dB2mag(0.0);
    ParametricGammaKnob = SmartKnob::value2knob(ParametricGammaValue, ParametricGammaLimits, ParametricGammaTaper);
    ParametricQValue = 1;
    ParametricQKnob = SmartKnob::value2knob(ParametricQValue, ParametricQLimits, ParametricQTaper);
    
    designParametric(parametric_coefs, ParametricFcValue, ParametricGammaValue, ParametricQValue);
	parametric[0].setCoefs(parametric_coefs);
	parametric[1].setCoefs(parametric_coefs);    

    
}
mdaOverdrive::mdaOverdrive(audioMasterCallback audioMaster)	: AudioEffectX(audioMaster, 1, 3)	// 1 program, 3 parameters
{
  fParam1 = 0.0f; 		
  fParam2 = 0.0f;
  fParam3 = 0.5f;

  setNumInputs(2);		    
	setNumOutputs(2);		    
	setUniqueID('mdaO');    // identify
	DECLARE_VST_DEPRECATED(canMono) ();				      
	canProcessReplacing();	
	strcpy(programName, "Soft Overdrive");	

  filt1 = filt2 = 0.0f;
  setParameter(0, 0.0f);
}