def check_roman_vs_letters():
    data = get_data()
    syms = data.syms
    from music21_chord_tools import roman2letter, letter2roman
    mismatches = {}
    for sym in syms:
        letter = roman2letter(sym)
        roman = letter2roman(letter)
        if sym != roman:
            mismatches[roman] = sym
            print '------ mismatch'
    print mismatches
示例#2
0
    def letter2rn(self, sym):
        if sym in LETTER2ROMAN_RELABELS:
            formatted_sym = LETTER2ROMAN_RELABELS[sym]
        elif sym in self._letter2rn:
            formatted_sym = self._letter2rn[sym]
            print 'letter2rn retrieved', formatted_sym
        else:
            formatted_sym = letter2roman(sym)
            if formatted_sym is None:
                return ''
            # print 'created', formatted_sym

        return formatted_sym