4.1. rpscripts package¶
4.1.1. Subpackages¶
- 4.1.1.1. rpscripts.lib package
- 4.1.1.1.1. Submodules
- 4.1.1.1.2. rpscripts.lib.base module
CustomExceptionEventLocationGeneralSubparserRPDataRPData.get_agglomeration_dispersion()RPData.get_events_location()RPData.get_frequency_counter()RPData.get_number_of_parts_and_density_numbers()RPData.get_probability_counter()RPData.load_from_file()RPData.make_class_graph()RPData.save_to_csv()RPData.save_to_file()RPData.to_json()RPData.trim()
aux_find_next_measure_number()aux_sum_if_none()clean_filename()convert_texture_data_from_json()convert_texture_data_to_json()convert_to_equal_durations()dump_json_data()file_rename()find_nearest_smaller()fraction_to_string()get_diff_lcm()get_fractions_denominator_lcm()get_number_combinations_pairs()is_midi_file()load_json_file()make_fraction()make_general_graph()parse_fraction()parse_pow()save_dict_into_csv_file()
- 4.1.1.1.3. rpscripts.lib.partition module
- 4.1.1.1.4. Module contents
4.1.2. Submodules¶
4.1.3. rpscripts.annotator module¶
This module provides annotation features. It adds data such as partition into the XML score data and saves as a MXL file.
- class rpscripts.annotator.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.4. rpscripts.calculator module¶
This module provides classes and functions to calculate the rhythmic partitions from a given digital score.
- class rpscripts.calculator.MusicalEvent(**kwargs)[source]¶
Bases:
objectAuxiliary musical event class.
This class has only the needed attributes of Music21’s Note, Rest and Chord classes.
- class rpscripts.calculator.Parsema(**kwargs)[source]¶
Bases:
objectAuxiliary Parsema class.
Parsema is the set of adjacent equal partitions. See Gentil-Nunes 2009 for further information.
- class rpscripts.calculator.ParsemaeSegment(**kwargs)[source]¶
Bases:
objectParsema segment class.
- class rpscripts.calculator.PartSoundingMap(**kwargs)[source]¶
Bases:
objectSounding Map class of a musical part.
- get_single_event_by_location(global_offset: Fraction) SingleEvent[source]¶
Return a SingleEvent object from its location.
- class rpscripts.calculator.ScoreSoundingMap(**kwargs)[source]¶
Bases:
objectSounding Map class of a musical score. Individual parts are sounding maps.
- add_part_sounding_map(m21_part: Part) None[source]¶
Creates a PartSoundingMap from a given Music21 Part and add it to sounding_maps and attacks attributes.
- add_score_sounding_maps(m21_score: Score) None[source]¶
Create PartSoundingMap objects from each part of a given Music21 Score.
This method also get measure offsets and explodes voices into parts.
- class rpscripts.calculator.SingleEvent(**kwargs)[source]¶
Bases:
objectAuxiliary single event. It’s more simple than Music21’s note and rest objects and has useful attributes such ass number of pitches and sounding.
- class rpscripts.calculator.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
- rpscripts.calculator.aux_join_music_events(events: dict) dict[source]¶
Join MusicalEvent
This methods join adjacent tied objects as well as adjacent rests.
- rpscripts.calculator.aux_make_events_from_part(m21_part: Part) dict[source]¶
Return a dictionary with Musical Events and their locations from a given Music21 part object.
- rpscripts.calculator.make_music_events_from_part(m21_part: Part) dict[source]¶
Return a dictionary with location and Musical Events from a given Music21 part object. Adjacent rests and tied notes are joined.
- rpscripts.calculator.make_offset_map(m21part: Part) dict[source]¶
Create map with measure number and global offset value.
4.1.5. rpscripts.cli module¶
This module provides the command line interface.
4.1.6. rpscripts.config module¶
This module contains RP Scripts’ global variables.
These variables are used in multiple modules.
4.1.7. rpscripts.converter module¶
This module converts calculator’s JSON output into CSV file with or without intermediary equally-sized events.
- class rpscripts.converter.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.8. rpscripts.finder module¶
This module helps finding events occurrences in the given JSON file.
- class rpscripts.finder.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.9. rpscripts.info module¶
This shows information about data.
- class rpscripts.info.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.10. rpscripts.labeler module¶
This module parses TXT label file and adds this information into the JSON file.
- class rpscripts.labeler.Edge(label=None, index=None, global_offset=None)[source]¶
Bases:
objectThis class represents the point where a excerpt or section starts.
- class rpscripts.labeler.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.11. rpscripts.plotter module¶
- class rpscripts.plotter.AbstractIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractTimePlotterAbstract indexogram plotter class.
This class extends AbstractTimePlotter and has dispersion and inverted agglomeration data as attributes to help indexograms plotting.
- class rpscripts.plotter.AbstractPartitiogramPlotter(rpdata: RPData, image_format='svg', with_labels=True, **kwargs)[source]¶
Bases:
AbstractPlotterAbstract partitiogram plotter class.
This class extends AbstractPlotter and has agglomeration, dispersion and quantity attributes to help Partitiogram scatter plotting.
- class rpscripts.plotter.AbstractPlotter(rpdata: RPData, image_format='svg')[source]¶
Bases:
objectMain abstract plotter class.
This class has useful attributes and methods to handle RPData objects.
- class rpscripts.plotter.AbstractRadarPlotter(rpdata: RPData, image_format='svg')[source]¶
Bases:
AbstractPlotter
- class rpscripts.plotter.AbstractTimePlotter(rpdata: RPData, image_format='svg', show_labels=False)[source]¶
Bases:
AbstractPlotterAbstract time plotter class.
This class extends AbstractPlotter and handles X-axis to show measure numbers and offsets.
- class rpscripts.plotter.BubblePartitiogramPlotter(rpdata: RPData, image_format='svg', with_labels=True, bubble_size=2000, **kwargs)[source]¶
Bases:
AbstractPartitiogramPlotter
- class rpscripts.plotter.CombinedIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractIndexogramPlotter
- class rpscripts.plotter.ComparativePartitiogramMaker(rpdata: RPData, image_format='svg', with_labels=True, **kwargs)[source]¶
Bases:
AbstractPartitiogramPlotter
- class rpscripts.plotter.ComparativePartitiogramPlotter(rpdata: RPData, column_1, column_2, image_format='svg', with_labels=True, **kwargs)[source]¶
Bases:
AbstractPartitiogramPlotter
- class rpscripts.plotter.SimpleIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractIndexogramPlotter
- class rpscripts.plotter.SimplePartDensityNumberInTimePlotter(rpdata: RPData, image_format='svg', show_labels=False)[source]¶
Bases:
AbstractTimePlotter
- class rpscripts.plotter.SimplePartDensityNumberScatterPlotter(rpdata: RPData, image_format='svg', with_labels=False, **kwargs)[source]¶
Bases:
AbstractPlotter
- class rpscripts.plotter.SimplePartitiogramPlotter(rpdata: RPData, image_format='svg', with_labels=True, **kwargs)[source]¶
Bases:
AbstractPartitiogramPlotter
- class rpscripts.plotter.StairsIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractIndexogramPlotter
- class rpscripts.plotter.StemIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractIndexogramPlotter
- class rpscripts.plotter.StepIndexogramPlotter(rpdata: RPData, image_format='svg', close_bubbles=False, show_labels=False)[source]¶
Bases:
AbstractIndexogramPlotter
- class rpscripts.plotter.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.12. rpscripts.stats module¶
This module provides a few statistical data about the given filename.
- class rpscripts.stats.AgglomerationDispersionStatistics(rpdata: RPData, image_format='svg')[source]¶
Bases:
Statistics
- class rpscripts.stats.PartsDensityNumberStatistics(rpdata: RPData, image_format='svg')[source]¶
Bases:
Statistics
- class rpscripts.stats.Statistics(rpdata: RPData, name: str, image_format='svg')[source]¶
Bases:
objectAuxiliary class for statistics calculus.
- class rpscripts.stats.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.13. rpscripts.tclass module¶
This module generates textural classes data and chart.
For further information about textural classes, see Daniel Moreira (2019).
Moreira, Daniel. 2019. “Textural Design: A Compositional Theory for the Organization of Musical Texture.” Ph.D. Thesis, Universidade Federal do Rio de Janeiro.
- class rpscripts.tclass.ExtendedPartition(parts=None)[source]¶
Bases:
PartitionExtend Partition class to handle partition classes.
- class rpscripts.tclass.ExtendedRPData(path=None)[source]¶
Bases:
RPDataExtend RPData class to add tclass data.
- class rpscripts.tclass.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
- class rpscripts.tclass.TexturalClassPlot(rpdata: RPData, image_format='svg', show_labels=False, as_step=False)[source]¶
Bases:
AbstractTimePlotterTextural Class Plot class.
- class rpscripts.tclass.TexturalClassRadarPlotter(rpdata: RPData, image_format='svg')[source]¶
Bases:
AbstractRadarPlotter
4.1.14. rpscripts.tcontour module¶
This module generates complexity map and adds level and sublevel complexity to given csv rhythmic partitioning data.
For further information, see Daniel Moreira (2015 and 2019).
Moreira, Daniel. 2015. “Perspectivas para a análise textural a partir da mediação entre a teoria dos contornos e a análise particional.” Dissertação de mestrado, Universidade Federal do Rio de Janeiro.
Moreira, Daniel. 2019. “Textural Design: A Compositional Theory for the Organization of Musical Texture.” Ph.D. Thesis, Universidade Federal do Rio de Janeiro.
- class rpscripts.tcontour.Contour(str_partitions, complexity_map, locations, indexes)[source]¶
Bases:
objectContour class. It handles the contour points.
- make_complexity_data() None[source]¶
Make the complexity data from the available sequences of complexity levels and sublevels.
- class rpscripts.tcontour.ContourPlot(contour: Contour, rpdata: RPData, image_format='svg', show_labels=False, run_lowess=False, lowess_degree=0.05, as_step=False)[source]¶
Bases:
AbstractTimePlotterContour Plot class.
- class rpscripts.tcontour.ContourPoint(level=None, sublevel=None, partition_str=None)[source]¶
Bases:
objectContour point class. It handles complexity level and sublevel
- class rpscripts.tcontour.ExtendedPartition(parts=None)[source]¶
Bases:
PartitionExtend Partition class to handle textural contour.
- class rpscripts.tcontour.ExtendedRPData(path=None)[source]¶
Bases:
RPDataExtend RPData class to add complexity (contour) data.
- class rpscripts.tcontour.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.15. rpscripts.trimmer module¶
This module cuts off a given calc’s JSON output file by given start and end measure numbers and return a new JSON file.
- class rpscripts.trimmer.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.16. rpscripts.utils module¶
This module contains helpful tools for the rhythmic partitioning task.
- class rpscripts.utils.Subparser(subparser: ArgumentParser)[source]¶
Bases:
GeneralSubparserImplements argparser.
4.1.17. Module contents¶
Provide main modules and classes.