Examples ======================= ## Basic setings
Notes are quarter notes by default ```python import isedit Piece = isedit.Piece p1 = Piece(120) p1.addVoice("c c c c") p1.play() p1.getScore() ```
Octaves are set with the `,` and `'` symbols ```python Piece = isedit.Piece p1 = Piece(120) p1.addVoice("c, c c' c''") p1.play() p1.getScore() ```
We can change the time signature ```python p1 = isedit.Piece(120, "3/4") p1.addVoice("c' d' e'") p1.play() p1.getScore() ```
We can add flats by adding `es` and sharps by adding `is` to the ends of notes ```python p1 = isedit.Piece(120, "3/4") p1.addVoice("c' d' ees'") p1.play() p1.getScore() ```
## Changing note lengths We can change note lengths; 2 is a half note, 4 is a quartner note, 8 is and 8th note, and so on ```python p1 = isedit.Piece(120, "3/4") p1.addVoice("c'4 d'8 dis'8 f'4") p1.play() p1.getScore() ```
And can add dotted notes ```python p1 = isedit.Piece(120, "3/4") p1.addVoice("c'4 d'8 ees'4.") p1.play() p1.getScore() ```
## Multiple voices We can also add multiple voices ```python p1 = isedit.Piece(120, "3/4") p1.addVoice("c'4 d'8 ees'8 f'4") p1.addVoice("g2.") p1.play() p1.getScore() ``` ## Score Object The score object lets you edit in real time. The edits will transfer to the lilypond score output and the play object. ```python Piece = isedit.Piece p1 = Piece(120) p1.addVoice("c' d' e' f'") p1.addVoice("g1") p1.getScoreObject() ```