Objects managing methods are unified
Now it's possible to process objects of different types simultaneously. Thus now you can call, for example, just midiFile.ProcessObjects(ObjectType.Chord | ObjectType.Note, ...)
instead of ProcessChords
after ProcessNotes
. The same story for objects removal. So in addition to this set of methods
GetTimedEvents
/GetNotes
/GetChords
ProcessTimedEvents
/ProcessNotes
/ProcessChords
RemoveTimedEvents
/RemoveNotes
/RemoveChords
we have
Also objects detection settings were decoupled. So ChordDetectionSettings
doesn't contain NoteDetectionSettings
from now, as well as NoteDetectionSettings
doesn't contain TimedEventDetectionSettings
. Methods shown in the first list accept those settings as separate parameters now.
PatternBuilder
improvements
Now you can insert simple patterns more quickly – via new PianoRoll
method. For example:
var midiFile = new PatternBuilder()
.SetNoteLength(MusicalTimeSpan.Eighth)
.PianoRoll(@"
F#2 ||||||||
D2 --|---|-
C2 |---|---")
.Repeat(9)
.Build()
.ToFile(TempoMap.Default, (FourBitNumber)9);
midiFile.Write("pianoroll-simple.mid", true);
Please read the PianoRoll section of the Pattern article to learn more.
Also a couple of new methods have been added to the PatternBuilder
: ControlChange
and PitchBend
.
Small changes
- Added
SanitizingSettings.RemoveDuplicatedNotes
property. - Added
SanitizingSettings.RemoveDuplicatedSequenceTrackNameEvents
property. - Added
SanitizingSettings.NoteMinVelocity
property. - Changed default value of the
SanitizingSettings.Trim
property tofalse
since trimming can be undesirable. settings
parameter of the methods fromRestsUtilities
is optional now.