From 32a9a7cf5a10f9b8ae55f8e2d8565c04cc0d013c Mon Sep 17 00:00:00 2001 From: Maarten Grachten Date: Sun, 29 Sep 2019 16:31:39 +0200 Subject: [PATCH] Slight modifications to README.rst --- README.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index af6d485b..b54e57e0 100644 --- a/README.rst +++ b/README.rst @@ -8,12 +8,15 @@ supports loading from and exporting to *MusicXML* and *MIDI* files. Quickstart ========== -The following code loads the contents of an example MusicXML file included in the package -and shows its contents: - +The following code loads the contents of an example MusicXML file included in +the package: + >>> import partitura ->>> mxml_file = partitura.EXAMPLE_MUSICXML ->>> part = partitura.load_musicxml(mxml_file) +>>> my_xml_file = partitura.EXAMPLE_MUSICXML +>>> part = partitura.load_musicxml(my_xml_file) + +The following shows the contents of the part: + >>> print(part.pretty()) Part id="P1" name="Piano" │ @@ -51,11 +54,9 @@ Part id="P1" name="Piano" The notes in this part can be accessed through the property :attr:`part.notes `: -.. doctest:: - - >>> part.notes # doctest: +NORMALIZE_WHITESPACE - [, , - ] +>>> part.notes +[, , + ] To create a piano roll extract from the part as a numpy array you would do the following: