private void btnAddTrackFX_Click(object sender, EventArgs e) { var trackFx = new TrackFXTrigger(); if (rdbDelay1.Checked) trackFx.DelayNotes = 0.5M; if (rdbDelay2.Checked) trackFx.DelayNotes = 0.25M; if (rdbDelay3.Checked) trackFx.DelayNotes = 0.125M; if (rdbDelay4.Checked) trackFx.DelayNotes = 0.0625M; trackFx.Start = Track.SamplesToSeconds(trackWave.ZoomStart); trackFx.Length = Track.SamplesToSeconds(trackWave.ZoomLength); AutomationAttributes.TrackFXTriggers.Add(trackFx); PopulateTrackFxComboBox(); trackWave.RefreshPositions(); }
/// <summary> /// Silences the track FX. /// </summary> public void StartTrackFxSend() { _trackSendMixer.SetVolume(50M); if (CurrentTrack == null) return; LastTrackFxTriggerTrack = CurrentTrack; var position = AudioStreamHelper.GetPosition(LastTrackFxTriggerTrack); LastTrackFxTrigger = new TrackFXTrigger { Start = LastTrackFxTriggerTrack.SamplesToSeconds(position), DelayNotes = TrackSendFxDelayNotes }; _trackSendMixer.SetPluginBpm(); }