/// <summary>Initialize the MIDI sequence with a copy of the data from another sequence.</summary> /// <param name="source">The source sequence from which to copy.</param> public MidiSequence(MidiSequence source) { Validate.NonNull("source", source); Format = source.Format; Division = source.Division; Tracks = new MidiTrackCollection(this); foreach (MidiTrack t in source) { Tracks.Add(new MidiTrack(t)); } }
/// <summary>Initialize the MIDI sequence.</summary> /// <param name="format"> /// The format for the MIDI file (0, 1, or 2). /// 0 - a single multi-channel track /// 1 - one or more simultaneous tracks /// 2 - one or more sequentially independent single-track patterns /// </param> /// <param name="division">The meaning of the delta-times in the file.</param> public MidiSequence(Format format, int division) { Format = format; Division = division; Tracks = new MidiTrackCollection(this); }