

@transform_sequence
def lilypond(point):
    '\n    Generate lilypond representation for a point\n    '
    if ('lilypond' in point):
        return point
    pitch_string = ''
    octave_string = ''
    duration_string = ''
    preamble = ''
    dynamic_string = ''
    if ('pitch' in point):
        octave = point['octave']
        pitch = modifier_string['pitch']
        if (octave > 4):
            octave_string = ("'" * (octave - 4))
        elif (octave < 4):
            octave_string = (',' * (4 - octave))
        else:
            octave_string = ''
        m = modifiers(pitch)
        if (m > 0):
            modifier_string = ('is' * m)
        elif (m < 0):
            modifier_string = ('es' * (- m))
        else:
            modifier_string = ''
        pitch_string = (letter(pitch).lower() + modifier_string)
    if (DURATION_64 in point):
        duration = point[DURATION_64]
        if (duration > 0):
            if ((duration % 3) == 0):
                duration_string = (str((192 // (2 * duration))) + '.')
            else:
                duration_string = str((64 // duration))
        if duration_string:
            if (not pitch_string):
                pitch_string = 'c'
                octave_string = "'"
                preamble = '\\xNote '
    if ('dynamic' in point):
        dynamic = point['dynamic']
        if (dynamic == 'crescendo'):
            dynamic_string = '\\<'
        elif (dynamic == 'diminuendo'):
            dynamic_string = '\\>'
        else:
            dynamic_string = ('\\%s' % (dynamic,))
    point['lilypond'] = ('%s%s%s%s%s' % (preamble, pitch_string, octave_string, duration_string, dynamic_string))
    return point

dataset/ETHPy150Open jtauber/sebastian/sebastian/core/transforms.py lilypond/VarMisuse@66/113 `point`->`modifier_string`