예제 #1
0
def test_multi_note_add_under():
    c = Chord(Note.from_note_string('D4'))
    c.add_note(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('B3'))
    notes = [
        Note.from_note_string('B3'),
        Note.from_note_string('C4'),
        Note.from_note_string('D4')
    ]
    assert c.notes == notes
예제 #2
0
def test_double_note_add():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('E4'))
    c.add_note(Note.from_note_string('B4'))
    notes = [
        Note.from_note_string('C4'),
        Note.from_note_string('E4'),
        Note.from_note_string('B4')
    ]
    assert c.notes == notes
예제 #3
0
def test_simple_note_add_middle():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('E4'))
    c.add_note(Note.from_note_string('D4'))
    notes = [
        Note.from_note_string('C4'),
        Note.from_note_string('D4'),
        Note.from_note_string('E4')
    ]
    assert c.notes == notes
예제 #4
0
def test_root_insert_under_same_pitch():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('C4b'))
    root = Note.from_note_string('C4b')
    assert c.root() == root
예제 #5
0
def test_root_insert_under():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('B3'))
    root = Note.from_note_string('B3')
    assert c.root() == root
예제 #6
0
def test_root_two_notes():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('E4'))
    root = Note.from_note_string('C4')
    assert c.root() == root
예제 #7
0
def test_simple_two_note_str_add_under():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('B3'))
    assert c.__str__() == 'B3+C4'
예제 #8
0
def test_simple_two_note_str():
    c = Chord(Note.from_note_string('C4'))
    c.add_note(Note.from_note_string('E4'))
    assert c.__str__() == 'C4+E4'