
    ̺i                     $    S  r S rSS jrSS jrg)c                     US-  U-  nX-  $ )zConvert absolute time in ticks to seconds.

Returns absolute time in seconds for a chosen MIDI file time resolution
(ticks/pulses per quarter note, also called PPQN) and tempo (microseconds
per quarter note).
ư> )tickticks_per_beattemposcales       S/var/www/piano.thomer.com/venv/lib/python3.13/site-packages/mido/midifiles/units.pytick2secondr
      s     DL>)E<    c                 >    US-  U-  n[        [        X-  5      5      $ )zConvert absolute time in seconds to ticks.

Returns absolute time in ticks for a chosen MIDI file time resolution
(ticks/pulses per quarter note, also called PPQN) and tempo (microseconds
per quarter note). Normal rounding applies.
r   intround)secondr   r   r   s       r	   second2tickr      s$     DL>)EuV^$%%r   c                 B    [        [        SU -  US   -  S-  5      5      $ )a+  Convert BPM (beats per minute) to MIDI file tempo (microseconds per
quarter note).

Depending on the chosen time signature a bar contains a different number of
beats. These beats are multiples/fractions of a quarter note, thus the
returned BPM depend on the time signature. Normal rounding applies.
    8A         @r   )bpmtime_signatures     r	   	bpm2tempor      s'     uX^nQ&77"<=>>r   c                     SU -  US   -  S-  $ )a  Convert MIDI file tempo (microseconds per quarter note) to BPM (beats
per minute).

Depending on the chosen time signature a bar contains a different number of
beats. The beats are multiples/fractions of a quarter note, thus the
returned tempo depends on the time signature denominator.
r   r   r   r   )r   r   s     r	   	tempo2bpmr   &   s     enQ//"44r   N))   r   )r
   r   r   r   r   r   r	   <module>r      s   
&?5r   