/// <param name="trkDef">The target trk</param> /// <param name="trkOptions">If non-null, this trkOptions overrrides the TrkOptions in the InputNote or InputChord</param> public TrkRef(Trk trkDef, TrkOptions trkOptions) { MidiChannel = trkDef.MidiChannel; _trkMsPosition = trkDef.MsPositionReContainer; _trkNumMidiObjects = trkDef.DurationsCount; // includes MidiChordDef, RestDef TrkOptions = trkOptions; }
/// <param name="trkMidiChannel">The trk's midi channel</param> /// <param name="absTrkStartPosition">The trk's absolute startMsPosition</param> /// <param name="trkNumMidiObjects">The number of MidiChordDefs and RestDefs.</param> /// <param name="trkOptions">If non-null, this trkOptions overrrides the TrkOptions in the InputNote or InputChord</param> public TrkRef(byte trkMidiChannel, int absTrkStartPosition, int trkNumMidiObjects, TrkOptions trkOptions) { MidiChannel = trkMidiChannel; _trkMsPosition = absTrkStartPosition; _trkNumMidiObjects = trkNumMidiObjects; TrkOptions = trkOptions; }
public NoteOff(NoteOn noteOn, SeqRef seqRef, TrkOptions trkOptions) : base(seqRef, new List<int>(), trkOptions) { foreach(TrkRef tr in noteOn.SeqRef.TrkRefs) { _trkOffs.Add(tr.MidiChannel); } }
public InputNoteDef(byte notatedMidiPitch, NoteOn noteOn, NoteOff noteOff, TrkOptions trkOptions) { Debug.Assert(notatedMidiPitch >= 0 && notatedMidiPitch <= 127); // If trkOptions is null, the higher level trkOptions are used. NotatedMidiPitch = notatedMidiPitch; NoteOn = noteOn; NoteOff = noteOff; TrkOptions = trkOptions; }
/// <summary> /// Constructs a multi-note chord, each inputNoteDef has a notated pitch and a SeqDef. /// The inputNoteDefs must be in order of their notated pitches (bottom to top). /// </summary> public InputChordDef(int msPositionReFirstIUD, int msDuration, List<InputNoteDef> inputNoteDefs, M.Dynamic dynamic, TrkOptions trkOptions) : base(msDuration) { #region check notated pitches and trkRef positions int pitchBelow = -1; foreach(InputNoteDef ind in inputNoteDefs) { Debug.Assert(ind.NotatedMidiPitch > pitchBelow); pitchBelow = ind.NotatedMidiPitch; if(ind.NoteOn != null && ind.NoteOn.SeqRef != null) { foreach(TrkRef trk in ind.NoteOn.SeqRef) { Debug.Assert(msPositionReFirstIUD <= trk.MsPosition); } } if(ind.NoteOff != null && ind.NoteOff.SeqRef != null) { int minSeqPos = msPositionReFirstIUD + msDuration; foreach(TrkRef trk in ind.NoteOff.SeqRef) { Debug.Assert(minSeqPos <= trk.MsPosition); } } // Note that there is no corresponding check for ind.NoteOnTrkOffs and ind.NoteOffTrkOffs } #endregion _msPositionReFirstIUD = msPositionReFirstIUD; _msDuration = msDuration; _inputNoteDefs = inputNoteDefs; _lyric = null; _dynamic = (dynamic == M.Dynamic.none) ? null : M.CLichtDynamicsCharacters[dynamic]; _trkOptions = trkOptions; _msDurationToNextBarline = null; }
/// <param name="trkRefs"></param> /// <param name="trkOptions">Can be null</param> public SeqRef(List<TrkRef> trkRefs, TrkOptions trkOptions) { Debug.Assert(trkRefs != null && trkRefs.Count > 0); TrkOptions = trkOptions; TrkRefs = trkRefs; }
/// <summary> /// This constructs an InputNoteDef that, when the noteOff arrives, /// turns off all the trks that were turned on by the noteOn. /// </summary> public InputNoteDef(byte notatedMidiPitch, NoteOn noteOn, TrkOptions trkOptions) : this(notatedMidiPitch, noteOn, null, trkOptions) { //public NoteOff(NoteOn noteOn, Seq seq, TrkOptions trkOptions) NoteOff = new NoteOff(noteOn, null, null); }
protected NoteTrigger(SeqRef seqRef, List<int> trkOffs, TrkOptions trkOptions) { _seqRef = seqRef; _trkOffs = trkOffs; _trkOptions = trkOptions; }
public NoteOn(SeqRef seqRef, List<int> trkOffs, TrkOptions trkOptions) : base(seqRef, trkOffs, trkOptions) { }