# HG changeset patch # User christopherh # Date 1428849767 -3600 # Node ID 59906fa4999c3b62bdd6effa9c903e179b4eb1ef # Parent 08c298f479172b12195868e46abc692dc5d348fc removed degugging print messages from readmidi.py diff -r 08c298f47917 -r 59906fa4999c Syncopation models/readmidi.py --- 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))