Mercurial > hg > syncopation-dataset
changeset 25:59906fa4999c
removed degugging print messages from readmidi.py
author | christopherh <christopher.harte@eecs.qmul.ac.uk> |
---|---|
date | Sun, 12 Apr 2015 15:42:47 +0100 |
parents | 08c298f47917 |
children | ed29ed80635c |
files | Syncopation models/readmidi.py |
diffstat | 1 files changed, 3 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/Syncopation models/readmidi.py Sun Apr 12 15:40:06 2015 +0100 +++ b/Syncopation models/readmidi.py Sun Apr 12 15:42:47 2015 +0100 @@ -107,14 +107,10 @@ if event.time>=barEndTime: break - # print "event %d, start %d, end %d"%(event.time, barStartTime, barEndTime) if event.type=="TIME_SIGNATURE" and event.time>=barStartTime: timesig = midi_event_to_time_signature(event) event.type = "USED_TIME_SIGNATURE" - # print timesig.to_string() - # this event has been used now so remove it - #timeList.remove(event) - + if timesig==None: if currentTimeSignature==None: timesig = TimeSignature("4/4") @@ -136,18 +132,11 @@ if event.time>=barEndTime: break - print "event %d, start %d, end %d"%(event.time, barStartTime, barEndTime) - # run through list until we find the most recent tempo # before the end of the current bar if event.type=="SET_TEMPO" and event.time>=barStartTime: tempo = midi_event_to_qpm_tempo(event) event.type = "USED_TEMPO" - print tempo - # this event has been used now so remove it - #timeList.remove(event) - - if tempo==None: if currentTempo==None: @@ -157,9 +146,10 @@ return tempo + + # get initial time sig and tempo or use defaults timeList = get_time_events(midiFile) - print timeList # get notes from the midi file (absolute start times from start of file) notesList = get_notes_from_event_list(get_note_events(midiFile))