def toLily(self):
        '''
        Method which converts the object instance, its attributes and children to a string of lilypond code

        :return: str of lilypond code
        '''
        lilystring = ""
        if self.duration > 0:
            lilystring += "r" + str(self.duration)
        return lilystring
def toLily ( self ) : lilystring = "" if self . duration > 0 : lilystring += "r" + str ( self . duration ) return lilystring
Method which converts the object instance, its attributes and children to a string of lilypond code

        :return: str of lilypond code