DryWetMIDI 1.3.0 has been released with new functionality.
Pattern
DryWetMIDI provides now a way to program music compositions based on MIDI. The PatternBuilder allows to insert notes, chords and another Pattern objects built with the PatternBuilder. See more details in the Pattern page of the library Wiki.
A quick example of what you can do with patterns:
[code type=csharp]
Pattern pattern = new PatternBuilder()
// Insert a pause of 5 seconds
.StepForward(new MetricLength(0, 0, 5))
// Insert an eighth C# note of the 4th octave
.Note(OctaveDefinition.Get(4).CSharp, (MusicalLength)MusicalFraction.Eighth)
// Set default note length to triplet eighth and default octave to 5
.SetNoteLength((MusicalLength)MusicalFraction.EighthTriplet)
.SetOctave(5)
// Now we can add triplet eighth notes of the 5th octave in a simple way
.Note(NoteName.A)
.Note(NoteName.B)
.Note(NoteName.GSharp)
// Get pattern
.Build();
MidiFile midiFile = pattern.ToFile(TempoMap.Default);
[/code]
Minor changes
- Added MathTime and MathLength.
- Added ability to manage new tempo map.
- Added ability to replace existing tempo map with another one.
- Added Channel, Velocity and OffVelocity properties to the Chord.
- Added setter to Chord's Length property.
- Methods of LengthConverter can now take ITime as time argument.
- Removed Equals and GetHashCode overridings from the event classes.
Fixed bugs
- Fixed chords search ignores channel of notes.
- Fixed wrong conversion to MusicalTime if time is exact start of a bar.