public override void OnAddToRack(Synthesizer synth) { outputs[0].id = synth.NextOutputID(); outputs[1].id = synth.NextOutputID(); if (SAMPLERATE != 44100) { var samplesPerMillisecond = 88; var scaler = SAMPLERATE / 44100.0f; samplesPerMillisecond = Mathf.FloorToInt(scaler * samplesPerMillisecond); for (var i = 0; i < reverbDelay.Length; i++) { var delay = Mathf.FloorToInt(scaler * reverbDelay[i]); if ((delay & 1) == 0) { delay++; } while (!IsPrime(delay)) { delay += 2; } reverbDelay[i] = delay; } } allpass1 = new InternalDelayLine(reverbDelay[0]); allpass2 = new InternalDelayLine(reverbDelay[1]); comb1 = new InternalDelayLine(reverbDelay[2]); comb2 = new InternalDelayLine(reverbDelay[3]); }
public override void OnAddToRack(Synthesizer synth) { output.id = synth.NextOutputID(); outputTrigger.id = synth.NextOutputID(); outputEnvelope.id = synth.NextOutputID(); beatIndex = -1; Parse(); ScheduleNoteTriggers(0); }
public override void OnAddToRack(Synthesizer synth) { output.id = synth.NextOutputID(); amps = new Signal[items.Length]; for (var i = 0; i < items.Length; i++) { amps[i].localValue = 0.5f; } }
public override void OnAddToRack(Synthesizer synth) { osc.OnAddToRack(synth); noise.OnAddToRack(synth); filter.OnAddToRack(synth); output.id = synth.NextOutputID(); mixer = new InternalMixer(synth, osc.output, noise.output); filter.input.Connect(mixer.output); output.Connect(filter.output); }
public override void OnAddToRack(Synthesizer synth) { output.id = synth.NextOutputID(); }
public InternalMixer(Synthesizer synth, params Signal[] items) { this.output.id = synth.NextOutputID(); this.items = items; }