en:music21

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:music21 [2022/02/28 10:25]
martin [music21]
en:music21 [2022/02/28 10:30] (aktuell)
martin
Zeile 6: Zeile 6:
 ==== Overview of the most important music21 commands ==== ==== Overview of the most important music21 commands ====
  
-The most important and useful commands in //music21// are listed here. More complex command sequences can be found with examples in the tutorials notes. +In the following, the most important and useful commands in //music21// are listed. More complex command sequences can be found with examples in the tutorials notes. 
  
 (1) Handling files (1) Handling files
  
-The following commands load the music1 library and then the Prelude in C major from the Well-Tempered Clavier as variable 'sBach'.+The following commands load the music21 library and then the Prelude in C major from the Well-Tempered Clavier as variable 'sBach'.
  
  
Zeile 18: Zeile 18:
    sBach = converter.parse('https://analyse.hfm-weimar.de/database/04/BaJoSe_BWV846_COM_COM_DasWohltem_004_00816.xml')    sBach = converter.parse('https://analyse.hfm-weimar.de/database/04/BaJoSe_BWV846_COM_COM_DasWohltem_004_00816.xml')
        
-Now the piece will be displayed on MuseSore:+Now the piece will be displayed with MuseSore:
  
  
Zeile 27: Zeile 27:
    sBach.show('text'    sBach.show('text'
  
-And this is how notes are played as midi:+And this is how the score is played as midi:
  
    sBach.show('midi')     sBach.show('midi')
Zeile 40: Zeile 40:
    # chooses bar 2 to 4 of the first voice as 'c'    # chooses bar 2 to 4 of the first voice as 'c'
    Alternative: sBach.measures(2,4).show()    Alternative: sBach.measures(2,4).show()
-   # selects and displays.+   # selects and displays bar 2 to 4.
  
 Show number of elements: Show number of elements:
Zeile 51: Zeile 51:
    sBach.write()    sBach.write()
    a.write()     a.write()
-   # saves the variable 'sBach' or 'a' (see above: the first voice) as xml-file (default)+   # saves the variables 'sBach' or 'a' (see above: the first voice) as xml-file (default)
    # Other formats can be chosen, e.g.     # Other formats can be chosen, e.g. 
    sBach.write('midi')    sBach.write('midi')
-   # alternative command for the first voice:+   # alternative command for saving the first voice:
    sBach.parts[0].write()    sBach.parts[0].write()
  
Zeile 63: Zeile 63:
    sBach.plot('pianoroll')     sBach.plot('pianoroll')
    sBach.parts[2].plot('pianoroll')     sBach.parts[2].plot('pianoroll')
-   # only the second voice is displayed+   # only the second voice is displayed as pianoroll
    sBach.measure(2,5).plot('pianoroll')     sBach.measure(2,5).plot('pianoroll')
    # only measures 2-5 are displayed    # only measures 2-5 are displayed
  • en/music21.1646043921.txt.gz
  • Zuletzt geändert: 2022/02/28 10:25
  • von martin