public static void UpdateExposedState(VSTSignal signal, ParamPin pin, bool isExposed) { if (signal.PluginContext.PluginCommandStub.GetEffectName() == pin.PluginName) { signal.InfoForm.ChangeExposedState(pin.ParamIndex, isExposed); } }
protected void DisposeInstance(VSTSignal instance) { if (instance != null) { instance.Dispose(); } }
/// <summary> /// Set the output pins of the node /// </summary> /// <param name="i">Current slice index</param> /// <param name="instance">Current instance</param> protected void SetOutputs(int i, VSTSignal instance) { if (FAutosaveIn[i] && instance.NeedsSave) { FSafeConfig[i] = instance.GetSaveString(); instance.NeedsSave = false; } //assign event sender? if (instance.MidiEventSender != FMidiEventsOut[i]) { FMidiEventsOut[i] = instance.MidiEventSender; } FEditorHandleOut[i] = FPluginControl.EditorHandle; }
/// <summary> /// This should return a new instance of the desired audio signal class /// </summary> /// <param name="i">The current slice index of the output signal</param> /// <returns>New instnace of the audio signal class</returns> protected VSTSignal GetInstance(int i) { var vst = new VSTSignal(FFilename[i], this); vst.LoadFromSafeString(FSafeConfig[i]); SetOutputSliceCount(CalculatedSpreadMax); if (vst.PluginContext != null) { FLatencyOut[i] = vst.PluginContext.PluginInfo.InitialDelay; FInChannelsOut[i] = vst.PluginContext.PluginInfo.AudioInputCount; FOutChannelsOut[i] = vst.PluginContext.PluginInfo.AudioOutputCount; } foreach (var paramPin in FParamPins.Values) { UpdateExposedState(vst, paramPin, true); } return(vst); }
/// <summary> /// This should set the parameters of the given audio signal class /// </summary> /// <param name="i">Current index of the output signal spread</param> /// <param name="instance">Curretn instance</param> protected void SetParameters(int i, VSTSignal instance) { instance.Input = FInputSignals[i]; instance.Filename = FFilename[i]; foreach (var item in FChangedParamPins) { if (instance.PluginContext.PluginCommandStub.GetParameterName(item.ParamIndex) == item.ParamName) { double val; item.Pin.GetValue(i, out val); if (val <= 0) { Debug.WriteLine("0 val"); } instance.PluginContext.PluginCommandStub.SetParameter(item.ParamIndex, (float)val); FPluginControl.RefreshUI(item.ParamIndex); } } instance.SetMidiEventSource(FMidiEventsIn[i]); instance.Bypass = FBypassIn[i]; }
private void numericUpDown1_ValueChanged(object sender, EventArgs e) { SelectedSignal = Node.GetPluginContext((int)((NumericUpDown)sender).Value); LoadPrograms(); SetEditor(); }