/// <summary> /// パートの属するマスタークラスを指定して新しい Part クラスのインスタンスを初期化します。 /// </summary> /// <param name="master">このパートが属するマスタークラス。</param> public Part(Master master) { this.envelope = new Envelope(master.SamplingFreq); this.buffer = new float[0]; this.Reset(); this.ExtendBuffers(0); this.SampleDeltaTime = 1.0 / master.SamplingFreq; this.master = master; }
/// <summary> /// 値の変化しない、常に一定値を出力するエンベロープを作成します。 /// </summary> /// <param name="samplingFreq">サンプリング周波数。</param> /// <returns>一定出力値を持つエンベロープ。</returns> public static Envelope CreateConstant(float samplingFreq) { Envelope envelope = new Envelope(samplingFreq); envelope.attackTime = 0; envelope.peakTime = 0; envelope.decayTime = 0; envelope.sustainLevel = 1.0f; envelope.releaseTime = 0; return envelope; }
public Operator(float samplingFreq) { this.samplingFreq = samplingFreq; OutAmplifier = 0.0f; FreqFactor = 1.0f; Send0 = 0.0f; Send1 = 0.0f; Send2 = 0.0f; Send3 = 0.0f; Old = 0.0f; IsSelected = false; OutAmplifierEnvelope = null; Send0Envelope = null; Send1Envelope = null; Send2Envelope = null; Send3Envelope = null; OutAmplifierEnvelopeBuffer = new float[0]; Send0EnvelopeBuffer = new float[0]; Send1EnvelopeBuffer = new float[0]; Send2EnvelopeBuffer = new float[0]; Send3EnvelopeBuffer = new float[0]; ConstantValues = new float[0]; }