#Could not find a way to made a for in a range of integer #so we use recursive calls to achieve the task #For these procs to run, we need to change EXEC_MAXDEPTH to 10000 in exec.h #print all signatures changes and measure position proc smfinfosig { #could not find a way to get the number of measures in the song let MAX_measures = 1000; g 0 print {measure 1 sig [msig]}; sub_smfinfosig 1 [msig] $MAX_measures; } proc sub_smfinfosig measure oldsig maxsig { if $measure <= $maxsig { g $measure; let x = $measure + 1; if $oldsig != [msig] { print {measure $x sig [msig] }; } sub_smfinfosig $x [msig] $maxsig; } } #print all tempo changes and measure position proc smfinfotempo { let MAX_measures = 1000; g 0 print {measure 1 tempo [mtempo] on_sig [msig]}; sub_smfinfotempo 1 [mtempo] $MAX_measures; } proc sub_smfinfotempo measure oldtempo maxtempo { # tempo information are lost when they change within the measure if $measure <= $maxtempo { g $measure; let x = $measure + 1; if $oldtempo != [mtempo] { print {measure $x tempo [mtempo] on_sig [msig]}; } sub_smfinfotempo $x [mtempo] $maxtempo; } }