Skip to content

Time value for LengthConverter.ConvertFrom #194

Answered by melanchall
Jenix-Park asked this question in Q&A
Discussion options

You must be logged in to vote

Your code is good, but it can be simplified:

var note = new Note((SevenBitNumber)noteNumber)
    .SetTime(new MetricTimeSpan(noteOnTime), tempoMap)
    .SetLength(new MetricTimeSpan(noteOffTime - noteOnTime), tempoMap);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jenix-Park
Comment options

Answer selected by Jenix-Park
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants