private void CreateLastExtendedMixAttributes() { LastExtendedMixTrack = PreviousTrack; LastExtendedMixAttributes = new ExtendedMixAttributes { TrackDescription = CurrentTrack.Description, ExtendedFadeType = PreviousManaulExtendedFadeType }; }
/// <summary> /// Saves the last track FX. /// </summary> public void SaveLastSampleTrigger() { if (LastSampleTriggerTrack == null || LastSampleTrigger == null) { return; } var attributes = AutomationAttributesHelper.GetAutomationAttributes(LastSampleTriggerTrack.Description); var sample = GetSampleBySampleId(LastSampleTrigger.SampleId); if (sample != null) { if (sample.LinkedTrackDescription != LastSampleTriggerPrevTrackDescription && sample.LinkedTrackDescription != LastSampleTriggerNextTrackDescription) { attributes.SampleTriggers.Add(LastSampleTrigger); } else if (sample.LinkedTrackDescription == LastSampleTriggerNextTrackDescription) { var mixDetails = attributes.GetExtendedMixAttributes(LastSampleTriggerNextTrackDescription); if (mixDetails == null) { mixDetails = new ExtendedMixAttributes { TrackDescription = LastSampleTriggerNextTrackDescription }; attributes.ExtendedMixes.Add(mixDetails); } mixDetails.SampleTriggers.Add(LastSampleTrigger); } AutomationAttributesHelper.SaveAutomationAttributes(LastSampleTriggerTrack.Description, attributes); if (IsTrackInUse(LastSampleTriggerTrack)) { ResetTrackSyncPositions(); } } LastSampleTriggerTrack = null; LastSampleTrigger = null; LastSampleTriggerPrevTrackDescription = ""; LastSampleTriggerNextTrackDescription = ""; }