.NET library to read, write, process MIDI files and to work with MIDI devices
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 and deserialization have been completely reworked with the new CsvSerializer class. Please read CSV serializer article to learn more.
EventRecorded
event to the Recording
.Repeater
.Trim
feature to Sanitizer
.This a micro-release, which fixes a couple of bugs :sparkles: :christmas_tree: :sparkles:
IObjectId
removed. Please read updated SplitByObjects section of the docs.filter
parameter to SplitObjectsAtDistance
, SplitObjectsByGrid
, SplitObjectsByPartsNumber
and SplitObjectsByStep
methods of the Splitter
.PlaybackHint
.TimedObjectsManager.SaveChanges
method.TimedObjectUtilities.AddObjects
method when target events collection is empty.Playback
.TempoMap.Equals
.SmpteOffsetEvent
.MidiClock
when there are speed changes.NotesPlaybackStarted
and NotesPlaybackFinished
events of the Playback
can be fired with empty notes collection.This version of the library has following breaking changes:
NoteSearchContext
and ChordSearchContext
.CombineInSequence
and CombineInParallel
methods of PatternUtilities
to MergeSequentially
and MergeSimultaneously
correspondingly.Sanitizer
tool.MergeSequentially
and MergeSimultaneously
methods to the Merger
tool.StopReadingOnExpectedTrackChunksCountReached
property to ReadingSettings
(#244).ChordProcessingHint
(#256).NoteProcessingHint
.TimedEventProcessingHint
.FromDouble
method for MusicalTimeSpan
.Position
and Length
properties to MidiToken
.Quantizer
performance.PitchBendEvent
to 8192
.GetTimedEvents
methods for multiple track chunks returns original events if a single track chunk is in the collection.Chord
's length setting below the distance between chord's start and its last note's time.GetTempoMap
methods.WaitForCompleteSysExEvent
property to InputDevice
.AccessViolationException
thrown sometimes on HighPrecisionTickGenerator
stop on Windows.DryWetMIDI now provides ways to read/write data from/to a MIDI file sequentially token by token which allows to keep low memory consumption. Here the new methods and classes aimed for this task:
EnumerateObjects
method to the GetObjectsUtilities
.MidiFile.Equals
don't respect TimeDivision
.Merger
skips objects sometimes (#225).DryWetMIDI multimedia API now supports Apple Silicon chips when used on macOS (#204). Thanks to @ThaddeusChristopher for testing!
The library has now nativeless version where all native-dependent API is cut out. More info in the Nativeless package article.
FfStatusBytePolicy
property from BytesToMidiEventConverter.IDisposable
(#205).This release continues unifying API to work with different MIDI objects finishing the work done in the previous release.
This release focuses on unifying API to work with different MIDI objects.
First of all, new tool added – Repeater
. It allows repeat MIDI data specified number of times with different options applied.
Also, some old tools were unified into single ones:
TimedEventsQuantizer
, NotesQuantizer
and ChordsQuantizer
have been replaced by new Quantizer
tool which can quantize objects of different types simultaneously. More than that, it can now quantize start and end times at the same time, applying randomization if specified (and thus Randomizer
tool is now obsolete). More info in the Quantizer article.NotesSplitter
and ChordsSplitter
have been replaced by new Splitter
tool which can split objects of different types simultaneously. Also all methods from MidiFileSplitter
class have been moved to the Splitter
one. More info in the Splitter articles.Also the work has been done on unifying separate manager classes for each object type. So now TimedEventsManager
, NotesManager
and ChordsManager
classes are now obsolete. You should use TimedObjectsManager
class now which can manage objects of different types simultaneously. More info in the Objects managers article.
Clone
method has been moved from separate classes (like Note
or TimedEvent
) to ITimedObject
interface.Split
method has been moved from separate classes (like Note
or Chord
) to ILengthedObject
.SetTime
method to TimedObjectUtilities
(SetTime
within TimedEventsManagingUtilities
is obsolete now).SetLength
method to LengthedObjectUtilities
(SetTimeAndLength
methods within NotesManagingUtilities
and ChordsManagingUtilities
are obsolete now).MoveToStart
method to PatternBuilder
class.RepeatSettings
type to PatternBuilder
's Repeat
methods.Note
methods by a note string to PatternBuilder
.Chord
methods by a chord string to PatternBuilder
.Playback.InterruptNotesOnStop
property to true
.MusicTheory.Note
ignores case now.Chord.GetNames
method supports 7b9
, add11
, 7#11
, 7+11
, 7(#11)
and 7aug11
chords now (see complete list of supported chords here).TimeType
property to the PlaybackCurrentTimeWatcher
.PlaybackCurrentTimeWatcher
is now public so you can create different watchers.WatchOnlyRunningPlaybacks
property to the PlaybackCurrentTimeWatcherSettings
.SetPlaybackTimeType
method to the PlaybackCurrentTimeWatcher
.Note
's constructor by pair of timed events.TimedEventDetectionSettings
type to timed events managing methods.Constructor
and TimedEventDetectionSettings
properties to NoteDetectionSettings
.Constructor
property to ChordDetectionSettings
.MetricTimeSpan
(#144).NotEnoughBytesPolicy
is ignored on reading some events.TrackChunk
is written on saving to SingleTrack
format even if there are no track chunks in a file.Playback
position jumps on speed changing.GetObjects
methods sometimes return not all objects if uncompleted chord encountered.This is a minor release containing following changes:
HighPrecisionTickGenerator
implementation for macOS uses less CPU now and comsume less power.GetAll
static method for InputDevice and for OutputDevice returns ICollection
now.VirtualDevice.IsEnabled
doesn't work.EndOfTrackEvent
written incorrectly in some cases if it present in a MIDI file with ReadingSettings.EndOfTrackStoringPolicy
set to EndOfTrackStoringPolicy.Store
on reading the file.