Rests redesigned
Now you can get rests between different types of objects and by any logic you will describe. Please read updated Rests section of the docs. This entails a breaking change – there is no ObjectType.Rest
option anymore. So to get, for example, notes and rests between them you need to write following code:
var notesAndRests = midiFile
.GetNotes()
.WithRests(RestDetectionSettings.NoNotesByChannel);
To feel the power of the new approach, just take a look to the snippet:
var notesAndChordsAndRests = midiFile
.GetObjects(ObjectType.Note | ObjectType.Chord)
.WithRests(new RestDetectionSettings
{
KeySelector = obj => obj is Note note && note.NoteNumber > 100
? (object)note.NoteNumber
: null
});
Here we get notes, chords and rests between notes with note number > 100 separately for each note number. Rests won't be built for chords and notes with note number <= 100.
CSV serialization redesigned
CSV serialization and deserialization have been completely reworked with the new CsvSerializer class. Please read CSV serializer article to learn more.
Small changes
- Supported flats in chord progressions to parse.
- Added the
EventRecorded
event to theRecording
. - Allow zero repeats number for
Repeater
. - Added the
Trim
feature toSanitizer
.