3.1. Calculator¶
The Calculator program extracts rhythmic partitioning data from given digital scores and saves it into a JSON file.
Output JSON file contains:
texture_data
with events’ data split in separate lists:Index (
measure number + offset
)Measure number
Offset
Global offset
Duration
Partition
Density number
Agglomeration index
Dispersion index
offset_map
with a map of measure numbers and their global offsetsvalues_map
with partitions and the values of their agglomeration and dispersion indexespartitions
with a single list of each event partitions
Its basic usage is:
rpscripts calc score.xml
The -c
option also creates a CSV file with the events data (see Converter section).
The combined -e
and -c
options create a CSV file with equally-sized events. This procedure is helpful for statistical operations such as frequency analysis.
rpscripts calc -e score.xml
The option -h
prints the program help:
rpscripts calc -h
Output:
usage: rpscripts calc [-h] [-c] [-e] filename
positional arguments:
filename digital score filename (XML, MXL, MIDI and KRN)
options:
-h, --help show this help message and exit
-c, --csv output data in a CSV file.
-e, --equally_sized generate equally-sized events