pysynth/wrappers/mml.py
def read_accidental(self):

        """
        Reads an accidental for the current note.

        The accidental must ALWAYS pre-pend the note.
        We return the offset of the note,
        weather that be -1 or 1 step.

        If we encounter an integer, then this is the note length,
        and we will simply return 0 for no change.
        :return: Offset of the note, -1 for flat, 1 for sharp
        :rtype: int
        """

        # Get the next value in the audio collection:

        val = self.source.peek()

        # Otherwise, determine the accidental:

        if val in ['+', '#']:

            # We have a sharp note, return offset of 1:

            self.source.forward()

            return 1

        if val in ['-']:

            # We have a flat, return offset og -1

            self.source.forward()

            return -1

        # No accidental, return nothing:

        return 0

        Reads an accidental for the current note.

        The accidental must ALWAYS pre-pend the note.
        We return the offset of the note,
        weather that be -1 or 1 step.

        If we encounter an integer, then this is the note length,
        and we will simply return 0 for no change.
        :return: Offset of the note, -1 for flat, 1 for sharp
        :rtype: int
        
Reads an accidental for the current note.
The accidental must ALWAYS pre-pend the note.
We return the offset of the note,
weather that be -1 or 1 step.

If we encounter an integer, then this is the note length,
and we will simply return 0 for no change.
Reads an accidental for the current note . The accidental must ALWAYS pre - pend the note . We return the offset of the note weather that be - 1 or 1 step . If we encounter an integer then this is the note length and we will simply return 0 for no change .
def read_accidental(self):
        val = self.source.peek()
        if val in ['+', '#']:
            self.source.forward()
            return 1
        if val in ['-']:
            self.source.forward()
            return -1
        return 0
def read_accidental ( self ) : val = self . source . peek ( ) if val in [ '+' , '#' ] : self . source . forward ( ) return 1 if val in [ '-' ] : self . source . forward ( ) return - 1 return 0
Reads an accidental for the current note.
Reads an accidental for the current note .
"""
        Reads an accidental for the current note.

        The accidental must ALWAYS pre-pend the note.
        We return the offset of the note,
        weather that be -1 or 1 step.

        If we encounter an integer, then this is the note length,
        and we will simply return 0 for no change.
        :return: Offset of the note, -1 for flat, 1 for sharp
        :rtype: int
        """ # Get the next value in the audio collection: # Otherwise, determine the accidental: # We have a sharp note, return offset of 1: # We have a flat, return offset og -1 # No accidental, return nothing:
Offset of the note, -1 for flat, 1 for sharp
Offset of the note - 1 for flat 1 for sharp
int
self