Reading ticks_per_beat
under MIDO can be done via mid.ticks_per_beat
. However, if I want to save the value of ticks_per_beat
(e.g., 120 or 480) to a new MIDI file, how it can be done? (p.s. I can set "time signature" or "tempo" as follows. But, it seems to me that there is no relationship between these values and ticks_per_beat
.)
track.append(MetaMessage('time_signature', numerator=4, denominator=4, clocks_per_click=24, notated_32nd_notes_per_beat=8, time=0))
track.append(MetaMessage('set_tempo', tempo=100000, time=0))