'Test that transposition works when changing instrument transposition.
This can occur within a single part in a score where the score
has no key signature / is atonal. Examples include changing from a
non-transposing instrument to a transposing one (ex. Flute to Bb Clarinet)
or vice versa, or changing among transposing instruments (ex. Bb Clarinet
to Eb Alto Saxophone).'

def test_atonal_transposition(self):

    ns = musicxml_reader.musicxml_file_to_sequence_proto(self.atonal_transposition_filename)
    expected_ns = common_testing_lib.parse_test_proto(music_pb2.NoteSequence, '\n                                ticks_per_quarter:    220\n                                time_signatures:    {\n                                        numerator:    4\n                                        denominator:    4\n                                }\n                                tempos:    {\n                                        qpm:    120\n                                }\n                                key_signatures:    {\n                                }\n                                part_infos    {\n                                        part:    0\n                                        name:    "Flute"\n                                }\n                                source_info:    {\n                                        source_type:    SCORE_BASED\n                                        encoding_type:    MUSIC_XML\n                                        parser:    MAGENTA_MUSIC_XML\n                                }\n                                total_time:    4.0\n                                ')
    expected_pitches = [72, 74, 76, 77, 79, 77, 76, 74]
    time = 0
    for pitch in expected_pitches:
        note = expected_ns.notes.add()
        note.pitch = pitch
        note.start_time = time
        time += 0.5
        note.end_time = time
        note.velocity = 64
        note.numerator = 1
        note.denominator = 4
        note.voice = 1
    self.maxDiff = None
    self.assertProtoEquals(expected_ns, ns)
