public void Metronome_Load(object sender, EventArgs e) { timer = new Timer(); timer.Tick += Timer_Tick; BPM = Convert.ToInt32(numericUpDown_metronomeTempo.Value); BPB = Convert.ToInt32(numericUpDown_metronomeMeasuse.Value); if (parent != null) { firstBeatGen = new SignalGenerator(parent.waveFormat.SampleRate, parent.waveFormat.Channels) { Gain = 1, Frequency = 660, Type = SignalGeneratorType.Sin, }; otherBeatGen = new SignalGenerator(parent.waveFormat.SampleRate, parent.waveFormat.Channels) { Gain = 1, Frequency = 440, Type = SignalGeneratorType.Sin }; firstBeatVol = new VolumeSampleProvider(firstBeatGen); firstBeatVol.Volume = 0; otherBeatVol = new VolumeSampleProvider(otherBeatGen); otherBeatVol.Volume = 0; parent.GetRecorder().AddTrackNoOffset(firstBeatVol); parent.GetRecorder().AddTrackNoOffset(otherBeatVol); Logger.Log("Metronome loaded successfully"); } }
private void Looper_Load(object sender, EventArgs e) { if (parent != null) { parent.GetRecorder().MixerInputEnded += Looper_MixerInputEnded; } }