pysynth/seq.py
def find_beats(self, note_type):

        """
        Finds the amounts of beats the given note represents, given the beats per bar,
        and tempo.

        The note_type represents the fraction of the note compared to he bpb.
        If the bpm is 4, then 1 represents 1 beat, 2 represents 2 beats, 3 represents 4/3 beats, ect.
        In normal note notation, a 1 is a whole note, 2 is half note, 4 is quarter note, 8 is eight note, ect.

        We also support fractions of notes,
        meaning that if you provide 2.5, then we will interpret this note as a dotted half note.
        After we determine the number of beats the note represents,
        we multiply the number of beats by this decimal, and add it to the total.
        So if we have 4 BPB, the tempo is 60 BPM, and we provide 4.5,
        then we will rest for 1.5 seconds.

        :param note_type: Type of not to calculate number of beats for
        :type note_type: float
        :return: Number of beats this note represents
        :rtype: float
        """

        # First, find the number of beats this value takes up:

        beats = self.beats_per_measure / int(note_type)

        # Next, add the amount of fraction beats to this value:

        beats = beats + (beats * (note_type % 1))

        # Return

        return beats

        Finds the amounts of beats the given note represents, given the beats per bar,
        and tempo.

        The note_type represents the fraction of the note compared to he bpb.
        If the bpm is 4, then 1 represents 1 beat, 2 represents 2 beats, 3 represents 4/3 beats, ect.
        In normal note notation, a 1 is a whole note, 2 is half note, 4 is quarter note, 8 is eight note, ect.

        We also support fractions of notes,
        meaning that if you provide 2.5, then we will interpret this note as a dotted half note.
        After we determine the number of beats the note represents,
        we multiply the number of beats by this decimal, and add it to the total.
        So if we have 4 BPB, the tempo is 60 BPM, and we provide 4.5,
        then we will rest for 1.5 seconds.

        :param note_type: Type of not to calculate number of beats for
        :type note_type: float
        :return: Number of beats this note represents
        :rtype: float
        
Finds the amounts of beats the given note represents, given the beats per bar,
and tempo.

The note_type represents the fraction of the note compared to he bpb.
If the bpm is 4, then 1 represents 1 beat, 2 represents 2 beats, 3 represents 4/3 beats, ect.
In normal note notation, a 1 is a whole note, 2 is half note, 4 is quarter note, 8 is eight note, ect.

We also support fractions of notes,
meaning that if you provide 2.5, then we will interpret this note as a dotted half note.
After we determine the number of beats the note represents,
we multiply the number of beats by this decimal, and add it to the total.
So if we have 4 BPB, the tempo is 60 BPM, and we provide 4.5,
then we will rest for 1.5 seconds.
Finds the amounts of beats the given note represents given the beats per bar and tempo . The note_type represents the fraction of the note compared to he bpb . If the bpm is 4 then 1 represents 1 beat 2 represents 2 beats 3 represents 4 / 3 beats ect . In normal note notation a 1 is a whole note 2 is half note 4 is quarter note 8 is eight note ect . We also support fractions of notes meaning that if you provide 2 . 5 then we will interpret this note as a dotted half note . After we determine the number of beats the note represents we multiply the number of beats by this decimal and add it to the total . So if we have 4 BPB the tempo is 60 BPM and we provide 4 . 5 then we will rest for 1 . 5 seconds .
def find_beats(self, note_type):
        beats = self.beats_per_measure / int(note_type)
        beats = beats + (beats * (note_type % 1))
        return beats
def find_beats ( self , note_type ) : beats = self . beats_per_measure / int ( note_type ) beats = beats + ( beats * ( note_type % 1 ) ) return beats
Finds the amounts of beats the given note represents, given the beats per bar,
and tempo.
Finds the amounts of beats the given note represents given the beats per bar and tempo .
"""
        Finds the amounts of beats the given note represents, given the beats per bar,
        and tempo.

        The note_type represents the fraction of the note compared to he bpb.
        If the bpm is 4, then 1 represents 1 beat, 2 represents 2 beats, 3 represents 4/3 beats, ect.
        In normal note notation, a 1 is a whole note, 2 is half note, 4 is quarter note, 8 is eight note, ect.

        We also support fractions of notes,
        meaning that if you provide 2.5, then we will interpret this note as a dotted half note.
        After we determine the number of beats the note represents,
        we multiply the number of beats by this decimal, and add it to the total.
        So if we have 4 BPB, the tempo is 60 BPM, and we provide 4.5,
        then we will rest for 1.5 seconds.

        :param note_type: Type of not to calculate number of beats for
        :type note_type: float
        :return: Number of beats this note represents
        :rtype: float
        """ # First, find the number of beats this value takes up: # Next, add the amount of fraction beats to this value: # Return
Number of beats this note represents
Number of beats this note represents
float
self
note_type
Type of not to calculate number of beats for
Type of not to calculate number of beats for