Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duration of isolated 16th notes in the score (conversion from midi using musescore) #20

Closed
marcindulak opened this issue Apr 13, 2018 · 2 comments

Comments

@marcindulak
Copy link

This is a question, not a MIDIUtil issue.

After reading #14 I'm trying to write down isolated 16th notes in two bars of 6/8 time signature (I want to write down a simple drum rhythm). My understanding is that given the time and duration=0.25 of the notes (quarter of quarter note), the bar will be filled with 16th notes at the time onsets and rests to match the time signature.

However this is not what I see after conversion into a score musescore simple.mid -o simple.png: there are instead notes of different durations than 16th, some dotted, with staccato symbols. The resulting score is not "you play what you see". I've experimented with different time signatures like 12/16 without improvements. Is this due a general specifics of the musical score notation, or can this somehow be "fixed" by some MIDIUtil settings or a different midi to musical score conversion program?

from midiutil.MidiFile import MIDIFile
mf = MIDIFile(1)
track = 0
time = 0.0

mf.addTrackName(track, time, "6/8")
mf.addTempo(track, time, 120)
mf.addTimeSignature(track, time, 6, 3, 24)

channel = 0
volume = 100
pitch = 60
duration = 0.25

time = 0.0
mf.addNote(track, channel, pitch, time, duration, volume)

time = 0.5
mf.addNote(track, channel, pitch, time, duration, volume)

time = 0.75
mf.addNote(track, channel, pitch, time, duration, volume)

time = 3.0
mf.addNote(track, channel, pitch, time, duration, volume)

with open("simple.mid", 'wb') as outf:
    mf.writeFile(outf)

simple

@marcindulak
Copy link
Author

Cross posted at https://musescore.org/en/node/271428

@marcindulak
Copy link
Author

Got an answer from musescore: one just needs to disable "Simplify durations" and the converted score looks like this:

simple_simplify_durations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant