From a1885bea198c31acfee4079ec0341afd544df17d Mon Sep 17 00:00:00 2001 From: Luke Poeppel Date: Mon, 19 Jul 2021 17:40:48 -0400 Subject: [PATCH] Rebuilt documentation for v1.0.0. --- docs/.buildinfo | 2 +- .../decitala/database/corpora_models.html | 6 +- docs/_modules/decitala/database/db.html | 351 +++++++++++++----- docs/_modules/decitala/fragment.html | 4 +- docs/_modules/decitala/hash_table.html | 10 +- docs/_modules/decitala/hm/contour.html | 83 ++++- docs/_modules/decitala/hm/hm_utils.html | 163 +++++--- docs/_modules/decitala/hm/molt.html | 39 +- .../decitala/path_finding/dijkstra.html | 8 +- .../decitala/path_finding/floyd_warshall.html | 8 +- .../path_finding/path_finding_utils.html | 61 ++- docs/_modules/decitala/path_finding/pofp.html | 14 +- docs/_modules/decitala/search.html | 53 +-- docs/_modules/decitala/sp/sp_utils.html | 4 +- docs/_modules/decitala/trees.html | 58 ++- docs/_modules/decitala/utils.html | 187 ++++++---- docs/_modules/decitala/vis.html | 72 ++-- docs/_modules/index.html | 4 +- docs/_static/documentation_options.js | 2 +- docs/basic_usage.html | 4 +- docs/datasets/decitalas.html | 4 +- docs/datasets/greek_metrics.html | 4 +- docs/genindex.html | 60 ++- docs/index.html | 4 +- docs/mods/database.html | 80 ++-- docs/mods/fragment.html | 4 +- docs/mods/hash_table.html | 10 +- docs/mods/hm.html | 126 +++++-- docs/mods/path_finding.html | 54 ++- docs/mods/search.html | 15 +- docs/mods/sp.html | 4 +- docs/mods/trees.html | 20 +- docs/mods/utils.html | 214 +++++++---- docs/mods/vis.html | 21 +- docs/objects.inv | Bin 2054 -> 2127 bytes docs/py-modindex.html | 4 +- docs/search.html | 4 +- docs/searchindex.js | 2 +- 38 files changed, 1167 insertions(+), 596 deletions(-) diff --git a/docs/.buildinfo b/docs/.buildinfo index 9de16448..3ca742bb 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a65df0703d11288961e9442e7632a0cf +config: b337c1c155b3985475cd0028d6cb0a25 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/decitala/database/corpora_models.html b/docs/_modules/decitala/database/corpora_models.html index f411727d..02f20fca 100644 --- a/docs/_modules/decitala/database/corpora_models.html +++ b/docs/_modules/decitala/database/corpora_models.html @@ -7,7 +7,7 @@ - decitala.database.corpora_models — decitala 0.14.1 documentation + decitala.database.corpora_models — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -260,6 +260,8 @@

Source code for decitala.database.corpora_models

reported_size = Column(Integer) description = Column(String) locations = Column(String) + colors = Column(String) + datetimes = Column(String) def __repr__(self): return f"<decitala.SubcategoryData {self.name}>"
diff --git a/docs/_modules/decitala/database/db.html b/docs/_modules/decitala/database/db.html index a1d2d5d4..7819a1d6 100644 --- a/docs/_modules/decitala/database/db.html +++ b/docs/_modules/decitala/database/db.html @@ -7,7 +7,7 @@ - decitala.database.db — decitala 0.14.1 documentation + decitala.database.db — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -192,26 +192,28 @@

Source code for decitala.database.db

 	Boolean,
 	Integer,
 	ForeignKey,
-	create_engine
 )
-from sqlalchemy.ext.declarative import declarative_base
 from sqlalchemy.orm import (
-	sessionmaker,
 	relationship,
 	backref,
 )
 
 from music21 import converter
 
-from ..fragment import FragmentDecoder
-from ..search import rolling_hash_search
+from ..fragment import FragmentDecoder, FragmentEncoder
 from ..utils import get_logger
 from ..hm import hm_utils
 from ..vis import annotate_score
 from .db_utils import (
 	get_session,
-	TRANSCRIPTION_BASE
+	TRANSCRIPTION_BASE,
+	USER_BASE
 )
+from ..search import (
+	rolling_hash_search,
+	path_finder
+)
+from ..path_finding import path_finding_utils
 from .corpora_models import (
 	SubcategoryData,
 	TranscriptionData
@@ -220,18 +222,13 @@ 

Source code for decitala.database.db

 here = os.path.abspath(os.path.dirname(__file__))
 ODNC_Database = os.path.dirname(os.path.dirname(here)) + "/databases/ODNC.db"
 
-Base = declarative_base()
-
 
[docs]class DatabaseException(Exception): pass
-
[docs]class CompositionData(Base): +
[docs]class CompositionData(USER_BASE): """ SQLAlchemy model representing the basic composition data for a composition. - Parameters - ---------- - :param str name: Name of the composition. :param int part_num: Part number for the extraction. :param str local_filepath: Local filepath for the searched composition. @@ -252,70 +249,90 @@

Source code for decitala.database.db

 		self.local_filepath = local_filepath
# TODO: rename to `ExtractionData` -
[docs]class ExtractionData(Base): +
[docs]class ExtractionData(USER_BASE): """ - SQLAlchemy model representing a fragment extracted from a composition. - - Parameters - ---------- - - :param float onset_start: Starting onset of the extracted fragment. - :param float onset_stop: Ending onset of the extracted fragment - (onset of final object + quarter length) - :param str fragment_type: Fragment type; options currently include - `decitala`, `greek_foot`, and `general_fragment`. - :param str name: Name of the fragment. - :param str mod_type: Modification type of the fragment. - :param float ratio: Ratio of the fragment's values to the values in the database. - :param float difference: Difference between the fragment's values to the values - in the database. - :param str pitch_content: Pitch content of the extracted fragment. - :param bool is_slurred: Whether the extracted fragment is spanned by a slur object. + SQLAlchemy model representing a fragment extracted from a composition. Intended to be used with + the class method :obj:`ExtractionData.from_extraction`. See :obj:`decitala.search.Extraction` + for the relevant information on each column in the database. """ __tablename__ = "ExtractionData" id = Column(Integer, primary_key=True) + fragment = Column(String) onset_start = Column(Float) onset_stop = Column(Float) - # TODO: just make this fragment with the JSON output from FragmentEncoder. - fragment_type = Column(String) - name = Column(String) - - mod_hierarchy_val = Column(Float) - ratio = Column(Float) + retrograde = Column(Boolean) + factor = Column(Float) difference = Column(Float) + mod_hierarchy_val = Column(Integer) pitch_content = Column(String) - is_slurred = Column(Boolean) + is_spanned_by_slur = Column(Boolean) + slur_count = Column(Integer) + slur_start_end_count = Column(Integer) + + id_ = Column(Integer) + contiguous_summation = Column(Boolean) composition_data_id = Column(Integer, ForeignKey("CompositionData.id")) composition_data = relationship("CompositionData", backref=backref("composition_data")) def __init__( self, + fragment, onset_start, onset_stop, - fragment_type, - name, - mod_hierarchy_val, - ratio, + retrograde, + factor, difference, + mod_hierarchy_val, pitch_content, - is_slurred, + is_spanned_by_slur, + slur_count, + slur_start_end_count, + id_, + contiguous_summation ): + self.fragment = fragment self.onset_start = onset_start self.onset_stop = onset_stop - self.fragment_type = fragment_type - self.name = name - self.mod_hierarchy_val = mod_hierarchy_val - self.ratio = ratio + self.retrograde = retrograde + self.factor = factor self.difference = difference + self.mod_hierarchy_val = mod_hierarchy_val self.pitch_content = pitch_content - self.is_slurred = is_slurred
- -def _add_results_to_session( + self.is_spanned_by_slur = is_spanned_by_slur + self.slur_count = slur_count + self.slur_start_end_count = slur_start_end_count + self.id_ = id_ + self.contiguous_summation = contiguous_summation + +
[docs] @classmethod + def from_extraction(cls, extraction): + """ + Creates an :obj:`decitala.database.db.ExtractionData` object from a + :obj:`decitala.search.Extraction` object. This is more durable to accidentally breaking + things when adding data to extractions. + """ + return ExtractionData( + fragment=json.dumps(extraction.fragment, cls=FragmentEncoder), + onset_start=extraction.onset_range[0], + onset_stop=extraction.onset_range[1], + retrograde=extraction.retrograde, + factor=extraction.factor, + difference=extraction.difference, + mod_hierarchy_val=extraction.mod_hierarchy_val, + pitch_content=json.dumps(extraction.pitch_content), + is_spanned_by_slur=extraction.is_spanned_by_slur, + slur_count=extraction.slur_count, + slur_start_end_count=extraction.slur_start_end_count, + id_=extraction.id_, + contiguous_summation=extraction.contiguous_summation + )
+ +def _add_extraction_results_to_session( filepath, part_nums, table, @@ -331,50 +348,39 @@

Source code for decitala.database.db

 		)
 		session.add(data)
 
-		res = rolling_hash_search(
+		all_results = rolling_hash_search(
 			filepath=filepath,
 			part_num=this_part,
 			table=table,
 			windows=windows
 		)
-		if not(res):
+		if not(all_results):
 			return "No fragments extracted –– stopping."
 
-		fragment_objects = []
-		for this_fragment in res:
-			f = ExtractionData(
-				onset_start=this_fragment.onset_range[0],
-				onset_stop=this_fragment.onset_range[1],
-				fragment_type=this_fragment.frag_type,
-				name=this_fragment.fragment.name,
-				mod_hierarchy_val=this_fragment.mod_hierarchy_val,
-				ratio=this_fragment.factor,
-				difference=this_fragment.difference,
-				pitch_content=json.dumps(this_fragment.pitch_content),
-				is_slurred=this_fragment.is_spanned_by_slur
-			)
-			fragment_objects.append(f)
+		extraction_objects = []
+		for extraction in all_results:
+			f = ExtractionData.from_extraction(extraction)
+			extraction_objects.append(f)
 			session.add(f)
+		data.composition_data = extraction_objects
 
-		data.composition_data = fragment_objects
-
-
[docs]def create_database( +
[docs]def create_extraction_database( db_path, filepath, table, part_nums=[0], windows=list(range(2, 19)), - echo=False + verbose=False ): """ - Function for creating a database from a single filepath. + Function for creating a database from a single filepath. Stores all extracted fragments. :param str db_path: Path to the database to be created. :param str filepath: Path to the score to be analyzed. :param list table: A :obj:`decitala.hash_table.FragmentHashTable` object. :param list part_nums: Parts to be analyzed. :param list windows: Possible lengths of the search frames. - :param bool echo: Whether to echo the SQL calls. False by default. + :param bool verbose: Whether to log the SQL calls. False by default. """ assert os.path.isfile(filepath), DatabaseException("✗ The path provided is not a valid file.") assert db_path.endswith(".db"), DatabaseException("✗ The db_path must end with '.db'.") @@ -384,13 +390,9 @@

Source code for decitala.database.db

 	logger = get_logger(name=__file__, print_to_console=True)
 	logger.info(f"Preparing database at {db_path}...")
 
-	engine = create_engine(f"sqlite:////{db_path}", echo=echo)
-	Base.metadata.create_all(engine)
-
-	Session = sessionmaker(bind=engine)
-	session = Session()
+	session = get_session(db_path=db_path, base=USER_BASE)
 
-	_add_results_to_session(
+	_add_extraction_results_to_session(
 		filepath,
 		part_nums,
 		table,
@@ -401,12 +403,12 @@ 

Source code for decitala.database.db

 	session.commit()
 	return
-
[docs]def batch_create_database( +
[docs]def batch_create_extraction_database( db_path, data_in, table, windows, - echo=False + verbose=False ): """ This function creates a database from a dictionary of filepaths and desires ``part_nums`` @@ -416,7 +418,7 @@

Source code for decitala.database.db

 	:param dict data_in: Dictionary of filepaths (key) and part nums in a list (value).
 	:param list table: A :obj:`decitala.hash_table.FragmentHashTable` object.
 	:param list windows: Possible lengths of the search frames.
-	:param bool echo: Whether to echo the SQL calls. False by default.
+	:param bool verbose: Whether to log the SQL calls. False by default.
 	"""
 	assert db_path.endswith(".db"), DatabaseException("✗ The db_path must end with '.db'.")
 	if os.path.isfile(db_path):
@@ -425,14 +427,10 @@ 

Source code for decitala.database.db

 	logger = get_logger(name=__file__, print_to_console=True)
 	logger.info(f"Preparing database at {db_path}...")
 
-	engine = create_engine(f"sqlite:////{db_path}", echo=echo)
-	Base.metadata.create_all(engine)
-
-	Session = sessionmaker(bind=engine)
-	session = Session()
+	session = get_session(db_path=db_path, base=USER_BASE)
 
 	for filepath, part_nums in data_in.items():
-		_add_results_to_session(
+		_add_extraction_results_to_session(
 			filepath,
 			part_nums,
 			table,
@@ -443,6 +441,152 @@ 

Source code for decitala.database.db

 	session.commit()
 	return
+def _add_path_results_to_session( + filepath, + part_nums, + table, + windows, + allow_subdivision, + allow_contiguous_summation, + algorithm, + cost_function_class, + split_dict, + slur_constraint, + enforce_earliest_start, + session + ): + filepath_name = filepath.split("/")[-1] + for part_num in part_nums: + data = CompositionData( + name=filepath_name, + part_num=part_num, + local_filepath=filepath + ) + session.add(data) + + path = path_finder( + filepath=filepath, + part_num=part_num, + table=table, + windows=windows, + allow_subdivision=allow_subdivision, + allow_contiguous_summation=allow_contiguous_summation, + algorithm=algorithm, + cost_function_class=cost_function_class, + split_dict=split_dict, + slur_constraint=slur_constraint, + enforce_earliest_start=enforce_earliest_start, + verbose=True + ) + if not(path): + return "No fragments extracted –– stopping." + + extraction_objects = [] + for extraction in path: + f = ExtractionData.from_extraction(extraction) + extraction_objects.append(f) + session.add(f) + data.composition_data = extraction_objects + +
[docs]def create_path_database( + db_path, + filepath, + part_nums, + table, + windows=list(range(2, 19)), + allow_subdivision=False, + allow_contiguous_summation=False, + algorithm="dijkstra", + cost_function_class=path_finding_utils.CostFunction3D(), + split_dict=None, + slur_constraint=False, + enforce_earliest_start=False, + verbose=False + ): + """ + Function for creating a database from a single filepath. Stores the extracted path. + See :obj:`decitala.search.path_finder` to find the definitions of the relevant parameters. + + :param str db_path: Path to the database to be created. + """ + assert os.path.isfile(filepath), DatabaseException("✗ The path provided is not a valid file.") + assert db_path.endswith(".db"), DatabaseException("✗ The db_path must end with '.db'.") + if os.path.isfile(db_path): + return "That database already exists ✔" + + logger = get_logger(name=__file__, print_to_console=True) + logger.info(f"Preparing database at {db_path}...") + + session = get_session(db_path=db_path, base=USER_BASE) + + _add_path_results_to_session( + filepath=filepath, + part_nums=part_nums, + table=table, + windows=windows, + allow_subdivision=allow_subdivision, + allow_contiguous_summation=allow_contiguous_summation, + algorithm=algorithm, + cost_function_class=cost_function_class, + split_dict=split_dict, + slur_constraint=slur_constraint, + enforce_earliest_start=enforce_earliest_start, + session=session + ) + + session.commit() + return
+ +
[docs]def batch_create_path_database( + db_path, + data_in, + table, + windows=list(range(2, 19)), + allow_subdivision=False, + allow_contiguous_summation=False, + algorithm="dijkstra", + cost_function_class=path_finding_utils.CostFunction3D(), + split_dict=None, + slur_constraint=False, + enforce_earliest_start=False, + verbose=False + ): + """ + This function creates a database from a dictionary of filepaths and desires ``part_nums`` + to analyze. See :obj:`decitala.search.path_finder` to find the definitions of the relevant + parameters. + + :param str db_path: Path to the database to be created. + :param dict data_in: Dictionary of filepaths (key) and part nums in a list (value). + """ + assert db_path.endswith(".db"), DatabaseException("✗ The db_path must end with '.db'.") + if os.path.isfile(db_path): + return "That database already exists ✔" + + logger = get_logger(name=__file__, print_to_console=True) + logger.info(f"Preparing database at {db_path}...") + + session = get_session(db_path=db_path, base=USER_BASE) + + for filepath, part_nums in data_in.items(): + _add_path_results_to_session( + filepath=filepath, + part_nums=part_nums, + table=table, + windows=windows, + allow_subdivision=allow_subdivision, + allow_contiguous_summation=allow_contiguous_summation, + algorithm=algorithm, + cost_function_class=cost_function_class, + split_dict=split_dict, + slur_constraint=slur_constraint, + enforce_earliest_start=enforce_earliest_start, + session=session + ) + + session.commit() + return
+ ####################################################################################################
[docs]class Species: """ @@ -460,7 +604,9 @@

Source code for decitala.database.db

 		self.local_name = res.local_name
 		self.reported_size = res.reported_size
 		self.description = json.loads(res.description)
+		self.colors = json.loads(res.colors)
 		self.locations = json.loads(res.locations)
+		self.datetimes = json.loads(res.datetimes)
 
 		self.transcriptions = [Transcription(transcription.name) for transcription in res.transcriptions]
 
@@ -471,32 +617,33 @@ 

Source code for decitala.database.db

 	def num_transcriptions(self):
 		return len(self.transcriptions)
 
-
[docs] def aggregate_pc_distribution( +
[docs] def aggregated_pc_distribution( self, - normalize=False, + normalized=False, as_vector=True ): """ Returns the aggregate pitch class distribution across all transcriptions in a species. """ - pc_dict = {i: 0 for i in range(12)} + net_counter_pre = {x: [] for x in range(12)} for transcription in self.transcriptions: - pc_counter_dict = hm_utils.pc_counter( + transcription_counter = hm_utils.pc_counter( filepath=transcription.filepath, - part_num=0, - normalize_over_duration=False + part_num=0 ) - for key in pc_counter_dict: - pc_dict[key] += pc_counter_dict[key] + for key in transcription_counter: + net_counter_pre[key].append(transcription_counter[key]) + + net_counter = {x: sum(y) for x, y in net_counter_pre.items()} - vector = hm_utils.pc_dict_to_vector(pc_dict) - if normalize: - vector = vector / sum(vector) + if normalized: + net = sum(net_counter.values()) + net_counter = {x: (y / net) for x, y in net_counter.items()} - if as_vector: - return vector + if not(as_vector): + return net_counter else: - return {i: val for i, val in enumerate(vector)}
+ return hm_utils.pc_dict_to_vector(net_counter)
[docs]class Transcription: """ diff --git a/docs/_modules/decitala/fragment.html b/docs/_modules/decitala/fragment.html index c34916ce..d52eecd0 100644 --- a/docs/_modules/decitala/fragment.html +++ b/docs/_modules/decitala/fragment.html @@ -7,7 +7,7 @@ - decitala.fragment — decitala 0.14.1 documentation + decitala.fragment — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
diff --git a/docs/_modules/decitala/hash_table.html b/docs/_modules/decitala/hash_table.html index 228e3706..3f2287db 100644 --- a/docs/_modules/decitala/hash_table.html +++ b/docs/_modules/decitala/hash_table.html @@ -7,7 +7,7 @@ - decitala.hash_table — decitala 0.14.1 documentation + decitala.hash_table — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -365,7 +365,7 @@

Source code for decitala.hash_table

 	<decitala.hash_table.FragmentHashTable 0 fragments>
 	>>> fht.load()
 	>>> fht
-	<decitala.hash_table.FragmentHashTable 2899 fragments>
+	<decitala.hash_table.FragmentHashTable 2941 fragments>
 	>>> fht.datasets
 	['greek_foot']
 	>>> fht.custom_fragments
@@ -471,10 +471,10 @@ 

Source code for decitala.hash_table

 
 	>>> ght = GreekFootHashTable()
 	>>> ght
-	<decitala.hash_table.FragmentHashTable 2855 fragments>
+	<decitala.hash_table.FragmentHashTable 2897 fragments>
 	>>> ght.load(try_retrograde=False, allow_stretch_augmentation=False)
 	>>> ght
-	<decitala.hash_table.FragmentHashTable 737 fragments>
+	<decitala.hash_table.FragmentHashTable 779 fragments>
 	"""
 	def __init__(self):
 		super().__init__(datasets=["greek_foot"])
diff --git a/docs/_modules/decitala/hm/contour.html b/docs/_modules/decitala/hm/contour.html
index c3484294..5677d97a 100644
--- a/docs/_modules/decitala/hm/contour.html
+++ b/docs/_modules/decitala/hm/contour.html
@@ -7,7 +7,7 @@
   
   
   
-  decitala.hm.contour — decitala 0.14.1 documentation
+  decitala.hm.contour — decitala 1.0.0 documentation
   
 
   
@@ -61,7 +61,7 @@
             
             
               
- 0.14.1 + 1.0.0
@@ -200,6 +200,21 @@

Source code for decitala.hm.contour

 	(1, 0, 1): "Porrectus"
 }
 
+# Morris's Prime Contour Classes (1993, 220-221)
+# "Linear Prime Classes" (Schultz 92)
+# NOTE: Schultz uses the same linear prime classes to refer to symmetries
+# of these classes: e.g. <0 2 1> and <1 0 2> = L.
+PRIME_CONTOUR_CLASSES = {
+	(0,): "A",
+	(0, 0): "B",
+	(0, 1): "D",
+	(0, 1, 0): "G",
+	(0, 2, 1): "L",
+	(1, 0, 2, 1): "P",
+	(1, 0, 3, 2): "X",
+	(1, 3, 0, 2): "Y"
+}
+
 
[docs]class ContourException(Exception): pass
@@ -265,7 +280,7 @@

Source code for decitala.hm.contour

 
 	return np.array(out)
-
[docs]def pitch_content_to_contour(pitch_content, as_str=False): +
[docs]def pitch_contour(pitch_content, as_str=False): """ This function returns the contour of given pitch content. It accepts either a list of MIDI tones, or the data returned in the :obj:`decitala.search` module. Like @@ -279,10 +294,10 @@

Source code for decitala.hm.contour

 	:rtype: numpy.array or str
 
 	>>> pitch_content_1 = [(80,), (91,), (78,), (85,)]
-	>>> pitch_content_to_contour(pitch_content_1)
+	>>> pitch_contour(pitch_content_1)
 	array([1, 3, 0, 2])
 	>>> pitch_content_2 = [80, 84, 84]
-	>>> pitch_content_to_contour(pitch_content_2, as_str=True)
+	>>> pitch_contour(pitch_content_2, as_str=True)
 	'<0 1 1>'
 	"""
 	if type(pitch_content[0]) == tuple:
@@ -322,7 +337,43 @@ 

Source code for decitala.hm.contour

 	try:
 		return NEUMES[tuple(contour)]
 	except KeyError:
-		return None
+ raise ContourException(f"The contour {contour} was not found in the given current set.")
+ +
[docs]def contour_class( + contour, + allow_symmetries=False + ): + """ + Returns the associated pitch contour class (a letter) from Morris (1993, 220-221) + of a contour. + + :param contour: a pitch contour (iterable). + :param bool allow_symmetries: whether to allow permutations of the given contour to be found. + Default is ``False``. Note that ``X`` and ``Y`` are weird cases + for this symmetry. May currently fail (don't understand it). + :rtype: str + + >>> contour_class((1, 0, 3, 2)) + 'X' + >>> contour_class((0, 1, 0), allow_symmetries=False) + 'G' + >>> contour_class((0, 0, 1), allow_symmetries=True) + 'G' + """ + try: + if not(allow_symmetries): + return PRIME_CONTOUR_CLASSES[contour] + elif contour in {(1, 0, 3, 2), (1, 3, 0, 2)}: # IDK about this case. + return PRIME_CONTOUR_CLASSES[contour] + else: + match = None + for key in PRIME_CONTOUR_CLASSES.keys(): + if len(key) == len(contour) and len(set(key)) == len(set(contour)): + match = PRIME_CONTOUR_CLASSES[key] + break + return match + except KeyError: + ContourException(f"The contour {contour} is not prime.")
#################################################################################################### @@ -463,7 +514,7 @@

Source code for decitala.hm.contour

 
 	return contour
 
-
[docs]def contour_to_prime_contour(contour): +
[docs]def prime_contour(contour): """ Implementation of Robert Morris' Contour-Reduction algorithm (Morris, 1993). "The algorithm prunes pitches from a contour until it is reduced to a prime." (Schultz) @@ -473,23 +524,23 @@

Source code for decitala.hm.contour

 	:rtype: tuple
 
 	>>> contour_a = [0, 1]
-	>>> contour_to_prime_contour(contour_a)
+	>>> prime_contour(contour_a)
 	(array([0, 1]), 0)
 	>>> contour_b = [0, 4, 3, 2, 5, 5, 1]
-	>>> contour_to_prime_contour(contour_b)[0]
+	>>> prime_contour(contour_b)[0]
 	array([0, 2, 1])
 	"""
 	depth = 0
 
 	# If the segment is of length <= 2, it is prime by definition.
 	if len(contour) <= 2:
-		return (pitch_content_to_contour(contour), depth)
+		return (pitch_contour(contour), depth)
 
 	# If all the values are extremas, it is already prime.
 	prime_contour = _get_initial_extrema(contour)
 	initial_flags = [x[1] for x in prime_contour]
 	if all(x for x in initial_flags):
-		return (pitch_content_to_contour(contour), depth)
+		return (pitch_contour(contour), depth)
 
 	still_unflagged_values = True
 	while still_unflagged_values:
@@ -504,7 +555,7 @@ 

Source code for decitala.hm.contour

 	prime_contour = [x[0] for x in prime_contour if x[1]]
 	depth += 1
 
-	return (pitch_content_to_contour(prime_contour), depth)
+ return (pitch_contour(prime_contour), depth)
#################################################################################################### # Implementation of Schultz contour reduction algorithm (2008). Final version (see p. 108). @@ -867,7 +918,7 @@

Source code for decitala.hm.contour

 		contour_elems = [x[0] for x in contour if x[1]][1:-1]
 		return len(contour_elems) <= len(set(contour_elems)) + 1
 
-
[docs]def contour_to_schultz_prime_contour(contour): +
[docs]def schultz_prime_contour(contour): """ Implementation of Schultz's (2008) modification of Morris' contour-reduction algorithm. Catered to further prune "unnecessary" repetitions of contour elements. @@ -878,14 +929,14 @@

Source code for decitala.hm.contour

 	:rtype: tuple
 
 	>>> alouette_5 = [2, 5, 3, 1, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-	>>> contour_to_schultz_prime_contour(alouette_5)
+	>>> schultz_prime_contour(alouette_5)
 	(array([1, 2, 0]), 3)
 	"""
 	depth = 0
 
 	# If the segment is of length <= 2, it is prime by definition.
 	if len(contour) <= 2:
-		return (pitch_content_to_contour(contour), depth)
+		return (pitch_contour(contour), depth)
 
 	prime_contour = _get_initial_extrema(contour)
 
@@ -906,7 +957,7 @@ 

Source code for decitala.hm.contour

 
 	# Get the contour elements.
 	prime_contour = [x[0] for x in prime_contour]
-	return (pitch_content_to_contour(prime_contour), depth)
+ return (pitch_contour(prime_contour), depth)
diff --git a/docs/_modules/decitala/hm/hm_utils.html b/docs/_modules/decitala/hm/hm_utils.html index 576e5b6a..f7182a8b 100644 --- a/docs/_modules/decitala/hm/hm_utils.html +++ b/docs/_modules/decitala/hm/hm_utils.html @@ -7,7 +7,7 @@ - decitala.hm.hm_utils — decitala 0.14.1 documentation + decitala.hm.hm_utils — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -191,6 +191,9 @@

Source code for decitala.hm.hm_utils

 
 from . import molt
 
+
[docs]class HMUtilsException(Exception): + pass
+ #################################################################################################### # Data KS_MAJOR_WEIGHTS = np.array([6.35, 2.23, 3.48, 2.33, 4.38, 4.09, 2.52, 5.19, 2.39, 3.66, 2.29, 2.88]) # noqa @@ -324,54 +327,74 @@

Source code for decitala.hm.hm_utils

 		"M7T6": molt.MOLT(mode=7, transposition=6).pc_vector(tonic_value=molt_tonic_val),
 	}
 	if not(exclude_major_minor):
-		return MOLT_COEFFS | {
-			"Major": [6.35, 2.23, 3.48, 2.33, 4.38, 4.09, 2.52, 5.19, 2.39, 3.66, 2.29, 2.88],
-			"Minor": [6.33, 2.68, 3.52, 5.38, 2.60, 3.53, 2.54, 4.75, 3.98, 2.69, 3.34, 3.17],
-		}
+		MOLT_COEFFS["Major"] = [6.35, 2.23, 3.48, 2.33, 4.38, 4.09, 2.52, 5.19, 2.39, 3.66, 2.29, 2.88] # noqa
+		MOLT_COEFFS["Minor"] = [6.33, 2.68, 3.52, 5.38, 2.60, 3.53, 2.54, 4.75, 3.98, 2.69, 3.34, 3.17] # noqa
+		return MOLT_COEFFS
 	else:
 		return MOLT_COEFFS
[docs]def pc_counter( filepath, part_num, - normalize_over_duration=False + return_counts=False ): """ - Returns a dictionary holding the pitch classes in the keys and the count (or count normalized - over total duration) in the given filepath-part_num combination. + Returns a dictionary holding the pitch classes in the keys and the sum of the quarter lengths + of this pitch class in a given filepath-part combination. :param str filepath: path to music21-readable file to be parsed. :param int part_num: part number in the work to be analyzed. - :param bool normalize_over_duration: whether to normalize the counts by the net duration - of the part. + :param bool return_counts: whether to return the counts of the detected pitches, instead of the + net quarter lengths. :return: a dictionary holding the 12 pitch classes in the keys and the counts/proportion in the values. :rtype: dict - - TODO: allow option for instead returning the net QLs. """ pitch_classes = {x: [] for x in range(0, 12)} converted = converter.parse(filepath) - net = 0 for tone in converted.parts[part_num].stripTies().flat.iter.notes: try: if tone.isChord: for i, x in enumerate(tone.pitches): pitch_classes[x.pitchClass].append(tone.quarterLength) - net += tone.quarterLength else: pitch_classes[tone.pitch.pitchClass].append(tone.quarterLength) - net += tone.quarterLength except AttributeError: continue - if normalize_over_duration: - normalized_dict = {x: sum(y) / net for x, y in pitch_classes.items()} - assert round(sum(normalized_dict.values())) == 1 - return normalized_dict + if not(return_counts): + return {x: sum(y) for x, y in pitch_classes.items()} else: return {x: len(y) for x, y in pitch_classes.items()}
+
[docs]def normalize_pc_counter(dict_in): + """ + Normalize a dictionary by the sum of the total values. Meant to be used with the + net ql values from :obj:`decitala.hm.hm_utils`. + + >>> d = {0: 0, 1: 0.375, 2: 0, 3: 0.25, 4: 0.375, + ... 5: 0.375, 6: 0.375, 7: 0, 8: 0.75, 9: 0.25, 10: 0, 11: 0 + ... } + >>> for pc, norm_val in normalize_pc_counter(d).items(): + ... print(pc, norm_val) + 0 0.0 + 1 0.13636363636363635 + 2 0.0 + 3 0.09090909090909091 + 4 0.13636363636363635 + 5 0.13636363636363635 + 6 0.13636363636363635 + 7 0.0 + 8 0.2727272727272727 + 9 0.09090909090909091 + 10 0.0 + 11 0.0 + """ + net = sum(dict_in.values()) + normalized_dict = {x: (y / net) for x, y in dict_in.items()} + assert round(sum(normalized_dict.values())) == 1 + return normalized_dict
+
[docs]def pc_dict_to_vector(dict_in): """ Function for converting a pitch class dictionary (i.e. a dictionary with keys in range 0-11 and @@ -433,57 +456,93 @@

Source code for decitala.hm.hm_utils

 		count += 1
 	return count
-
[docs]def KS(pc_vector, coefficients, return_p_value=False): +
[docs]def KS( + pc_vector, + coefficients, + method="spearman" + ): """ Krumhansl-Schumckler algorithm. :param pc_vector: a vector of pitch class probabilities, ordered by pitch class. :param coefficients: coefficents used in the correlation calculation. - - TODO: remove the stupid return_p_value argument. + :param str method: either 'pearson' or 'spearman' (the method used for calculating correlation). + Default is 'pearson'. """ - input_zscores = stats.zscore(pc_vector) + assert method.lower() in {"spearman", "pearson"}, HMUtilsException("Only supported options are 'pearson' or 'spearman'.") # noqa - coefficients = coefficients / np.linalg.norm(coefficients) - score = stats.spearmanr(input_zscores, coefficients) - if return_p_value: - return score + if method.lower() == "pearson": + score = stats.pearsonr(pc_vector, coefficients) else: - return score[0]
+ score = stats.spearmanr(pc_vector, coefficients) + + return score
-
[docs]def KS_diatonic(pc_vector, coefficients, return_tonic=False): +
[docs]def KS_diatonic( + pc_vector, + coefficients, + method="pearson", + return_tonic=False + ): """ - Krumhansl-Schumckler algorithm for diatonic collections. Circulates over all major and minor - scales. + Krumhansl-Schumckler algorithm for diatonic collections. Circulates over the weights. + Returns the best match (and its associated pvalue) using either Pearson or + Spearman correlation. :param pc_vector: a vector of pitch class probabilities, ordered by pitch class. :param coefficients: coefficents used in the correlation calculation. - :param bool return_tonic: whether to also return the most highly correlated tonic. + :param str method: either 'spearman' or 'pearson' (the method used for calculating correlation). + Default is 'pearson'. + :param bool return_tonic: whether to also return the pitch object of the most highly correlated + tonic. """ - input_zscores = stats.zscore(pc_vector) - - coefficients = coefficients / np.linalg.norm(coefficients) - coefficients = linalg.circulant(coefficients) + assert method.lower() in {"spearman", "pearson"}, HMUtilsException("Only supported options are 'pearson' or 'spearman'.") # noqa + + coefficients = linalg.circulant(coefficients).T + + if method.lower() == "pearson": + scores = [ + stats.pearsonr(pc_vector, coefficient_collection) + for coefficient_collection in coefficients + ] + max_correlation_data = max(scores, key=lambda x: x[0]) + max_correlation = max_correlation_data[0] + max_correlation_index = 0 + for i, score in enumerate(scores): + if score[0] == max_correlation: + max_correlation_index = i + else: + scores = [ + stats.spearmanr(pc_vector, coefficient_collection) + for coefficient_collection in coefficients + ] + max_correlation_data = max(scores, key=lambda x: x.correlation) + max_correlation = max_correlation_data.correlation + max_correlation_index = 0 + for i, score in enumerate(scores): + if score.correlation == max_correlation: + max_correlation_index = i - scores = [ - stats.pearsonr(x=input_zscores, y=coefficient_collection)[0] - for coefficient_collection in coefficients - ] - max_correlation = max(scores) - max_correlation_index = scores.index(max_correlation) max_correlation_pitch = Pitch(max_correlation_index).name if return_tonic: - return max_correlation_pitch, max_correlation + return max_correlation_pitch, max_correlation_data else: - return max_correlation
+ return max_correlation_data
-
[docs]def test_all_coefficients(pc_vector, exclude_major_minor=False, molt_tonic_val=1): +
[docs]def test_all_coefficients( + pc_vector, + method="pearson", + exclude_major_minor=False, + molt_tonic_val=1 + ): """ Function for calculating the correlation between a given ``pc_vector`` and all possible coefficients (binary modes for MOLT and KS coefficients). :param pc_vector: a vector of pitch class probabilities, ordered by pitch class. + :param str method: either 'spearman' or 'pearson' (the method used for calculating correlation). + Default is 'pearson'. :param bool exclude_major_minor: whether to exclude major/minor weights from the calculation. Default is ``False``. :param int molt_tonic_val: optional value to set the first element of the MOLT to. Default is @@ -497,9 +556,17 @@

Source code for decitala.hm.hm_utils

 			molt_tonic_val=molt_tonic_val
 		).items():
 		if key in {"Major", "Minor"}:
-			res[key] = KS_diatonic(pc_vector, coefficients)
+			res[key] = KS_diatonic(
+				pc_vector,
+				coefficients,
+				method
+			)
 		else:
-			res[key] = KS(pc_vector, coefficients, return_p_value=True)
+			res[key] = KS(
+				pc_vector,
+				coefficients,
+				method
+			)
 
 	return res
diff --git a/docs/_modules/decitala/hm/molt.html b/docs/_modules/decitala/hm/molt.html index 1aa11a5f..f767306e 100644 --- a/docs/_modules/decitala/hm/molt.html +++ b/docs/_modules/decitala/hm/molt.html @@ -7,7 +7,7 @@ - decitala.hm.molt — decitala 0.14.1 documentation + decitala.hm.molt — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -196,6 +196,9 @@

Source code for decitala.hm.molt

 
 from . import hm_utils
 
+
[docs]class MoltException(Exception): + pass
+
[docs]class MOLT: """ Class representing a Mode of Limited Transposition (Messiaen, 1944), therefore called a MOLT. @@ -222,18 +225,26 @@

Source code for decitala.hm.molt

 	{0: 0, 1: 1, 2: 0, 3: 1, 4: 0, 5: 1, 6: 0, 7: 1, 8: 0, 9: 1, 10: 0, 11: 1}
 	"""
 	def __init__(self, mode, transposition):
+		assert type(mode) == int, MoltException("The `mode` must be an integer.")
+		assert type(transposition) == int, MoltException("The `transposition` must be an integer.")
 		self.mode = mode
 		self.transposition = transposition
 
 	def __repr__(self):
 		return f"<moiseaux.MOLT mode={self.mode}, transposition={self.transposition}>"
 
+	def __hash__(self):
+		return hash("-".join([str(self.mode), str(self.transposition)]))
+
+	def __eq__(self, other):
+		return self.__hash__() == other.__hash__()
+
 
[docs] @classmethod def from_str(cls, str_in): """ Return a MOLT object from string input of the form ``"MXTB"`` """ - return MOLT(mode=str_in[1], transposition=str_in[3])
+ return MOLT(mode=int(str_in[1]), transposition=int(str_in[3]))
@property def scale(self): @@ -305,26 +316,32 @@

Source code for decitala.hm.molt

 	either a list of midi tones, a list of strings, a list of pitch objecs,
 	or a list of note objects.
 	"""
-	# Prepare input
+	# Convert everything to pitch classes.
 	query_collection = set()
 	if all(isinstance(x, int) or isinstance(x, str) for x in collection):
 		for x in collection:
 			query_collection.add(Pitch(x).pitchClass)
 	elif all(isinstance(x, Pitch) or isinstance(x, Note) for x in collection):
 		for x in collection:
-			query_collection.add(x.pitchClass)
+			if isinstance(x, Pitch):
+				query_collection.add(x.pitchClass)
+			elif isinstance(x, Note):
+				query_collection.add(x.pitch.pitchClass)
+			else:
+				raise MoltException("Something is wrong with this collection. File an issue?")
 
 	res = []
-	for key, val in hm_utils.MOLT_DATA.items():
+	# Data: "MODE-1_TRANSPOSITION-1"
+	for mode, pcs_and_colors in hm_utils.MOLT_DATA.items():
 		pcs = set()
-		for this_pitch in val[0]:
+		for this_pitch in pcs_and_colors[0]:
 			pcs.add(Pitch(this_pitch).pitchClass)
 
 		if query_collection.issubset(pcs):
-			split = key.split("_")
-			mode = split[0][-1]
-			transposition = split[1][-1]
-			res.append(MOLT(mode=mode, transposition=transposition))
+			split = mode.split("_")
+			mode_num = int(split[0][-1])
+			transposition = int(split[1][-1])
+			res.append(MOLT(mode=mode_num, transposition=transposition))
 
 	return res
diff --git a/docs/_modules/decitala/path_finding/dijkstra.html b/docs/_modules/decitala/path_finding/dijkstra.html index b7e595ec..666e3ef5 100644 --- a/docs/_modules/decitala/path_finding/dijkstra.html +++ b/docs/_modules/decitala/path_finding/dijkstra.html @@ -7,7 +7,7 @@ - decitala.path_finding.dijkstra — decitala 0.14.1 documentation + decitala.path_finding.dijkstra — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -194,7 +194,7 @@

Source code for decitala.path_finding.dijkstra

data, graph, source, - cost_function_class=path_finding_utils.DefaultCostFunction(), + cost_function_class=path_finding_utils.CostFunction3D(), ): """ Dijkstra path-finding algorithm from dynamic programming. Uses a min-heap @@ -227,7 +227,7 @@

Source code for decitala.path_finding.dijkstra

[docs]def dijkstra_best_source_and_sink( data, - cost_function_class=path_finding_utils.DefaultCostFunction(), + cost_function_class=path_finding_utils.CostFunction3D(), enforce_earliest_start=False, verbose=False ): diff --git a/docs/_modules/decitala/path_finding/floyd_warshall.html b/docs/_modules/decitala/path_finding/floyd_warshall.html index c4e4be0a..6f4e80b5 100644 --- a/docs/_modules/decitala/path_finding/floyd_warshall.html +++ b/docs/_modules/decitala/path_finding/floyd_warshall.html @@ -7,7 +7,7 @@ - decitala.path_finding.floyd_warshall — decitala 0.14.1 documentation + decitala.path_finding.floyd_warshall — decitala 1.0.0 documentation @@ -61,7 +61,7 @@

- 0.14.1 + 1.0.0
@@ -190,13 +190,13 @@

Source code for decitala.path_finding.floyd_warshall

from progress.bar import Bar from ..utils import get_logger -from .path_finding_utils import DefaultCostFunction +from .path_finding_utils import CostFunction3D logger = get_logger(name=__name__, print_to_console=True)
[docs]def floyd_warshall( data, - cost_function_class=DefaultCostFunction(), + cost_function_class=CostFunction3D(), verbose=False ): """ diff --git a/docs/_modules/decitala/path_finding/path_finding_utils.html b/docs/_modules/decitala/path_finding/path_finding_utils.html index 742ddf5e..aa1316db 100644 --- a/docs/_modules/decitala/path_finding/path_finding_utils.html +++ b/docs/_modules/decitala/path_finding/path_finding_utils.html @@ -7,7 +7,7 @@ - decitala.path_finding.path_finding_utils — decitala 0.14.1 documentation + decitala.path_finding.path_finding_utils — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -228,16 +228,20 @@

Source code for decitala.path_finding.path_finding_utils

""" raise NotImplementedError
-
[docs]class DefaultCostFunction(CostFunction): +
[docs]class CostFunction2D(CostFunction): """ Default cost function used in the path-finding algorithms. Weights optimized by hyperparameter search. """ - def __init__(self, gap_weight=0.75, onset_weight=0.25): + def __init__( + self, + gap_weight=0.75, + onset_weight=0.25 + ): self.gap_weight = gap_weight self.onset_weight = onset_weight -
[docs] def cost(self, vertex_a, vertex_b): +
[docs] def cost(self, vertex_a, vertex_b): gap = vertex_b.onset_range[0] - vertex_a.onset_range[1] onsets = 1 / (vertex_a.fragment.num_onsets + vertex_b.fragment.num_onsets) cost = (self.gap_weight * gap) + (self.onset_weight * onsets) @@ -281,7 +285,7 @@

Source code for decitala.path_finding.path_finding_utils

[docs]def build_graph( data, - cost_function_class=DefaultCostFunction(), + cost_function_class=CostFunction3D(), verbose=False ): """ @@ -290,7 +294,7 @@

Source code for decitala.path_finding.path_finding_utils

search algorithms. Requires ``id`` keys in each dictionary input. :param list data: a list of :obj:`decitala.search.Extraction` objects. - :param `decitala.path_finding.path_finding_utils.CostFunction` cost_function_class: a cost + :param `path_finding_utils.CostFunction` cost_function_class: a cost function that will be used in calculating the weights between vertices. :return: A "graph" holding vertices and the associated cost between all other non-negative edges. :rtype: dict @@ -448,28 +452,43 @@

Source code for decitala.path_finding.path_finding_utils

return combos
-def split_extractions(data, split_dict, all_res): - split_extractions = [] - for extraction in data: - if extraction.fragment in split_dict: - components = extraction.split(split_dict=split_dict, all_res=all_res) - split_extractions.extend(components) - else: - split_extractions.append(extraction) - return split_extractions -
[docs]def default_split_dict(): """ - Splits for common compound, repeated metrics. + Default splits for common compound greek metrics. Splits are either obvious (e.g. triiamb) + or provided by Messiaen. """ return { GreekFoot("Diiamb"): [GreekFoot("Iamb"), GreekFoot("Iamb")], - GreekFoot("Triiamb"): [GreekFoot("Iamb"), GreekFoot("Iamb"), GreekFoot("Iamb")], GreekFoot("Dicretic"): [GreekFoot("Amphimacer"), GreekFoot("Amphimacer")], GreekFoot("Dianapest"): [GreekFoot("Anapest"), GreekFoot("Anapest")], - GreekFoot("Dochmius"): [GreekFoot("Iamb"), GreekFoot("Amphimacer")] + GreekFoot("Didactyl"): [GreekFoot("Dactyl"), GreekFoot("Dactyl")], + GreekFoot("Diproceleusmatic"): [GreekFoot("Proceleusmatic"), GreekFoot("Proceleusmatic")], + GreekFoot("Dochmius"): [GreekFoot("Iamb"), GreekFoot("Amphimacer")], + GreekFoot("Triiamb"): [GreekFoot("Iamb"), GreekFoot("Iamb"), GreekFoot("Iamb")], + GreekFoot("Triproceleusmatic"): [GreekFoot("Proceleusmatic"), GreekFoot("Proceleusmatic"), GreekFoot("Proceleusmatic")], # noqa }
+
[docs]def split_extractions(data, all_res, split_dict=default_split_dict()): + """ + TODO: rename ``all_res`` to ``all_extractions``. + Function for splitting a list of extraction objects by a given ``split_dict``. + + :param list data: a list of :obj:`decitala.search.Extraction` objects (corresponding to, + probably, a path of fragments). + :param list data: a list of :obj:`decitala.search.Extraction` objects (corresponding to + the complete extractions from a filepath-part. + :param dict split_dict: the dictionary used to split the extracted fragments into their + components. Default is :obj:`path_finding_utils.split_dict` + """ + split_extractions = [] + for extraction in data: + if extraction.fragment in split_dict: + components = extraction.split(split_dict=split_dict, all_res=all_res) + split_extractions.extend(components) + else: + split_extractions.append(extraction) + return split_extractions
+
[docs]def check_accuracy(training_data, calculated_data, mode, return_list): """ The `training_data` is the analysis as provided by Messiean. The `input_data` @@ -487,6 +506,8 @@

Source code for decitala.path_finding.path_finding_utils

elif mode == "Transcriptions": if (this_training_fragment[0] == this_fragment.fragment) and (tuple(this_training_fragment[1]) == this_fragment.onset_range): # noqa accurate += 1 + else: + raise Exception("Only options are 'Compositions' and 'Transcriptions'.") if not(return_list): return (accurate / len(training_data)) * 100 diff --git a/docs/_modules/decitala/path_finding/pofp.html b/docs/_modules/decitala/path_finding/pofp.html index e9ab5a60..10e89c78 100644 --- a/docs/_modules/decitala/path_finding/pofp.html +++ b/docs/_modules/decitala/path_finding/pofp.html @@ -7,7 +7,7 @@ - decitala.path_finding.pofp — decitala 0.14.1 documentation + decitala.path_finding.pofp — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -251,11 +251,11 @@

Source code for decitala.path_finding.pofp

 	>>> from decitala.search import Extraction
 	>>> from decitala.fragment import GreekFoot, GeneralFragment
 	>>> data = [
-	... 	Extraction(fragment=GreekFoot("Spondee"), frag_type="greek_foot", onset_range=(0.0, 0.5), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=1), # noqa
-	... 	Extraction(fragment=GeneralFragment([0.25, 0.25], name="cs-test1"), frag_type="general_fragment", onset_range=(0.0, 0.5), retrograde=False, factor=2.0, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=2), # noqa
-	... 	Extraction(fragment=GreekFoot("Trochee"), frag_type="greek_foot", onset_range=(0.25, 0.625), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=3), # noqa
-	... 	Extraction(fragment=GeneralFragment([0.25, 0.125], name="cs-test2"), frag_type="general_fragment", onset_range=(0.25, 0.625), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=4), # noqa
-	... 	Extraction(fragment=GreekFoot("Dactyl"), frag_type="greek_foot", onset_range=(0.5, 1.0), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=5) # noqa
+	... 	Extraction(fragment=GreekFoot("Spondee"), onset_range=(0.0, 0.5), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=1), # noqa
+	... 	Extraction(fragment=GeneralFragment([0.25, 0.25], name="cs-test1"), onset_range=(0.0, 0.5), retrograde=False, factor=2.0, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=2), # noqa
+	... 	Extraction(fragment=GreekFoot("Trochee"), onset_range=(0.25, 0.625), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=3), # noqa
+	... 	Extraction(fragment=GeneralFragment([0.25, 0.125], name="cs-test2"), onset_range=(0.25, 0.625), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=4), # noqa
+	... 	Extraction(fragment=GreekFoot("Dactyl"), onset_range=(0.5, 1.0), retrograde=False, factor=0.125, difference=0.0, mod_hierarchy_val=1, pitch_content=[None], is_spanned_by_slur=False, slur_count=0, slur_start_end_count=0, id_=5) # noqa
 	... ]
 	>>> for path in get_pareto_optimal_longest_paths(data):
 	... 	for fragment in path:
diff --git a/docs/_modules/decitala/search.html b/docs/_modules/decitala/search.html
index f91b4e33..4746581d 100644
--- a/docs/_modules/decitala/search.html
+++ b/docs/_modules/decitala/search.html
@@ -7,7 +7,7 @@
   
   
   
-  decitala.search — decitala 0.14.1 documentation
+  decitala.search — decitala 1.0.0 documentation
   
 
   
@@ -61,7 +61,7 @@
             
             
               
- 0.14.1 + 1.0.0
@@ -223,7 +223,6 @@

Source code for decitala.search

 
[docs]@dataclass class Extraction: fragment: GeneralFragment - frag_type: str onset_range: tuple retrograde: bool @@ -252,21 +251,22 @@

Source code for decitala.search

 		if not(self.fragment in split_dict):
 			return [self]
 		else:
-			split = []
-			# This is hilariously stupid, but it should be ok as a temporary solution.
+			# This is dumb, but it should be ok as a temporary solution.
 			filtered_all_res = []
 			for extraction in all_res:
 				if (extraction.onset_range[0] >= self.onset_range[0]) and \
 					(extraction.onset_range[1] <= self.onset_range[1]):
 					filtered_all_res.append(extraction)
 
-			res_copy = copy.deepcopy(filtered_all_res)
-			for i, split_elem in enumerate(split_dict[self.fragment]):
-				for j, extraction in enumerate(res_copy):
+			split = []
+			filtered_copy = copy.deepcopy(filtered_all_res)
+			i = 0
+			while i < len(split_dict[self.fragment]):
+				split_elem = split_dict[self.fragment][i]
+				for j, extraction in enumerate(filtered_copy):
 					if extraction.fragment == split_elem:
 						extraction_obj = Extraction(
 							fragment=extraction.fragment,
-							frag_type=extraction.frag_type,
 							onset_range=extraction.onset_range,
 							retrograde=extraction.retrograde,
 							factor=extraction.factor,
@@ -279,16 +279,12 @@ 

Source code for decitala.search

 							id_=1000 + i  # Random scale to differentiate between standard.
 						)
 						split.append(extraction_obj)
-						res_copy = res_copy[:j]
+						filtered_copy.pop(j)
+						break  # Don't keep looking.
+				i += 1
 
 			return split
-
[docs]@dataclass -class Frame: - """ - A frame of the objects in the score. - """
-
[docs]def frame_to_ql_array(frame): """ :param list frame: Frame of data from :obj:`~decitala.utils.get_object_indices`. @@ -435,7 +431,6 @@

Source code for decitala.search

 			offset_2 = frame[-1][0]
 			return Extraction(
 				fragment=searched["fragment"],
-				frag_type=searched["fragment"].frag_type,
 				onset_range=(offset_1.offset, offset_2.offset + offset_2.quarterLength),
 				retrograde=searched["retrograde"],
 				factor=searched["factor"],
@@ -566,7 +561,8 @@ 

Source code for decitala.search

 		allow_subdivision=False,
 		allow_contiguous_summation=False,
 		algorithm="dijkstra",
-		cost_function_class=path_finding_utils.DefaultCostFunction(),
+		cost_function_class=path_finding_utils.CostFunction3D(),
+		split_dict=None,
 		slur_constraint=False,
 		enforce_earliest_start=False,
 		save_filepath=None,
@@ -592,7 +588,7 @@ 

Source code for decitala.search

 							can then be loaded with the :meth:`decitala.utils.loader`.
 	:param bool verbose: Whether to log messages. Default is ``False``.
 	"""
-	fragments = rolling_hash_search(
+	extractions = rolling_hash_search(
 		filepath=filepath,
 		part_num=part_num,
 		table=table,
@@ -600,14 +596,14 @@ 

Source code for decitala.search

 		allow_subdivision=allow_subdivision,
 		allow_contiguous_summation=allow_contiguous_summation
 	)
-	if not fragments:
+	if not extractions:
 		return None
 
 	if algorithm.lower() == "dijkstra":
 		if slur_constraint:
 			raise SearchException("This is not yet supported. Coming soon.")
 		source, target, best_pred = dijkstra.dijkstra_best_source_and_sink(
-			data=fragments,
+			data=extractions,
 			cost_function_class=cost_function_class,
 			enforce_earliest_start=enforce_earliest_start,
 			verbose=verbose
@@ -617,14 +613,14 @@ 

Source code for decitala.search

 			source,
 			target
 		)
-		best_path = sorted([x for x in fragments if x.id_ in best_path], key=lambda x: x.onset_range[0]) # noqa
+		best_path = sorted([x for x in extractions if x.id_ in best_path], key=lambda x: x.onset_range[0]) # noqa
 	elif algorithm.lower() == "floyd-warshall":
 		best_source, best_sink = path_finding_utils.best_source_and_sink(
-			data=fragments,
+			data=extractions,
 			enforce_earliest_start=enforce_earliest_start
 		)
 		distance_matrix, next_matrix = floyd_warshall.floyd_warshall(
-			data=fragments,
+			data=extractions,
 			cost_function_class=cost_function_class,
 			verbose=verbose
 		)
@@ -632,12 +628,19 @@ 

Source code for decitala.search

 			start=best_source,
 			end=best_sink,
 			next_matrix=next_matrix,
-			data=fragments,
+			data=extractions,
 			slur_constraint=slur_constraint
 		)
 	else:
 		raise SearchException("The only available options are 'dijkstra' and 'floyd-warshall'.")
 
+	if split_dict:
+		best_path = path_finding_utils.split_extractions(
+			data=best_path,
+			split_dict=split_dict,
+			all_res=extractions
+		)
+
 	if save_filepath:
 		with open(save_filepath, "w") as output:
 			json.dump(obj=best_path, fp=output, cls=FragmentEncoder, indent=4)
diff --git a/docs/_modules/decitala/sp/sp_utils.html b/docs/_modules/decitala/sp/sp_utils.html
index 70babcfa..1b9dad60 100644
--- a/docs/_modules/decitala/sp/sp_utils.html
+++ b/docs/_modules/decitala/sp/sp_utils.html
@@ -7,7 +7,7 @@
   
   
   
-  decitala.sp.sp_utils — decitala 0.14.1 documentation
+  decitala.sp.sp_utils — decitala 1.0.0 documentation
   
 
   
@@ -61,7 +61,7 @@
             
             
               
- 0.14.1 + 1.0.0
diff --git a/docs/_modules/decitala/trees.html b/docs/_modules/decitala/trees.html index c0efe30d..4ad9baad 100644 --- a/docs/_modules/decitala/trees.html +++ b/docs/_modules/decitala/trees.html @@ -7,7 +7,7 @@ - decitala.trees — decitala 0.14.1 documentation + decitala.trees — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -206,30 +206,20 @@

Source code for decitala.trees

 
[docs]class FragmentTreeException(TreeException): pass
-#################################################################################################### -# KD-Tree (TODO) -class KDTree: - class Node: - def __init__(self): - pass - - def __init__(self): - pass -
[docs]class FragmentTree(Tree): """ NaryTree that holds multiplicative or additive representations of a rhythmic dataset. - :param str data: either a frag_type/rep_type combo, a path to folder of music21-readable files, - or a list of fragments. - :param str rep_type: determines the representation of the fragment. Options are ``ratio`` (default) - and ``difference``. + :param data: either a path to folder of music21-readable files or a list of + :obj:`decitala.fragment.GeneralFragment` objects (or its subclasses). + :param str rep_type: determines the representation of the fragment. Options are ``"ratio"``, + ``"difference"``, and ``"dseg"``. :param str name: optional name of the Fragment Tree. :raises `~decitala.trees.FragmentTreeException`: if an invalid path or rep_type is given. - >>> ratio_tree = FragmentTree.from_frag_type(frag_type='greek_foot', rep_type='ratio') + >>> ratio_tree = FragmentTree.from_frag_type(frag_type="greek_foot", rep_type="ratio") >>> ratio_tree - <trees.FragmentTree greek_foot_ratio: nodes=35> + <trees.FragmentTree greek_foot_ratio: nodes=43> >>> ratio_tree.search_for_path([1.0, 2.0, 0.5, 1.0]).name <fragment.GreekFoot Peon_II> >>> # We can also give it a name. @@ -248,18 +238,15 @@

Source code for decitala.trees

 	<fragment.GeneralFragment myfragment: [1. 1. 1. 1. 1.]>
 	"""
 	def __init__(self, data, rep_type, name=None, **kwargs):
-		assert rep_type.lower() in ["ratio", "difference"], FragmentTreeException("The only possible rep_types are `ratio` and `difference`") # noqa
+		assert rep_type.lower() in ["ratio", "difference", "dseg"]
 
 		self.rep_type = rep_type.lower()
 		self.name = name
 
 		if isinstance(data, str):
 			assert os.path.isdir(data), FragmentTreeException("Invalid path provided.")
-			new_data = []
-			for this_file in os.listdir(self.data):
-				new_data.append(GeneralFragment(data=this_file))
-
-			self.data = data
+			parsed_data = [GeneralFragment(data=this_file) for this_file in os.listdir(data)]
+			self.data = parsed_data
 
 		if isinstance(data, list):
 			assert all(type(x).__name__ in ["GeneralFragment", "Decitala", "GreekFoot"] for x in data), FragmentTreeException("The elements of data must be GeneralFragment, \
@@ -277,13 +264,19 @@ 

Source code for decitala.trees

 				path = list(this_fragment.successive_ratio_array())
 				root_node.add_path_of_children(path=path, final_node_name=this_fragment)
 			self.root = root_node
-
-		if self.rep_type == "difference":
+		elif self.rep_type == "difference":
 			root_node = Node(value=0.0, name="ROOT")
 			for this_fragment in self.sorted_data:
 				path = list(this_fragment.successive_difference_array())
 				root_node.add_path_of_children(path=path, final_node_name=this_fragment)
 			self.root = root_node
+		elif self.rep_type == "dseg":
+			root_node = Node(value=0.0, name="ROOT")
+			for this_fragment in self.sorted_data:
+				path_pre = list(this_fragment.dseg())
+				path = [0] + path_pre
+				root_node.add_path_of_children(path=path, final_node_name=this_fragment)
+			self.root = root_node
 
 	def __repr__(self):
 		if self.name:
@@ -309,11 +302,6 @@ 

Source code for decitala.trees

 							:obj:`~decitala.fragment.GeneralFragment`
 							(default) objects.
 		"""
-		assert frag_type.lower() in ["decitala", "greek_foot"], FragmentTreeException("The only \
-																					possible frag_types are `decitala` and `greek_foot`.")
-		assert rep_type.lower() in ["ratio", "difference"], FragmentTreeException("The only possible \
-																				rep_types are `ratio` and `difference`")
-
 		if frag_type == "decitala":
 			data = get_all_decitalas()
 		elif frag_type == "greek_foot":
@@ -329,7 +317,7 @@ 

Source code for decitala.trees

 	def from_composition(
 			cls,
 			filepath,
-			part=0,
+			part_num=0,
 			rep_type="ratio",
 			windows=list(range(2, 10))
 		):
@@ -337,14 +325,14 @@ 

Source code for decitala.trees

 		Class method for generating a FragmentTree from a composition.
 
 		:param str filepath: path to file.
-		:param int part: part number.
+		:param int part_num: part number.
 		:return: a FragmentTree made from a rolling window of a part in a composition.
 		:rtype: :obj:`~decitala.trees.FragmentTree`
 		"""
 		assert os.path.isfile(filepath)
-		assert type(part) == int
+		assert type(part_num) == int
 
-		object_list = get_object_indices(filepath=filepath, part_num=part)
+		object_list = get_object_indices(filepath=filepath, part_num=part_num)
 		data = []
 		for this_window in windows:
 			frames = roll_window(array=object_list, window_size=this_window)
diff --git a/docs/_modules/decitala/utils.html b/docs/_modules/decitala/utils.html
index 3dc9dc5a..f87ac9a4 100644
--- a/docs/_modules/decitala/utils.html
+++ b/docs/_modules/decitala/utils.html
@@ -7,7 +7,7 @@
   
   
   
-  decitala.utils — decitala 0.14.1 documentation
+  decitala.utils — decitala 1.0.0 documentation
   
 
   
@@ -61,7 +61,7 @@
             
             
               
- 0.14.1 + 1.0.0
@@ -190,6 +190,7 @@

Source code for decitala.utils

 from itertools import groupby
 from more_itertools import consecutive_groups, windowed, powerset
 from scipy.linalg import norm
+from collections import Counter, OrderedDict
 
 from music21 import converter
 from music21 import note
@@ -333,6 +334,92 @@ 

Source code for decitala.utils

 
 	return " ".join(greek_string_lst)
+#################################################################################################### +# WINDOWING / PARTITIONING / GROUPING +#################################################################################################### +
[docs]def roll_window(array, window_size, fn=None): + """ + Takes in a list and returns a numpy vstack holding rolling windows of length ``window_size``. + + :param array: a list, tuple, numpy array, etc. + :param int window_size: size of the window + :param lambda fn: a function evaluating a bool; will only iterate over elements satifying the + function. + :return: A rolling windows of array, each of length `window_size`. + :rtype: numpy.vstack + + >>> composers = np.array(['Mozart', 'Monteverdi', 'Messiaen', 'Mahler', 'MacDowell', 'Massenet']) + >>> for window in roll_window(array=composers, window_size=3): + ... print(window) + ('Mozart', 'Monteverdi', 'Messiaen') + ('Monteverdi', 'Messiaen', 'Mahler') + ('Messiaen', 'Mahler', 'MacDowell') + ('Mahler', 'MacDowell', 'Massenet') + >>> # This function also allows the use of a function input for filtering. + >>> # Say we wanted to iterate over the elements of the following collection that have + >>> # 1s in the set. + >>> cseg_data = [[0, {1, -1}], [4, {1}], [2, {-1}], [5, {1}], [5, {1}], [1, {1, -1}]] + >>> fn = lambda x: 1 in x[1] + >>> for this_frame in roll_window(cseg_data, 3, fn): + ... print(this_frame) + ([0, {1, -1}], [4, {1}], [5, {1}]) + ([4, {1}], [5, {1}], [5, {1}]) + ([5, {1}], [5, {1}], [1, {1, -1}]) + """ + if fn is not None: + array = [x for x in array if fn(x) is True] + return list(windowed(seq=array, n=window_size, step=1))
+ +
[docs]def power_list(data): + """ + :param data: an iterable + :return: power set of the data as a list (excluding the empty list). + :rtype: list + + >>> l = [1, 2, 3] + >>> power_list(l) + [(1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] + + >>> for x in power_list([(0.0, 2.0), (4.0, 5.5), (6.0, 7.25)]): + ... print(x) + ((0.0, 2.0),) + ((4.0, 5.5),) + ((6.0, 7.25),) + ((0.0, 2.0), (4.0, 5.5)) + ((0.0, 2.0), (6.0, 7.25)) + ((4.0, 5.5), (6.0, 7.25)) + ((0.0, 2.0), (4.0, 5.5), (6.0, 7.25)) + """ + assert type(data) == list + power_list = powerset(data) + return [x for x in power_list if len(x) != 0]
+ +
[docs]def get_shells(data): + """ + :param data: an iterable + :return: a list holding tuples. Each tuple holds the shells in outer-to-inner order. + If the data holds an odd number of elements, the central element is returned + as a singleton. + :rtype: list + + >>> l = [1, 2, 3, 4] + >>> get_shells(l) + [(1, 4), (2, 3)] + >>> l2 = [('bob', 1), ('sue', 2), ('andrew', 3), ('luke', 4), ('alex', 5)] + >>> get_shells(l2) + [(('bob', 1), ('alex', 5)), (('sue', 2), ('luke', 4)), (('andrew', 3),)] + """ + mid_elem = len(data) // 2 + i = 0 + shells = [] + while i < mid_elem: + shells.append((data[i], data[-1 * (i + 1)])) + i += 1 + + if not(len(data) % 2 == 0): + shells.append((data[mid_elem],)) + return shells
+ #################################################################################################### # RHYTHM #################################################################################################### @@ -756,67 +843,6 @@

Source code for decitala.utils

 
 	return np.array(result_out)
-#################################################################################################### -# WINDOWING / PARTITIONING -#################################################################################################### -
[docs]def roll_window(array, window_size, fn=None): - """ - Takes in a list and returns a numpy vstack holding rolling windows of length ``window_size``. - - :param array: a list, tuple, numpy array, etc. - :param int window_size: size of the window - :param lambda fn: a function evaluating a bool; will only iterate over elements satifying the - function. - :return: A rolling windows of array, each of length `window_size`. - :rtype: numpy.vstack - - >>> composers = np.array(['Mozart', 'Monteverdi', 'Messiaen', 'Mahler', 'MacDowell', 'Massenet']) - >>> for window in roll_window(array=composers, window_size=3): - ... print(window) - ('Mozart', 'Monteverdi', 'Messiaen') - ('Monteverdi', 'Messiaen', 'Mahler') - ('Messiaen', 'Mahler', 'MacDowell') - ('Mahler', 'MacDowell', 'Massenet') - >>> # This function also allows the use of a function input for filtering. - >>> # Say we wanted to iterate over the elements of the following collection that have - >>> # 1s in the set. - >>> cseg_data = [[0, {1, -1}], [4, {1}], [2, {-1}], [5, {1}], [5, {1}], [1, {1, -1}]] - >>> fn = lambda x: 1 in x[1] - >>> for this_frame in roll_window(cseg_data, 3, fn): - ... print(this_frame) - ([0, {1, -1}], [4, {1}], [5, {1}]) - ([4, {1}], [5, {1}], [5, {1}]) - ([5, {1}], [5, {1}], [1, {1, -1}]) - """ - if fn is not None: - array = [x for x in array if fn(x) is True] - windows = list(windowed(seq=array, n=window_size, step=1)) - return windows
- -
[docs]def power_list(data): - """ - :param data: an iterable - :return: power set of the data as a list (excluding the empty list). - :rtype: list - - >>> l = [1, 2, 3] - >>> power_list(l) - [(1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] - - >>> for x in power_list([(0.0, 2.0), (4.0, 5.5), (6.0, 7.25)]): - ... print(x) - ((0.0, 2.0),) - ((4.0, 5.5),) - ((6.0, 7.25),) - ((0.0, 2.0), (4.0, 5.5)) - ((0.0, 2.0), (6.0, 7.25)) - ((4.0, 5.5), (6.0, 7.25)) - ((0.0, 2.0), (4.0, 5.5), (6.0, 7.25)) - """ - assert type(data) == list - power_list = powerset(data) - return [x for x in power_list if len(x) != 0]
- #################################################################################################### # SCORE HELPERS #################################################################################################### @@ -1201,6 +1227,41 @@

Source code for decitala.utils

 	"""
 	with open(filepath, "w") as output:
 		json.dump(obj=data, fp=output, cls=fragment.FragmentEncoder, ensure_ascii=False, indent=4)
+ +#################################################################################################### +# MISC. TOOLS +#################################################################################################### +
[docs]class NormalizedCounter(Counter): + """ + Class that inherits from collections.Counter. Takes in an array-like object, but the values + of the 'counter' become proportions, unless count is set to True (in which case it acts like a + regular counter). + + >>> l = [1, 1, 2, 2, 3, 3, 4, 4] + >>> NormalizedCounter(l, count=True) + NormalizedCounter({1: 2, 2: 2, 3: 2, 4: 2}) + >>> NormalizedCounter(l, count=False) + NormalizedCounter({1: 0.25, 2: 0.25, 3: 0.25, 4: 0.25}) + """ + def __init__(self, iterable, count=False): + Counter.__init__(self, iterable) + if not(count): + all_counts = sum(self.values()) + for this_key in self.keys(): + self[this_key] = self[this_key] / all_counts
+ +
[docs]def dict_to_ordered_dict(dict_in, key, reverse=True): + """ + Takes in a dict and returns an OrderedDict object sorted by a given key (in the form of a + lambda expression). + + :param dict dict_in: a dictionary to be turned into an ordered dictionary. + :param key: lambda expression. + :param bool reverse: whether to sort the dict in reverse. + :return: the dictionary input, ordered by the given key. + :rtype: collections.OrderedDict + """ + return OrderedDict(sorted(dict_in.items(), key=key, reverse=reverse))
diff --git a/docs/_modules/decitala/vis.html b/docs/_modules/decitala/vis.html index e91a5340..478123e2 100644 --- a/docs/_modules/decitala/vis.html +++ b/docs/_modules/decitala/vis.html @@ -7,7 +7,7 @@ - decitala.vis — decitala 0.14.1 documentation + decitala.vis — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -185,6 +185,7 @@

Source code for decitala.vis

 import matplotlib as mpl
 import os
 import treeplotter
+import natsort
 
 from collections import Counter
 
@@ -218,7 +219,7 @@ 

Source code for decitala.vis

 	:return: A folder at the provided path containing an index.html file which has a visualization
 			of the provided :obj:`~decitala.trees.FragmentTree`.
 	"""
-	stupid_tree = treeplotter.Tree()
+	stupid_tree = treeplotter.tree.Tree()
 	if FragmentTree.rep_type == "ratio":
 		root = treeplotter.tree.Node(value=1.0, name=None)
 		for this_fragment in FragmentTree.sorted_data:
@@ -240,18 +241,20 @@ 

Source code for decitala.vis

 
 
[docs]def fragment_roll( data, + flip=False, title=None, - save_filepath=None, + save_path=None, ): """ - Creates a piano-roll type visualization of fragments in the input data. + Creates a piano-roll type visualization of the fragments given in ``data``. - :param list data: a list of :obj:`decitala.search.Extraction` objects. - :param str title: Title for the plot. Default is `None`. - :param str save_filepath: Optional path to save the plot (DPI=350). Default is `None`. + :param list data: a list of :obj:`decitala.search.Extraction` objects. Probably from + :obj:`decitala.search.path_finder`. + :param bool flip: whether to flip the x-axis of the plot. Default is ``False``. + :param str title: title for the plot. Default is ``None``. + :param str save_path: optional path to save the plot (DPI=350). Default is `None`. """ plt.figure(figsize=(11, 3)) - plt.title(title, fontsize=14, fontname="Times") highest_onset = 0 for fragment in data: if highest_onset > fragment.onset_range[1]: @@ -259,25 +262,32 @@

Source code for decitala.vis

 		else:
 			highest_onset = fragment.onset_range[1]
 
-	plt.xticks(list(range(0, int(highest_onset), 10)))
-	plt.xlim(-0.02, highest_onset + 2.0)
-	plt.xlabel("Onset", fontsize=12, fontname="Times")
-	plt.ylabel("Fragment", fontsize=12, fontname="Times")
-
-	for i, fragment in enumerate(sorted(data, key=lambda x: x.fragment.name)):
+	for i, fragment in enumerate(natsort.natsorted(data, key=lambda x: x.fragment.name, reverse=True)): # noqa
 		plt.barh(
 			y=fragment.fragment.name,
 			width=fragment.onset_range[1] - fragment.onset_range[0],
 			height=0.8,
 			left=fragment.onset_range[0],
-			color='k'
+			color="k",
 		)
 
-	# if plot_break_points:
-	# 	pass # TODO
+	if flip:
+		plt.xlim(highest_onset + 2.0, -2.0)
+	else:
+		plt.xlim(-2.0, highest_onset + 2.0)
+
+	plt.xticks(list(range(0, int(highest_onset), 10)), fontname="Times")
+	plt.xlabel("Onset", fontsize=12, fontname="Times")
+	plt.ylabel("Fragment", fontsize=12, fontname="Times")
+	plt.yticks(fontname="Times")
 
-	if save_filepath:
-		plt.savefig(save_filepath, dpi=350)
+	if title:
+		plt.title(title, fontsize=14, fontname="Times")
+
+	plt.tight_layout()
+
+	if save_path:
+		plt.savefig(save_path, dpi=350)
 
 	return plt
@@ -344,7 +354,13 @@

Source code for decitala.vis

 	plt.bar(counter.keys(), counter.values(), width=0.3, color="k")
 	return plt
-
[docs]def plot_2D_search_results(data=None, path=None, title=None, save_filepath=None): +
[docs]def plot_2D_search_results( + data=None, + path=None, + title=None, + legend=True, + save_path=None + ): """ Function for plotting the results of (usually) the full extracted data from a composition, as well as a path extracted from it. The ``data`` parameter will plot the fragments as a @@ -354,7 +370,8 @@

Source code for decitala.vis

 	:param list data: a list of :obj:`decitala.search.Extraction` objects.
 	:param list path: Intended for data from :obj:`decitala.search.path_finder`. Default is `None.
 	:param str title: Title for the plot. Default is `None`.
-	:param str save_filepath: Optional path to save the plot (DPI=350). Default is `None`.
+	:param bool legend: Whether to include a legend in the final plot. Default is ``True``.
+	:param str save_path: Optional path to save the plot (DPI=350). Default is `None`.
 	"""
 	if data:
 		xs = [x.onset_range[0] for x in data]
@@ -375,15 +392,18 @@ 

Source code for decitala.vis

 	plt.xlabel("Onset Start", fontname="Times", fontsize=12)
 	plt.ylabel("Onset Stop", fontname="Times", fontsize=12)
 
-	plt.legend(prop="Times")
+	if legend:
+		plt.legend(prop="Times")
+
+	plt.tight_layout()
 
-	if save_filepath:
-		plt.savefig(save_filepath, dpi=350)
+	if save_path:
+		plt.savefig(save_path, dpi=350)
 
 	return plt
def plot_pitch_class_distribution_by_species(species, save_path=None): - combined_pc_dict = species.aggregate_pc_distribution(as_vector=False) + combined_pc_dict = species.aggregated_pc_distribution(as_vector=False) keys = list(combined_pc_dict.keys()) values = list(combined_pc_dict.values()) diff --git a/docs/_modules/index.html b/docs/_modules/index.html index fb2b1010..1baa4160 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -7,7 +7,7 @@ - Overview: module code — decitala 0.14.1 documentation + Overview: module code — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 81dfc5af..2f08d25f 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.14.1', + VERSION: '1.0.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/basic_usage.html b/docs/basic_usage.html index 5ed1a794..4d87782a 100644 --- a/docs/basic_usage.html +++ b/docs/basic_usage.html @@ -7,7 +7,7 @@ - Basic Usage — decitala 0.14.1 documentation + Basic Usage — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
- 0.14.1 + 1.0.0
diff --git a/docs/datasets/decitalas.html b/docs/datasets/decitalas.html index 4a2d9934..2d7a7b82 100644 --- a/docs/datasets/decitalas.html +++ b/docs/datasets/decitalas.html @@ -7,7 +7,7 @@ - Desītālas — decitala 0.14.1 documentation + Desītālas — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
- 0.14.1 + 1.0.0
diff --git a/docs/datasets/greek_metrics.html b/docs/datasets/greek_metrics.html index c704df10..cc32adfc 100644 --- a/docs/datasets/greek_metrics.html +++ b/docs/datasets/greek_metrics.html @@ -7,7 +7,7 @@ - Greek Metrics — decitala 0.14.1 documentation + Greek Metrics — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
- 0.14.1 + 1.0.0
diff --git a/docs/genindex.html b/docs/genindex.html index d6304ad8..8e17fac7 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -7,7 +7,7 @@ - Index — decitala 0.14.1 documentation + Index — decitala 1.0.0 documentation @@ -61,7 +61,7 @@
- 0.14.1 + 1.0.0
@@ -201,7 +201,7 @@

Index

A

    -
  • aggregate_pc_distribution() (decitala.database.db.Species method) +
  • aggregated_pc_distribution() (decitala.database.db.Species method)
  • AllCorporaHashTable (class in decitala.hash_table)
  • @@ -223,12 +223,14 @@

    A

    B

      @@ -695,6 +711,8 @@

      P

    • plot_spectrogram() (in module decitala.sp.sp_utils)
    • power_list() (in module decitala.utils) +
    • +
    • prime_contour() (in module decitala.hm.contour)
    • ProsodicException
    • @@ -753,6 +771,8 @@

      S

        +
      • std() (decitala.fragment.GeneralFragment method) +
      • stretch_augment() (in module decitala.utils)
      • strip_monotonic_pitch_content() (in module decitala.hm.contour) diff --git a/docs/index.html b/docs/index.html index e3859fdc..e92c0317 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,7 @@ - Decitala Documentation — decitala 0.14.1 documentation + Decitala Documentation — decitala 1.0.0 documentation @@ -62,7 +62,7 @@
        - 0.14.1 + 1.0.0
        diff --git a/docs/mods/database.html b/docs/mods/database.html index e5857860..86f92f01 100644 --- a/docs/mods/database.html +++ b/docs/mods/database.html @@ -7,7 +7,7 @@ - database — decitala 0.14.1 documentation + database — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
        - 0.14.1 + 1.0.0
        @@ -209,60 +209,80 @@

        database
        -class decitala.database.db.ExtractionData(onset_start, onset_stop, fragment_type, name, mod_hierarchy_val, ratio, difference, pitch_content, is_slurred)[source]
        +class decitala.database.db.ExtractionData(fragment, onset_start, onset_stop, retrograde, factor, difference, mod_hierarchy_val, pitch_content, is_spanned_by_slur, slur_count, slur_start_end_count, id_, contiguous_summation)[source]

        Bases: sqlalchemy.orm.decl_api.Base

        -

        SQLAlchemy model representing a fragment extracted from a composition.

        +

        SQLAlchemy model representing a fragment extracted from a composition. Intended to be used with +the class method ExtractionData.from_extraction. See decitala.search.Extraction +for the relevant information on each column in the database.

        +
        +
        +classmethod from_extraction(extraction)[source]
        +

        Creates an decitala.database.db.ExtractionData object from a +decitala.search.Extraction object. This is more durable to accidentally breaking +things when adding data to extractions.

        +
        + +
        + +
        +
        +decitala.database.db.create_extraction_database(db_path, filepath, table, part_nums=[0], windows=[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], verbose=False)[source]
        +

        Function for creating a database from a single filepath. Stores all extracted fragments.

        Parameters
          -
        • onset_start (float) – Starting onset of the extracted fragment.

        • -
        • onset_stop (float) – Ending onset of the extracted fragment -(onset of final object + quarter length)

        • -
        • fragment_type (str) – Fragment type; options currently include -decitala, greek_foot, and general_fragment.

        • -
        • name (str) – Name of the fragment.

        • -
        • mod_type (str) – Modification type of the fragment.

        • -
        • ratio (float) – Ratio of the fragment’s values to the values in the database.

        • -
        • difference (float) – Difference between the fragment’s values to the values -in the database.

        • -
        • pitch_content (str) – Pitch content of the extracted fragment.

        • -
        • is_slurred (bool) – Whether the extracted fragment is spanned by a slur object.

        • +
        • db_path (str) – Path to the database to be created.

        • +
        • filepath (str) – Path to the score to be analyzed.

        • +
        • table (list) – A decitala.hash_table.FragmentHashTable object.

        • +
        • part_nums (list) – Parts to be analyzed.

        • +
        • windows (list) – Possible lengths of the search frames.

        • +
        • verbose (bool) – Whether to log the SQL calls. False by default.

        -
        -decitala.database.db.create_database(db_path, filepath, table, part_nums=[0], windows=[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], echo=False)[source]
        -

        Function for creating a database from a single filepath.

        +
        +decitala.database.db.batch_create_extraction_database(db_path, data_in, table, windows, verbose=False)[source]
        +

        This function creates a database from a dictionary of filepaths and desires part_nums +to analyze.

        Parameters
        • db_path (str) – Path to the database to be created.

        • -
        • filepath (str) – Path to the score to be analyzed.

        • +
        • data_in (dict) – Dictionary of filepaths (key) and part nums in a list (value).

        • table (list) – A decitala.hash_table.FragmentHashTable object.

        • -
        • part_nums (list) – Parts to be analyzed.

        • windows (list) – Possible lengths of the search frames.

        • -
        • echo (bool) – Whether to echo the SQL calls. False by default.

        • +
        • verbose (bool) – Whether to log the SQL calls. False by default.

        -
        -decitala.database.db.batch_create_database(db_path, data_in, table, windows, echo=False)[source]
        +
        +decitala.database.db.create_path_database(db_path, filepath, part_nums, table, windows=[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], allow_subdivision=False, allow_contiguous_summation=False, algorithm='dijkstra', cost_function_class=<decitala.path_finding.path_finding_utils.CostFunction3D object>, split_dict=None, slur_constraint=False, enforce_earliest_start=False, verbose=False)[source]
        +

        Function for creating a database from a single filepath. Stores the extracted path. +See decitala.search.path_finder to find the definitions of the relevant parameters.

        +
        +
        Parameters
        +

        db_path (str) – Path to the database to be created.

        +
        +
        +
        + +
        +
        +decitala.database.db.batch_create_path_database(db_path, data_in, table, windows=[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], allow_subdivision=False, allow_contiguous_summation=False, algorithm='dijkstra', cost_function_class=<decitala.path_finding.path_finding_utils.CostFunction3D object>, split_dict=None, slur_constraint=False, enforce_earliest_start=False, verbose=False)[source]

        This function creates a database from a dictionary of filepaths and desires part_nums -to analyze.

        +to analyze. See decitala.search.path_finder to find the definitions of the relevant +parameters.

        Parameters
        • db_path (str) – Path to the database to be created.

        • data_in (dict) – Dictionary of filepaths (key) and part nums in a list (value).

        • -
        • table (list) – A decitala.hash_table.FragmentHashTable object.

        • -
        • windows (list) – Possible lengths of the search frames.

        • -
        • echo (bool) – Whether to echo the SQL calls. False by default.

        @@ -275,8 +295,8 @@

        database -
        -aggregate_pc_distribution(normalize=False, as_vector=True)[source]
        +
        +aggregated_pc_distribution(normalized=False, as_vector=True)[source]

        Returns the aggregate pitch class distribution across all transcriptions in a species.

        diff --git a/docs/mods/fragment.html b/docs/mods/fragment.html index 749588e3..b7732a5c 100644 --- a/docs/mods/fragment.html +++ b/docs/mods/fragment.html @@ -7,7 +7,7 @@ - fragment — decitala 0.14.1 documentation + fragment — decitala 1.0.0 documentation @@ -64,7 +64,7 @@
        - 0.14.1 + 1.0.0
        diff --git a/docs/mods/hash_table.html b/docs/mods/hash_table.html index f8c93c44..af8496b0 100644 --- a/docs/mods/hash_table.html +++ b/docs/mods/hash_table.html @@ -7,7 +7,7 @@ - hash_table — decitala 0.14.1 documentation + hash_table — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
        - 0.14.1 + 1.0.0
        @@ -228,7 +228,7 @@ <decitala.hash_table.FragmentHashTable 0 fragments> >>> fht.load() >>> fht -<decitala.hash_table.FragmentHashTable 2899 fragments> +<decitala.hash_table.FragmentHashTable 2941 fragments> >>> fht.datasets ['greek_foot'] >>> fht.custom_fragments @@ -266,10 +266,10 @@ parameters.

        >>> ght = GreekFootHashTable()
         >>> ght
        -<decitala.hash_table.FragmentHashTable 2855 fragments>
        +<decitala.hash_table.FragmentHashTable 2897 fragments>
         >>> ght.load(try_retrograde=False, allow_stretch_augmentation=False)
         >>> ght
        -<decitala.hash_table.FragmentHashTable 737 fragments>
        +<decitala.hash_table.FragmentHashTable 779 fragments>
         
        diff --git a/docs/mods/hm.html b/docs/mods/hm.html index 128696e9..7d53078b 100644 --- a/docs/mods/hm.html +++ b/docs/mods/hm.html @@ -7,7 +7,7 @@ - hm — decitala 0.14.1 documentation + hm — decitala 1.0.0 documentation @@ -63,7 +63,7 @@
        - 0.14.1 + 1.0.0
        @@ -266,8 +266,8 @@

        contour -
        -decitala.hm.contour.pitch_content_to_contour(pitch_content, as_str=False)[source]
        +
        +decitala.hm.contour.pitch_contour(pitch_content, as_str=False)[source]

        This function returns the contour of given pitch content. It accepts either a list of MIDI tones, or the data returned in the decitala.search module. Like decitala.hm.contour.strip_monotonic_pitch_content, if non-monotonic pitch content is @@ -288,10 +288,10 @@

        contour
        >>> pitch_content_1 = [(80,), (91,), (78,), (85,)]
        ->>> pitch_content_to_contour(pitch_content_1)
        +>>> pitch_contour(pitch_content_1)
         array([1, 3, 0, 2])
         >>> pitch_content_2 = [80, 84, 84]
        ->>> pitch_content_to_contour(pitch_content_2, as_str=True)
        +>>> pitch_contour(pitch_content_2, as_str=True)
         '<0 1 1>'
         
        @@ -321,8 +321,36 @@

        contour -
        -decitala.hm.contour.contour_to_prime_contour(contour)[source]
        +
        +decitala.hm.contour.contour_class(contour, allow_symmetries=False)[source]
        +

        Returns the associated pitch contour class (a letter) from Morris (1993, 220-221) +of a contour.

        +
        +
        Parameters
        +
          +
        • contour – a pitch contour (iterable).

        • +
        • allow_symmetries (bool) – whether to allow permutations of the given contour to be found. +Default is False. Note that X and Y are weird cases +for this symmetry. May currently fail (don’t understand it).

        • +
        +
        +
        Return type
        +

        str

        +
        +
        +
        >>> contour_class((1, 0, 3, 2))
        +'X'
        +>>> contour_class((0, 1, 0), allow_symmetries=False)
        +'G'
        +>>> contour_class((0, 0, 1), allow_symmetries=True)
        +'G'
        +
        +
        +
        + +
        +
        +decitala.hm.contour.prime_contour(contour)[source]

        Implementation of Robert Morris’ Contour-Reduction algorithm (Morris, 1993). “The algorithm prunes pitches from a contour until it is reduced to a prime.” (Schultz)

        @@ -337,18 +365,18 @@

        contour
        >>> contour_a = [0, 1]
        ->>> contour_to_prime_contour(contour_a)
        +>>> prime_contour(contour_a)
         (array([0, 1]), 0)
         >>> contour_b = [0, 4, 3, 2, 5, 5, 1]
        ->>> contour_to_prime_contour(contour_b)[0]
        +>>> prime_contour(contour_b)[0]
         array([0, 2, 1])
         

        -
        -decitala.hm.contour.contour_to_schultz_prime_contour(contour)[source]
        +
        +decitala.hm.contour.schultz_prime_contour(contour)[source]

        Implementation of Schultz’s (2008) modification of Morris’ contour-reduction algorithm. Catered to further prune “unnecessary” repetitions of contour elements.

        @@ -364,7 +392,7 @@

        contour
        >>> alouette_5 = [2, 5, 3, 1, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        ->>> contour_to_schultz_prime_contour(alouette_5)
        +>>> schultz_prime_contour(alouette_5)
         (array([1, 2, 0]), 3)
         
        @@ -375,7 +403,13 @@

        contour

        General utilities for harmony and melody analysis. Includes implementation of Krumhansl-Schmuckler/Krumhansl-Kessler with the original weights.

        -
        +
        +
        +exception decitala.hm.hm_utils.HMUtilsException[source]
        +

        Bases: Exception

        +
        + +
        decitala.hm.hm_utils.get_all_coefficients(exclude_major_minor=False, molt_tonic_val=1)[source]

        Returns a giant dictionary holding the binary weights for all Modes of Limited Transposition, @@ -394,16 +428,16 @@

        hm_utils
        -decitala.hm.hm_utils.pc_counter(filepath, part_num, normalize_over_duration=False)[source]
        -

        Returns a dictionary holding the pitch classes in the keys and the count (or count normalized -over total duration) in the given filepath-part_num combination.

        +decitala.hm.hm_utils.pc_counter(filepath, part_num, return_counts=False)[source] +

        Returns a dictionary holding the pitch classes in the keys and the sum of the quarter lengths +of this pitch class in a given filepath-part combination.

        Parameters
        • filepath (str) – path to music21-readable file to be parsed.

        • part_num (int) – part number in the work to be analyzed.

        • -
        • normalize_over_duration (bool) – whether to normalize the counts by the net duration -of the part.

        • +
        • return_counts (bool) – whether to return the counts of the detected pitches, instead of the +net quarter lengths.

        Returns
        @@ -414,7 +448,32 @@

        hm_utils

        dict

        -

        TODO: allow option for instead returning the net QLs.

        +

        + +
        +
        +decitala.hm.hm_utils.normalize_pc_counter(dict_in)[source]
        +

        Normalize a dictionary by the sum of the total values. Meant to be used with the +net ql values from decitala.hm.hm_utils.

        +
        >>> d = {0: 0, 1: 0.375, 2: 0, 3: 0.25, 4: 0.375,
        +...     5: 0.375, 6: 0.375, 7: 0, 8: 0.75, 9: 0.25, 10: 0, 11: 0
        +... }
        +>>> for pc, norm_val in normalize_pc_counter(d).items():
        +...     print(pc, norm_val)
        +0 0.0
        +1 0.13636363636363635
        +2 0.0
        +3 0.09090909090909091
        +4 0.13636363636363635
        +5 0.13636363636363635
        +6 0.13636363636363635
        +7 0.0
        +8 0.2727272727272727
        +9 0.09090909090909091
        +10 0.0
        +11 0.0
        +
        +
        @@ -483,30 +542,35 @@

        hm_utils
        -decitala.hm.hm_utils.KS(pc_vector, coefficients, return_p_value=False)[source]
        +decitala.hm.hm_utils.KS(pc_vector, coefficients, method='spearman')[source]

        Krumhansl-Schumckler algorithm.

        Parameters
        • pc_vector – a vector of pitch class probabilities, ordered by pitch class.

        • coefficients – coefficents used in the correlation calculation.

        • +
        • method (str) – either ‘pearson’ or ‘spearman’ (the method used for calculating correlation). +Default is ‘pearson’.

        -

        TODO: remove the stupid return_p_value argument.

        -decitala.hm.hm_utils.KS_diatonic(pc_vector, coefficients, return_tonic=False)[source]
        -

        Krumhansl-Schumckler algorithm for diatonic collections. Circulates over all major and minor -scales.

        +decitala.hm.hm_utils.KS_diatonic(pc_vector, coefficients, method='pearson', return_tonic=False)[source] +

        Krumhansl-Schumckler algorithm for diatonic collections. Circulates over the weights. +Returns the best match (and its associated pvalue) using either Pearson or +Spearman correlation.

        Parameters
        • pc_vector – a vector of pitch class probabilities, ordered by pitch class.

        • coefficients – coefficents used in the correlation calculation.

        • -
        • return_tonic (bool) – whether to also return the most highly correlated tonic.

        • +
        • method (str) – either ‘spearman’ or ‘pearson’ (the method used for calculating correlation). +Default is ‘pearson’.

        • +
        • return_tonic (bool) – whether to also return the pitch object of the most highly correlated +tonic.

        @@ -514,13 +578,15 @@

        hm_utils
        -decitala.hm.hm_utils.test_all_coefficients(pc_vector, exclude_major_minor=False, molt_tonic_val=1)[source]
        +decitala.hm.hm_utils.test_all_coefficients(pc_vector, method='pearson', exclude_major_minor=False, molt_tonic_val=1)[source]

        Function for calculating the correlation between a given pc_vector and all possible coefficients (binary modes for MOLT and KS coefficients).

        Parameters
        diff --git a/docs/objects.inv b/docs/objects.inv index 8d12faa1b06b74ca0e6ec82b709e2776fd0e9ee0..60c8594a8590cab54301c34310fc4da663955dba 100644 GIT binary patch delta 2034 zcmVFfK5WLOXw(&2rl|5PP1?@P-;lq}r|Vz2!1NwGMw?PhrpE zt?L3y@!l(dr&}q_Qows9wTwBtRWwNhY1)G?Ff&@HaUyKW0DoACj<#3rP$5d z4|Lo`okMD-7k|=w$UsqX+cTEgy|u>(X_in@QV5epWY z+@d!$l}cIgE=88wRaU1 zkuPP8+QbWi3dTTd{tSN@!fiI7AY-s(L-r~to70QkEVtaInMT@w*1MxjO+={Yh&C%c ze(PuO`v&E&U{X2*T!>I1?7jitaMnd4`-^{(_+Vb>WvrHUsF1O40r)N z>o0fOn6b{|8JLl76a(6?VN)s0Z0oi{;oaYVK8~l8Bh{1=I3k6d*abK(SZ zcJyPt<&L)tpzbY4(XNAM3tPuGwN5)NT8>!462<=nqOdag*ZvFCqfx3 z6lJ>$R1m|4;@XDjTyWFI0t;7?(kCF-Yiy z{p*mMd>Pk|pxVkK1@wvJl4oWK^{SKAj;R-e=2U+HE^j18fw*QPLS~8eHMa0Fm0$&i zw+HR^c-ZqhG*HF1;|{ByAMUF9{kuU*$6zAp6OM~kMmTo!rw9+_&+!oa6l0@k3d9~` z5W= z>+^rgUE0p%T`|=y!BOb^K@G|%04I%d{C6nO#+Qc&ZYLP#LfZKq*Xregb2_O(K2f{X zdZOO)@!_hg*Ub+7Bi@aiMvrhpwAvkET>{nK|hh3=MJk9-eOLf!U>l-G>d{do^+ALfQh`IjaRebd|~U4A3lAW zFN|#m_Au6YRydKT`PpxNn=k5+8oyX`dY+DwoWZCgKjkBLox4RKr`hKYfZ7g?xb);H4gql(*y!-;%fyXyN^N(&l+u=35*O5&rv zTy@3jN_r*Qg#5K+h3&sGm|EGao-sV%T{SN%>AT86t7-;+deE zb+LTaEht8%x@AUCUamUFGAi4-o1na0HREDbvKcD@UaWfEe!?E^ceoPEhGx-gh*q%Q Q3e{d!aBoN0|2~$63xCnzzyJUM delta 1961 zcmV;a2Uhsc5QY$tJO(f>F*GhQkwH6un$2?CHV}aCdJ4|8S1V1@Q*KQZrbmJbjHkSQn)DBaxC!fSSp~6p8&71a=p@1TtXUQ9+j(bu^_GmP{F~ z3?+riK-ffY-{4g#Ao(r93;UvNxN(K}rG9qxYjU;7&Y+g>sDoUY?FyfJE)&#$+T`UJ z_F25uuEAWq4+h}jS}8Xd@YX1+GS03I%?psTaqr5M%{-R(hDyr}*N!V049(Igd&$z} zJ5^|9d1Nn^tKIec?+mI}@*rq`OoP4u?hIwIUAohF7i^^XlIFRA9A}?sMlx=l;c3~t zVF7NVvWeuqsSoX5N*&t}X2ADr%3SF^?mycMdnS#^%X!YiwJ*HSh?7@z@89 zOE!TiN_d%rBk7j#Y&f%%I6Nb=EFvLDAO%G~uyLT%4*48X6HMbtA3%bk;<{%nlV|II zv7|Dmq@oa}O6kCajn{x%b_N{{W5iqB$J0BHI65LF@Z-P)`=yo<*RvJ2<6a)fYspm3A>#~_ZC1YSMf5be2uh(EeGMIB9 zdkU)IjAA#%Mc6XaNXM^#dN-7rkv#7?qD?&$--*M@Xi9fB)NY7tgX3O$*F8I);Pu-4 zA;i174*C;s-Z#v>o*W{Nv6>7gp41G=1xQPw=!o|{m)DwMeAimSX=8dW?$Ds(JD69& z0BaB`gs+nMnzJqwIV?s_QwuD&rBkIDvDo5-rM7Zd7gvAJ3|4V}QhD>2I7K9s#b{ME zfuRjAfb`xhf@RsJ6z)enQz}zX!GBuT%>9B@C7=?X*=^-;>xqO&SOPhoE$FbD4 zP}__=QDZmg?z4>VK5|6EeEqG$_WZ-JG=Qrp4t9xw)H<9&YO-1M^nV;%a|4Eah{fE{ zy6dK=hv77?%X@4Lymlmh&8Xq^>XQ9`y}HaBtYA$sdA;N`jHtNGyIdlijj1WQ$VhIe zzJQ-CalK=I4}>yS8p^g8P>|KrL97G8T zHub9=UB9gv`5qRiVVmKE)%TB2)$Vz>r9X(&eZpyf(PicS!w`IqaBXM-ll9(Je@=e@ zI>%Uh&BSloXeuRSej=>MQ&Q~xCByTLEipqv2+>XF8O$C7A#c--AP!KD_;uh>{fSKF(_ zXb<#%h<4xW5xv#z_$Ds08Yop)0}YmBbHg)-BAmvAAk1$pH|!Bi~xE^Lk`XPwBW(XjdOwT3`|MK z^HP=ms6kP*yU)`o&GC$BQfn?87@r5`0(#qj{q2DV8_w(I64AETxwWR^Ssy3I-?-E&_ zqy6H~fWAn4pKxOz9Mfq!7SI#DG1U4K439i$bhLUxI~CjpM1W=ls?Dw8Ij(S6eK;zA z;=c?0ppU-9Pg)zv@5B1bv@{k%Qzc&M*M3}kmF zkgJpx4f$BccpT6y8^l}GG|?(meYI+TQg4ham|@vzj9Q4K)DVw5E1Xh`&R<%ZLtTV#~EBcc9de>YJo9bONz39^ML8~rFPpZpB7gz>uyKs|K vmy5T?_vJ~_~UrdLs#N_ diff --git a/docs/py-modindex.html b/docs/py-modindex.html index 04642067..c8cbcde1 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -7,7 +7,7 @@ - Python Module Index — decitala 0.14.1 documentation + Python Module Index — decitala 1.0.0 documentation @@ -64,7 +64,7 @@
        - 0.14.1 + 1.0.0
        diff --git a/docs/search.html b/docs/search.html index 4e3b06c0..91de176d 100644 --- a/docs/search.html +++ b/docs/search.html @@ -7,7 +7,7 @@ - Search — decitala 0.14.1 documentation + Search — decitala 1.0.0 documentation @@ -64,7 +64,7 @@
        - 0.14.1 + 1.0.0
        diff --git a/docs/searchindex.js b/docs/searchindex.js index b49d9686..86ea68cc 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["basic_usage","datasets/decitalas","datasets/greek_metrics","index","mods/database","mods/fragment","mods/hash_table","mods/hm","mods/path_finding","mods/search","mods/sp","mods/trees","mods/utils","mods/vis"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["basic_usage.rst","datasets/decitalas.rst","datasets/greek_metrics.rst","index.rst","mods/database.rst","mods/fragment.rst","mods/hash_table.rst","mods/hm.rst","mods/path_finding.rst","mods/search.rst","mods/sp.rst","mods/trees.rst","mods/utils.rst","mods/vis.rst"],objects:{"decitala.database":{corpora_models:[4,0,0,"-"],db:[4,0,0,"-"]},"decitala.database.corpora_models":{CategoryData:[4,1,1,""],DecitalaData:[4,1,1,""],GreekFootData:[4,1,1,""],ProsodicFragmentData:[4,1,1,""],SubcategoryData:[4,1,1,""],TranscriptionData:[4,1,1,""]},"decitala.database.db":{CompositionData:[4,1,1,""],DatabaseException:[4,2,1,""],ExtractionData:[4,1,1,""],Species:[4,1,1,""],Transcription:[4,1,1,""],batch_create_database:[4,4,1,""],create_database:[4,4,1,""]},"decitala.database.db.Species":{aggregate_pc_distribution:[4,3,1,""]},"decitala.fragment":{Breve:[5,1,1,""],Decitala:[5,1,1,""],DecitalaException:[5,2,1,""],FragmentException:[5,2,1,""],GeneralFragment:[5,1,1,""],GreekFoot:[5,1,1,""],GreekFootException:[5,2,1,""],Macron:[5,1,1,""],ProsodicException:[5,2,1,""],ProsodicFragment:[5,1,1,""]},"decitala.fragment.Decitala":{get_by_id:[5,3,1,""],id_num:[5,3,1,""],num_matras:[5,3,1,""]},"decitala.fragment.GeneralFragment":{anga_class_counter:[5,3,1,""],augment:[5,3,1,""],c_score:[5,3,1,""],carnatic_string:[5,3,1,""],cyclic_permutations:[5,3,1,""],dseg:[5,3,1,""],greek_string:[5,3,1,""],is_non_retrogradable:[5,3,1,""],is_sub_fragment:[5,3,1,""],morris_symmetry_class:[5,3,1,""],nPVI:[5,3,1,""],num_anga_classes:[5,3,1,""],num_onsets:[5,3,1,""],ql_array:[5,3,1,""],ql_duration:[5,3,1,""],ql_tuple:[5,3,1,""],std:[5,3,1,""],successive_difference_array:[5,3,1,""],successive_ratio_array:[5,3,1,""]},"decitala.hash_table":{AllCorporaHashTable:[6,1,1,""],DecitalaHashTable:[6,1,1,""],FragmentHashTable:[6,1,1,""],GreekFootHashTable:[6,1,1,""],HashTableException:[6,2,1,""],ProsodicFragmentHashTable:[6,1,1,""],generate_all_modifications:[6,4,1,""]},"decitala.hash_table.FragmentHashTable":{load:[6,3,1,""]},"decitala.hm":{contour:[7,0,0,"-"],hm_utils:[7,0,0,"-"],molt:[7,0,0,"-"]},"decitala.hm.contour":{ContourException:[7,2,1,""],contour_to_neume:[7,4,1,""],contour_to_prime_contour:[7,4,1,""],contour_to_schultz_prime_contour:[7,4,1,""],normalize_pitch_content:[7,4,1,""],pitch_content_to_contour:[7,4,1,""],strip_monotonic_pitch_content:[7,4,1,""],uds_contour:[7,4,1,""]},"decitala.hm.hm_utils":{KS:[7,4,1,""],KS_diatonic:[7,4,1,""],diatonic_scale_binary:[7,4,1,""],get_all_coefficients:[7,4,1,""],note_counter:[7,4,1,""],pc_counter:[7,4,1,""],pc_dict_to_vector:[7,4,1,""],test_all_coefficients:[7,4,1,""]},"decitala.hm.molt":{MOLT:[7,1,1,""],MOLT_query:[7,4,1,""]},"decitala.hm.molt.MOLT":{color:[7,3,1,""],from_str:[7,3,1,""],is_color_mode:[7,3,1,""],pc_dict:[7,3,1,""],pc_vector:[7,3,1,""],pitches:[7,3,1,""],scale:[7,3,1,""]},"decitala.path_finding":{dijkstra:[8,0,0,"-"],floyd_warshall:[8,0,0,"-"],path_finding_utils:[8,0,0,"-"],pofp:[8,0,0,"-"]},"decitala.path_finding.dijkstra":{dijkstra:[8,4,1,""],dijkstra_best_source_and_sink:[8,4,1,""],generate_path:[8,4,1,""]},"decitala.path_finding.floyd_warshall":{floyd_warshall:[8,4,1,""],get_path:[8,4,1,""],reconstruct_standard_path:[8,4,1,""]},"decitala.path_finding.path_finding_utils":{CostFunction3D:[8,1,1,""],CostFunction:[8,1,1,""],DefaultCostFunction:[8,1,1,""],best_source_and_sink:[8,4,1,""],build_graph:[8,4,1,""],check_accuracy:[8,4,1,""],default_split_dict:[8,4,1,""],make_2D_grid:[8,4,1,""],make_3D_grid:[8,4,1,""],make_4D_grid:[8,4,1,""],sources_and_sinks:[8,4,1,""]},"decitala.path_finding.path_finding_utils.CostFunction":{cost:[8,3,1,""]},"decitala.path_finding.path_finding_utils.CostFunction3D":{cost:[8,3,1,""]},"decitala.path_finding.path_finding_utils.DefaultCostFunction":{cost:[8,3,1,""]},"decitala.path_finding.pofp":{check_break_point:[8,4,1,""],get_break_points:[8,4,1,""],get_pareto_optimal_longest_paths:[8,4,1,""],partition_data_by_break_points:[8,4,1,""]},"decitala.search":{Extraction:[9,1,1,""],Frame:[9,1,1,""],SearchException:[9,2,1,""],frame_is_spanned_by_slur:[9,4,1,""],frame_slur_count:[9,4,1,""],frame_slur_start_end_count:[9,4,1,""],frame_to_midi:[9,4,1,""],frame_to_ql_array:[9,4,1,""],get_by_ql_array:[9,4,1,""],path_finder:[9,4,1,""],rolling_hash_search:[9,4,1,""],rolling_search_on_array:[9,4,1,""],rolling_tree_search:[9,4,1,""]},"decitala.search.Extraction":{split:[9,3,1,""]},"decitala.sp":{sp_utils:[10,0,0,"-"]},"decitala.sp.sp_utils":{plot_spectrogram:[10,4,1,""]},"decitala.trees":{FragmentTree:[11,1,1,""],FragmentTreeException:[11,2,1,""],TreeException:[11,2,1,""]},"decitala.trees.FragmentTree":{from_composition:[11,3,1,""],from_frag_type:[11,3,1,""],from_multiple_paths:[11,3,1,""],show:[11,3,1,""]},"decitala.utils":{UtilsException:[12,2,1,""],augment:[12,4,1,""],carnatic_string_to_ql_array:[12,4,1,""],contiguous_summation:[12,4,1,""],dseg:[12,4,1,""],filter_single_anga_class_fragments:[12,4,1,""],filter_sub_fragments:[12,4,1,""],find_clusters:[12,4,1,""],find_possible_superdivisions:[12,4,1,""],get_logger:[12,4,1,""],get_object_indices:[12,4,1,""],loader:[12,4,1,""],measure_by_measure_time_signatures:[12,4,1,""],net_ql_array:[12,4,1,""],non_retrogradable_measures:[12,4,1,""],phrase_divider:[12,4,1,""],power_list:[12,4,1,""],ql_array_to_carnatic_string:[12,4,1,""],ql_array_to_greek_diacritics:[12,4,1,""],reframe_ts:[12,4,1,""],roll_window:[12,4,1,""],rolling_SRR:[12,4,1,""],stretch_augment:[12,4,1,""],successive_difference_array:[12,4,1,""],successive_ratio_array:[12,4,1,""],transform_to_time_scale:[12,4,1,""],write_analysis:[12,4,1,""]},"decitala.vis":{annotate_score:[13,4,1,""],create_tree_diagram:[13,4,1,""],fragment_roll:[13,4,1,""],plot_2D_search_results:[13,4,1,""],result_bar_plot:[13,4,1,""]},decitala:{fragment:[5,0,0,"-"],hash_table:[6,0,0,"-"],search:[9,0,0,"-"],trees:[11,0,0,"-"],utils:[12,0,0,"-"],vis:[13,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","exception","Python exception"],"3":["py","method","Python method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:exception","3":"py:method","4":"py:function"},terms:{"0625":[9,12],"120":5,"125":[0,5,6,8,9,12],"130":1,"13th":1,"1875":6,"1921":5,"1944":[0,7],"1976":7,"1985":5,"1991":12,"1993":[0,7],"1998":5,"1999":5,"2000":5,"2008":[0,7],"2020":8,"2599":8,"2855":[0,6],"28571428571429":5,"2899":6,"2901442287369986":5,"350":13,"375":[0,5,6,9,12],"4213":8,"4714045207910317":5,"5242185497821":0,"5257063700393976":5,"625":[0,6,8,9,12],"62734114":8,"63_nandi":5,"66666667":5,"737":6,"75_pratapacekhara":5,"8000":10,"875":[0,6],"89_lalitapriya":5,"93_ragavardhana":[5,6,11],"\u015b\u0101rngadeva":1,"\u0915\u0930":1,"\u0917":1,"\u0917\u0926":1,"\u0919":1,"\u0924":1,"\u0924\u0930\u0924":1,"\u0926":1,"\u0928":1,"\u0930":1,"\u0932":1,"\u0935":1,"\u0936":1,"\u0938":1,"\u0938\u0919":1,"ascl\u00e9piade_mineur":5,"austb\u00f8":7,"break":8,"class":[0,4,5,6,7,8,9,11,12],"default":[0,4,6,7,8,9,11,12,13],"des\u012bt\u0101la":3,"encyclop\u00e9di":5,"final":[4,9],"float":[4,5,7,8,9,12],"function":[0,4,6,7,8,9,10,11,12,13],"h\u00e5kon":7,"ha\u00efka\u00ef":13,"import":[0,6,7,8,9,11,12],"int":[4,5,7,8,9,11,12,13],"long":[0,12],"new":[5,6,12],"return":[0,4,5,7,8,9,11,12,13],"sang\u012btaratn\u0101kara":1,"short":[2,12],"static":[0,9],"trait\u00e9":5,"true":[4,5,6,7,8,9,12],For:[9,12],Not:6,QLs:7,The:[0,2,3,5,6,7,8,9,11,12,13],There:12,These:[0,5],UDS:7,Useful:12,Uses:8,Using:0,__init__:0,abc:5,about:3,accept:[0,7],access:[0,4],accord:[8,12],across:4,add:[4,12],addit:[0,6,11,12],adjac:8,adon:2,affect:7,aggreg:4,aggregate_pc_distribut:4,agnost:8,aim:3,algorithm:[0,7,8,9],align:3,all:[0,4,5,6,7,8,9,12,13],all_named_path:11,all_r:9,all_search_result:0,allcorporahasht:6,allow:[0,4,5,6,7,9,12],allow_contiguous_summ:9,allow_mixed_augment:6,allow_overlap:9,allow_stretch_augment:6,allow_subdivis:9,allow_unnam:9,allowed_modif:9,along:7,alouette_5:7,also:[0,1,2,4,5,6,7,11,12],alter:0,amphibrach:[0,2,9],amphimac:[2,9],analys:12,analysi:[0,3,7,8,12],analyz:[4,7,12],anapest:[0,2],anga:[5,12],anga_class_count:5,ani:[6,8],annot:13,annotate_scor:13,anoth:[5,12],antibacchiu:2,antipast:2,anyth:6,appear:[5,9,12],appli:0,approach:[8,12],arbitrari:8,argument:[5,7],arrai:[0,5,7,8,9,12],articul:0,articulation_weight:8,as_str:[5,7,12],as_vector:[4,7],asclepiad_m:5,associ:[7,8,9,12],attribut:[6,8],audio:10,augment:[0,5,6,12],automat:6,avail:[0,6],b_i:8,bacchiu:[0,2,5],bad:8,bar:[8,13],base:[0,4,5,6,7,8,9,11,12],basic:[3,4],batch_create_databas:4,becom:0,befor:0,begin:8,being:3,belong:7,below:[0,2],best:[8,9],best_source_and_sink:8,between:[0,4,7,8,13],binari:[7,12],birdsong:12,bodi:7,boi:13,bool:[4,5,6,7,8,9,12],both:3,boundari:9,breakpoint:8,breve:5,brown:0,bug:3,build:8,build_graph:8,c_score:5,calcul:[7,8,12],calculated_data:8,call:[0,1,4,7],can:[0,3,5,9,11,12],carnat:12,carnatic_str:5,carnatic_string_to_ql_arrai:12,categori:4,categorydata:4,cater:[7,12],centuri:1,chang:[0,6,12],check:[3,5,7,8,9],check_accuraci:8,check_break_point:8,child:8,choos:[7,8],chord:12,choriamb:[2,9],circul:7,classif:5,classmethod:[5,7,11],clear:6,clone:3,cluster:12,code:3,coeffic:7,coeffici:7,collect:[0,1,2,5,7,12],color:[0,7],column:4,com:[3,8],combin:[7,9],combo:11,come:7,commit:3,common:8,compil:1,compon:12,compos:12,composit:[0,4,8,9,11,13],compositiondata:4,compound:8,concret:7,concretescal:7,connect:13,consecut:12,consist:[7,12],consol:12,contain:[0,7,13],content:[0,4,7,12],contigu:[0,9,12],contiguous_summ:[9,12],contour:[0,3],contour_a:7,contour_b:7,contour_to_neum:7,contour_to_prime_contour:[0,7],contour_to_schultz_prime_contour:[0,7],contourexcept:7,contribut:[0,3],convent:12,convert:[7,12],cool:5,coolness_level:5,corpora:[0,3,4,5,6],corpora_model:3,correl:7,correspond:[5,13],cost:[0,8],cost_function_class:[0,8,9],costfunct:[0,8],costfunction3d:8,could:4,count:7,counter:5,creat:[0,4,7,11,12,13],create_databas:4,create_tree_diagram:13,creation:13,cseg_data:12,current:[0,4,6,9],custom:0,custom_frag:[0,6],cycl:5,cyclic:5,cyclic_permut:5,dactyl:[2,8,9],data:[0,4,5,6,7,8,9,11,12,13],data_in:4,data_mod:12,databas:[1,2,3,5,11,12],databaseexcept:4,dataclass:0,dataset:[0,4,6,8,9,11],db_path:4,deal:7,decitala:[0,4,5,6,7,8,9,10,11,12,13],decitaladata:4,decitalaexcept:5,decitalahasht:[0,6],decl_api:4,def:[0,8],default_split_dict:8,defaultcostfunct:[8,9],defin:[5,11,12],denomin:12,denomini:12,depth:7,desi:1,desir:[0,4,6],detect:[0,3,8,9],determin:[0,7,8,11],develop:3,deviat:[5,8],diagram:[11,13],diaton:7,diatonic_scale_binari:7,dict:[4,6,7,8],dict_in:[6,7],dictionari:[4,6,7,8,9],differ:[4,5,6,8,9,11,12],difference_tre:9,diiamb:9,dijkstra:[0,3,9],dijkstra_best_source_and_sink:8,directori:[0,1,2,3,5,6,11,12],discov:3,displai:13,distanc:8,distribut:4,divid:12,divis:12,dochmiu:2,docstr:5,document:[0,9],doe:[9,11],doesn:[6,8],don:9,down:7,dpi:13,drop:3,dseg:[5,12],dual:5,duplic:7,durat:[5,7,9,12],dynam:[0,8],e501:12,each:[0,4,8,9,11,12],earliest:8,easier:3,echo:4,edg:8,effect:9,effici:8,eighth:5,either:[5,7,11,12],element:[5,7,9,12],empti:12,encod:[1,2,3,4],end:[4,8,9,12,13],enforce_earliest_start:[8,9],enumer:2,epitrit:2,equal:[7,8,9,12],equival:0,erron:12,essen:5,establish:0,etc:[0,9,12],ethnolog:3,evalu:12,even:12,everi:[8,12],exampl:0,example_data2:12,example_data:12,example_frag:9,except:[4,5,6,7,9,11,12],exclud:[7,12],exclude_major_minor:7,exist:[0,6,7],express:5,extract:[0,4,7,8,9,12,13],extractiondata:4,extrem:7,eye:7,factor:[0,5,6,8,9,12],fail:9,fake:13,fals:[4,5,6,7,8,9,11,12,13],fast:0,faster:9,feel:3,feet:13,fermata:12,fht:6,file:[1,2,3,5,7,9,10,11,12,13],filenam:[0,5],filepath:[0,4,7,9,10,11,12,13],filter:12,filter_in_retrograd:12,filter_single_anga_class_frag:12,filter_sub_frag:12,find:[0,3,8,9,12],find_clust:12,find_possible_superdivis:12,first:[0,7,8,9,12],first_term:8,fix:8,flip:0,floyd:[8,9],floyd_warshal:[3,9],folder:[11,13],follow:[0,3,8,12],foot:[4,5],forc:[6,9],force_overrid:6,form:[0,5,7,8,12],format:[7,8,12],found:7,four:8,frag:11,frag_typ:[8,9,11],fragment:[0,1,2,3,4,6,8,9,11,12,13],fragment_databas:11,fragment_rol:13,fragment_typ:4,fragmentexcept:5,fragmenthasht:[0,4,6,9],fragments_db:[1,2,5],fragmenttre:[9,11,13],fragmenttreeexcept:11,frame:[4,9],frame_is_spanned_by_slur:9,frame_slur_count:9,frame_slur_start_end_count:9,frame_to_midi:9,frame_to_ql_arrai:9,free:3,from:[0,4,5,6,7,8,9,11,12,13],from_composit:11,from_frag_typ:[9,11],from_multiple_path:11,from_str:7,full:13,fulli:12,further:7,futur:[0,8],gap:0,gap_weight:8,gener:[0,5,6,7,8,11,12],general_frag:[4,8],generalfrag:[0,5,6,8,9,11,12],generate_all_modif:6,generate_path:8,get:9,get_all_coeffici:7,get_break_point:8,get_by_id:5,get_by_ql_arrai:9,get_logg:[9,12],get_object_indic:[9,12],get_pareto_optimal_longest_path:8,get_path:8,ght:[0,6,9],giant:7,git:3,github:3,give:11,given:[0,4,5,6,7,8,9,11,12,13],gladli:0,gmail:3,gold:0,grabe:5,grace:[9,12],graph:8,greatest:8,greek:[0,3,4,5,12,13],greek_foot:[0,4,6,8,9,11],greek_foot_ratio:11,greek_metr:5,greek_str:[0,5],greekfoot:[0,5,8,9,11,12],greekfootdata:4,greekfootexcept:5,greekfoothasht:[0,6],grid:8,harmon:0,harmoni:[3,7],has:13,hash:0,hash_tabl:[0,3,4,9],hashtableexcept:6,have:[5,12],heap:8,hear:[3,7],helper:[6,8,12],helpfulli:8,henc:8,here:[0,3,5,8],heurist:8,highli:[0,7],his:[0,1,3],hm_util:3,hold:[0,4,6,7,8,9,11,12],home:3,hopefulli:8,how:3,html:[11,13],http:[3,8],hyperparamet:8,iamb:[0,2,9,12],id_:[8,9],id_num:5,ignor:12,ignore_grac:[9,12],ignore_grace_not:12,ignore_tuplet:12,iii:2,imag:11,implement:[0,7,8],includ:[0,4,7,8,9],include_rest:12,include_self:12,index:[3,8,9,13],india:1,indian:5,indic:[8,12],inform:[0,12],initi:5,inord:5,input:[6,7,8,12,13],input_:12,input_data:8,input_id:5,insid:12,instanc:[0,6],instanti:0,instead:[7,12],integ:[7,9],intend:13,interest:0,interpol:0,introduct:12,invalid:11,inwardli:7,ionic:2,ionic_major:11,is_color_mod:7,is_non_retrograd:5,is_slur:4,is_spanned_by_slur:[8,9,12],is_sub_frag:5,issu:[3,5],iter:[7,8,12],its:[0,5,9],jaya:5,json:[4,9,12],just:6,kei:[4,7,8,11],kept:12,kessler:7,keyword:5,kind:[7,12],krumhansl:7,ks_diaton:7,kwarg:[4,5,8,11],lambda:[11,12],last:9,latest:8,latter:6,lavignac:5,len:8,length:[2,4,5,9,12],less:8,let:9,level:4,librari:[11,13],light:9,like:[0,3,7],limit:[0,7],line:13,link:8,list:[0,1,2,4,5,6,7,8,9,11,12,13],load:[0,6,9,12],loader:[9,12],local:4,local_filepath:4,locat:12,log:[8,9,12],logger:9,long_frag:12,longer:12,love:[3,9],low:5,lowest:[7,12],luke:3,lukepoeppel:[0,3],m1t2:7,m2t2:0,m3t3:7,macdowel:12,macron:5,made:11,mahler:12,major:[2,7],make:[3,12],make_2d_grid:8,make_3d_grid:8,make_4d_grid:8,manipul:0,manner:7,map:12,marker:12,marvin:12,massenet:12,materi:12,matra:5,matric:8,matrix:8,max_freq:10,maxim:5,mean:[5,8],measur:12,measure_by_measure_time_signatur:12,measure_divider_mod:12,melod:0,melodi:[3,7],messag:[8,9],messiaen:[0,3,5,7,12],messiean:8,meter:12,meth:5,method:[0,4,5,6,11],metric:[0,3,8,12],midi:7,midi_start:7,min:8,mind:7,minim:8,minor:[2,7],mix:[0,6,12],mod:[9,12],mod_hierarchy_v:[4,8,9],mod_typ:4,mode:[0,7,8,12],model:4,modif:[0,4,6,7,9],modifi:[9,12],modification_hierarchi:6,modul:[0,3,6,7,11],moiseaux:[0,7],molt:[0,3],molt_queri:[0,7],molt_tonic_v:7,monoton:7,monteverdi:12,more:[0,7,12],morri:[0,5,7],morris_symmetry_class:5,most:[0,7,8],move:[7,8],mozart:12,multipl:[0,4,6,11,12],music21:[5,7,9,11,12],music:[0,3,5,7,12],musicolog:1,must:[0,5,8,9,12],mxtb:7,my_cost_funct:0,my_frag:0,my_fram:9,my_ht:0,mycooltre:11,myfirstcostfunct:8,myfrag:11,mynandi:5,mysecondcostfunct:8,mytre:11,name:[0,2,4,5,6,8,11,12],narytre:11,nativ:12,natur:7,navig:3,need:[3,8],neg:8,neither:[5,9],net:7,net_ql_arrai:12,neum:7,new_denomin:12,next:8,next_matrix:8,node:[8,11],nolan:5,non:[5,7,8,12],non_retrogradable_measur:12,none:[5,7,8,9,10,11,12,13],noqa:[7,8,9,12],nor:9,normal:[0,4,7],normalize_over_dur:7,normalize_pitch_cont:7,notabl:0,notat:12,note:[0,3,5,7,8,9,12],note_count:7,notimplementederror:5,npvi:5,num:4,num_anga_class:[5,12],num_matra:5,num_onset:[5,8],number:[0,4,5,7,8,9,11,12,13],numpi:[5,7,8,9,12],objec:7,object:[0,4,5,6,7,8,9,11,12,13],octav:7,often:0,olivi:[0,3],one:[0,5,8,9],onli:[0,3,4,6,7,8,9,12],onset:[0,4,5,7,8,9,12],onset_list:8,onset_rang:[0,8,9,12],onset_start:4,onset_stop:4,onset_weight:8,optim:8,option:[4,5,7,9,11,12,13],order:[7,9,12],origin:[5,7,8],orm:4,other:[5,6,7,8],otherwis:[7,11,13],our:0,output:[7,12],over:[7,8,12],overal:5,overlap:[8,9],overrid:[6,7,8],oversimplifi:[7,12],own:0,p70:12,packag:[0,3,11],page:3,palindrom:5,param:7,paramet:[0,4,5,6,7,8,9,11,12,13],pars:7,part:[0,4,7,9,11,12,13],part_num:[0,4,7,9,12,13],particular:6,particularli:[3,12],partit:[8,12],partition_data_by_break_point:8,path:[0,4,5,7,8,9,11,12,13],path_find:[0,3,9,13],path_finding_util:[0,3,9],pc_counter:7,pc_dict:7,pc_dict_to_vector:7,pc_vector:[0,7],pdf:11,peon:2,peon_check:6,peon_ii:11,peon_iv:[0,6],percept:12,permut:5,phrase:12,phrase_divid:12,piano:13,pip3:3,pitch:[0,4,7,9,12],pitch_cont:[4,7,8,9,12],pitch_content_1:7,pitch_content_2:7,pitch_content_to_contour:7,plot:[10,13],plot_2d_search_result:13,plot_spectrogram:10,poeppel:3,pofp:3,point:[7,8],porrectu:7,possibl:[0,3,4,6,7,9,12],post:8,povel:5,power:12,power_list:12,pre:[0,3],pre_augment:5,pred:8,predecessor:8,present:12,pretti:5,previou:8,primarili:9,prime:[0,7],print:[0,5,7,8,9,11,12],print_to_consol:12,prior:8,probabl:[7,8],problem:[8,12],process:[0,10],program:[0,8],progress:8,proper:3,properti:[5,7],proport:7,prosod:[4,5,12,13],prosodic_frag:6,prosodicexcept:5,prosodicfrag:[0,5],prosodicfragmentdata:4,prosodicfragmenthasht:[0,6],provid:[0,1,2,5,7,8,9,13],provinc:1,prune:[0,7],python:12,ql_arrai:[0,5,9,12],ql_array_to_carnatic_str:[5,12],ql_array_to_greek_diacrit:[5,12],ql_durat:5,ql_tupl:5,quarter:[2,4,5,9,12],quarterlength:[9,12],queri:[0,7,8],question:8,quick:9,ragavardhana:[0,5,6,11],rais:[5,11],random_fragment_path:5,rang:[0,5,7,9,12],ratio:[4,5,6,9,11,12],ratio_tre:[9,11],raynard:8,read:[5,7],readabl:[5,7,9,11],reconstruct:8,reconstruct_standard_path:8,reduc:[5,7,12],reduct:[0,7],refer:1,referenc:8,reframe_t:12,region:12,regular:8,rel:12,relat:0,relev:6,reli:[4,8],reload:6,remov:[7,12],rep_typ:[9,11],repeat:8,repetit:7,repres:[4,5,7,12],represent:[9,11,12],requir:[4,8],resolut:8,respect:3,rest:12,restrict:0,result:[0,4,6,9,12,13],result_bar_plot:13,retriev:[5,9,12],retriv:8,retrograd:[0,5,6,8,9,12],return_list:8,return_p_valu:7,return_ton:7,rhythm:[2,3,12],rhythmic:[0,1,3,5,9,11,12],robert:[0,7],roll:[0,9,11,12,13],roll_window:12,rolling_hash_search:[0,7,9],rolling_search:[4,7,8,12],rolling_search_on_arrai:9,rolling_srr:12,rolling_tree_search:9,rsr:9,run:[3,6,9],s_i:8,sai:12,same:[0,12],samuel:7,satifi:12,save:[9,11,12,13],save_filepath:[9,13],save_path:[10,11],scale:[0,5,7,12],scatter:13,schmuckler:7,schultz:[0,7],schumckler:7,score:[0,4,5,9,13],search:[0,3,4,5,6,7,8,13],search_constraint:4,search_for_path:11,searchexcept:9,second:8,second_term:8,see:[0,3,5,7,9,12],seg:12,self:[0,5,8],sens:7,separ:12,sept:13,sequenc:12,set:[0,5,6,7,8,11,12],should:[8,13],show:[8,11],shuffled_transcription_1:0,shuffled_transcription_2:9,signal:10,signatur:12,similarli:0,simpl:[0,7,8,12],simpler:9,simpli:6,singl:[4,7,12],sink:8,sit:12,size:[8,9,12],slur:[4,9],slur_constraint:[8,9],slur_count:[8,9],slur_start_end_count:[8,9],solut:8,solv:8,some:[5,7,12],sort:[7,11],sourc:[3,4,5,6,7,8,9,10,11,12,13],sources_and_sink:8,sp_util:3,space:12,span:[4,9],spanner:9,speci:4,special:12,specifi:0,spectrogram:10,split:[8,9],split_dict:9,sponde:[2,5,8,9,12],sql:4,sqlalchemi:4,srr:12,stackoverflow:8,stage:0,stai:7,standard:[0,5,7,8],start:[4,7,8,9,12,13],std:[0,5,8],std_weight:0,still:[0,12],store:[0,4,5,6,7,8,9,11,13],str:[4,5,7,9,11,12,13],str_in:7,stream:[5,12],stretch:6,stretch_aug:12,stretch_factor:12,string:[7,11,12],string_:12,strip:7,strip_monotonic_pitch_cont:7,structur:8,stupid:7,style:12,sub:[5,12],subcategori:4,subcategorydata:4,subclass:[0,6,9],subdivis:[0,6,9,12],success:12,successive_difference_arrai:[5,12],successive_ratio_arrai:[5,12],suggest:3,sum:[8,12],sum_search:12,summat:[0,9,12],summer:8,support:[0,4,6,7,9,12],symmetri:5,synopsia:7,tabl:[0,4,5,6,9],take:[3,12],tala:[5,12],tala_data:9,target:8,techniqu:[0,6,8],tempfil:13,tend:12,test1:8,test2:8,test:[0,9],test_all_coeffici:7,than:[7,8,9,12],thei:[1,2,13],them:[0,3,6],therefor:7,thi:[0,3,4,5,6,7,8,9,11,12,13],this_cycl:5,this_fram:12,this_object:12,those:8,three:[7,8],through:[0,9],ties:[7,9],time:12,timesignatur:12,titl:[10,13],todo:[4,7,8],togeth:9,tonal:12,tone:7,tonic:7,tonic_valu:7,tool:[3,7,9,12],toolkit:3,total:7,toward:12,training_data:8,transcript:4,transcription_mod:13,transcriptiondata:4,transform:[0,12],transform_to_time_scal:12,translat:7,transliter:5,transposit:[0,7],treant:[11,13],treatis:1,tree:[3,9,13],treeexcept:11,treeplott:11,trivial:5,troche:[0,2,8,9,12],try_contiguous_summ:9,try_retrograd:[5,6],tupl:[5,7,8,9,12],tuplet:12,two:[7,8,12],type:[0,4,5,6,7,8,9,11,12,13],udikshana:12,uds_contour:7,uniqu:5,unless:7,unnam:9,unnecessari:7,until:[6,7],usag:3,use:[0,3,6,8,12],used:[0,3,7,8,9,12,13],useful:[3,9,12],user:[0,4,5,6,8],uses:11,using:[0,8,9,11,13],usual:13,util:[3,5,7,9],utilsexcept:12,valu:[4,5,7,8,12],varied_ragavardhana:12,variou:0,vector:7,verbos:[8,9,11,13],veri:9,version:3,vertex:8,vertex_1:8,vertex_2:8,vertex_a:[0,8],vertex_b:[0,8],vertic:8,via:8,vis:[3,11],visual:13,vivid:7,vstack:12,wai:9,wand:11,want:[6,12],warn:9,warshal:[8,9],webshot:[11,13],weight:[7,8],weight_a:8,weight_b:8,well:[0,13],were:[1,9],when:[5,7,9],where:[0,12,13],whether:[4,5,6,7,8,9,12],which:[1,5,7,8,9,13],window:[0,4,9,11,12],window_s:12,within:9,without:4,work:[3,7,9,12],would:0,write:12,write_analysi:12,write_to_fil:12,written:3,xml:[0,1,2,5,9],xxx:5,xxxxxx:5,xyx:5,xyyyx:5,xyz:5,yet:6,you:[0,3,6],zero:12},titles:["Basic Usage","Des\u012bt\u0101las","Greek Metrics","Decitala Documentation","database","fragment","hash_table","hm","path_finding","search","sp","trees","utils","vis"],titleterms:{"des\u012bt\u0101la":1,basic:0,contour:7,corpora_model:4,databas:4,decitala:3,dijkstra:8,document:3,floyd_warshal:8,fragment:5,greek:2,harmoni:0,hash_tabl:6,hm_util:7,indic:3,instal:3,melodi:0,metric:2,molt:7,path_find:8,path_finding_util:8,pofp:8,rhythm:0,search:9,sp_util:10,tabl:3,tool:0,tree:11,tutori:3,usag:0,util:12,vis:13}}) \ No newline at end of file +Search.setIndex({docnames:["basic_usage","datasets/decitalas","datasets/greek_metrics","index","mods/database","mods/fragment","mods/hash_table","mods/hm","mods/path_finding","mods/search","mods/sp","mods/trees","mods/utils","mods/vis"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["basic_usage.rst","datasets/decitalas.rst","datasets/greek_metrics.rst","index.rst","mods/database.rst","mods/fragment.rst","mods/hash_table.rst","mods/hm.rst","mods/path_finding.rst","mods/search.rst","mods/sp.rst","mods/trees.rst","mods/utils.rst","mods/vis.rst"],objects:{"decitala.database":{corpora_models:[4,0,0,"-"],db:[4,0,0,"-"]},"decitala.database.corpora_models":{CategoryData:[4,1,1,""],DecitalaData:[4,1,1,""],GreekFootData:[4,1,1,""],ProsodicFragmentData:[4,1,1,""],SubcategoryData:[4,1,1,""],TranscriptionData:[4,1,1,""]},"decitala.database.db":{CompositionData:[4,1,1,""],DatabaseException:[4,2,1,""],ExtractionData:[4,1,1,""],Species:[4,1,1,""],Transcription:[4,1,1,""],batch_create_extraction_database:[4,4,1,""],batch_create_path_database:[4,4,1,""],create_extraction_database:[4,4,1,""],create_path_database:[4,4,1,""]},"decitala.database.db.ExtractionData":{from_extraction:[4,3,1,""]},"decitala.database.db.Species":{aggregated_pc_distribution:[4,3,1,""]},"decitala.fragment":{Breve:[5,1,1,""],Decitala:[5,1,1,""],DecitalaException:[5,2,1,""],FragmentException:[5,2,1,""],GeneralFragment:[5,1,1,""],GreekFoot:[5,1,1,""],GreekFootException:[5,2,1,""],Macron:[5,1,1,""],ProsodicException:[5,2,1,""],ProsodicFragment:[5,1,1,""]},"decitala.fragment.Decitala":{get_by_id:[5,3,1,""],id_num:[5,3,1,""],num_matras:[5,3,1,""]},"decitala.fragment.GeneralFragment":{anga_class_counter:[5,3,1,""],augment:[5,3,1,""],c_score:[5,3,1,""],carnatic_string:[5,3,1,""],cyclic_permutations:[5,3,1,""],dseg:[5,3,1,""],greek_string:[5,3,1,""],is_non_retrogradable:[5,3,1,""],is_sub_fragment:[5,3,1,""],morris_symmetry_class:[5,3,1,""],nPVI:[5,3,1,""],num_anga_classes:[5,3,1,""],num_onsets:[5,3,1,""],ql_array:[5,3,1,""],ql_duration:[5,3,1,""],ql_tuple:[5,3,1,""],std:[5,3,1,""],successive_difference_array:[5,3,1,""],successive_ratio_array:[5,3,1,""]},"decitala.hash_table":{AllCorporaHashTable:[6,1,1,""],DecitalaHashTable:[6,1,1,""],FragmentHashTable:[6,1,1,""],GreekFootHashTable:[6,1,1,""],HashTableException:[6,2,1,""],ProsodicFragmentHashTable:[6,1,1,""],generate_all_modifications:[6,4,1,""]},"decitala.hash_table.FragmentHashTable":{load:[6,3,1,""]},"decitala.hm":{contour:[7,0,0,"-"],hm_utils:[7,0,0,"-"],molt:[7,0,0,"-"]},"decitala.hm.contour":{ContourException:[7,2,1,""],contour_class:[7,4,1,""],contour_to_neume:[7,4,1,""],normalize_pitch_content:[7,4,1,""],pitch_contour:[7,4,1,""],prime_contour:[7,4,1,""],schultz_prime_contour:[7,4,1,""],strip_monotonic_pitch_content:[7,4,1,""],uds_contour:[7,4,1,""]},"decitala.hm.hm_utils":{HMUtilsException:[7,2,1,""],KS:[7,4,1,""],KS_diatonic:[7,4,1,""],diatonic_scale_binary:[7,4,1,""],get_all_coefficients:[7,4,1,""],normalize_pc_counter:[7,4,1,""],note_counter:[7,4,1,""],pc_counter:[7,4,1,""],pc_dict_to_vector:[7,4,1,""],test_all_coefficients:[7,4,1,""]},"decitala.hm.molt":{MOLT:[7,1,1,""],MOLT_query:[7,4,1,""],MoltException:[7,2,1,""]},"decitala.hm.molt.MOLT":{color:[7,3,1,""],from_str:[7,3,1,""],is_color_mode:[7,3,1,""],pc_dict:[7,3,1,""],pc_vector:[7,3,1,""],pitches:[7,3,1,""],scale:[7,3,1,""]},"decitala.path_finding":{dijkstra:[8,0,0,"-"],floyd_warshall:[8,0,0,"-"],path_finding_utils:[8,0,0,"-"],pofp:[8,0,0,"-"]},"decitala.path_finding.dijkstra":{dijkstra:[8,4,1,""],dijkstra_best_source_and_sink:[8,4,1,""],generate_path:[8,4,1,""]},"decitala.path_finding.floyd_warshall":{floyd_warshall:[8,4,1,""],get_path:[8,4,1,""],reconstruct_standard_path:[8,4,1,""]},"decitala.path_finding.path_finding_utils":{CostFunction2D:[8,1,1,""],CostFunction3D:[8,1,1,""],CostFunction:[8,1,1,""],best_source_and_sink:[8,4,1,""],build_graph:[8,4,1,""],check_accuracy:[8,4,1,""],default_split_dict:[8,4,1,""],make_2D_grid:[8,4,1,""],make_3D_grid:[8,4,1,""],make_4D_grid:[8,4,1,""],sources_and_sinks:[8,4,1,""],split_extractions:[8,4,1,""]},"decitala.path_finding.path_finding_utils.CostFunction":{cost:[8,3,1,""]},"decitala.path_finding.path_finding_utils.CostFunction2D":{cost:[8,3,1,""]},"decitala.path_finding.path_finding_utils.CostFunction3D":{cost:[8,3,1,""]},"decitala.path_finding.pofp":{check_break_point:[8,4,1,""],get_break_points:[8,4,1,""],get_pareto_optimal_longest_paths:[8,4,1,""],partition_data_by_break_points:[8,4,1,""]},"decitala.search":{Extraction:[9,1,1,""],SearchException:[9,2,1,""],frame_is_spanned_by_slur:[9,4,1,""],frame_slur_count:[9,4,1,""],frame_slur_start_end_count:[9,4,1,""],frame_to_midi:[9,4,1,""],frame_to_ql_array:[9,4,1,""],get_by_ql_array:[9,4,1,""],path_finder:[9,4,1,""],rolling_hash_search:[9,4,1,""],rolling_search_on_array:[9,4,1,""],rolling_tree_search:[9,4,1,""]},"decitala.search.Extraction":{split:[9,3,1,""]},"decitala.sp":{sp_utils:[10,0,0,"-"]},"decitala.sp.sp_utils":{plot_spectrogram:[10,4,1,""]},"decitala.trees":{FragmentTree:[11,1,1,""],FragmentTreeException:[11,2,1,""],TreeException:[11,2,1,""]},"decitala.trees.FragmentTree":{from_composition:[11,3,1,""],from_frag_type:[11,3,1,""],from_multiple_paths:[11,3,1,""],show:[11,3,1,""]},"decitala.utils":{NormalizedCounter:[12,1,1,""],UtilsException:[12,2,1,""],augment:[12,4,1,""],carnatic_string_to_ql_array:[12,4,1,""],contiguous_summation:[12,4,1,""],dict_to_ordered_dict:[12,4,1,""],dseg:[12,4,1,""],filter_single_anga_class_fragments:[12,4,1,""],filter_sub_fragments:[12,4,1,""],find_clusters:[12,4,1,""],find_possible_superdivisions:[12,4,1,""],get_logger:[12,4,1,""],get_object_indices:[12,4,1,""],get_shells:[12,4,1,""],loader:[12,4,1,""],measure_by_measure_time_signatures:[12,4,1,""],net_ql_array:[12,4,1,""],non_retrogradable_measures:[12,4,1,""],phrase_divider:[12,4,1,""],power_list:[12,4,1,""],ql_array_to_carnatic_string:[12,4,1,""],ql_array_to_greek_diacritics:[12,4,1,""],reframe_ts:[12,4,1,""],roll_window:[12,4,1,""],rolling_SRR:[12,4,1,""],stretch_augment:[12,4,1,""],successive_difference_array:[12,4,1,""],successive_ratio_array:[12,4,1,""],transform_to_time_scale:[12,4,1,""],write_analysis:[12,4,1,""]},"decitala.vis":{annotate_score:[13,4,1,""],create_tree_diagram:[13,4,1,""],fragment_roll:[13,4,1,""],plot_2D_search_results:[13,4,1,""],result_bar_plot:[13,4,1,""]},decitala:{fragment:[5,0,0,"-"],hash_table:[6,0,0,"-"],search:[9,0,0,"-"],trees:[11,0,0,"-"],utils:[12,0,0,"-"],vis:[13,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","exception","Python exception"],"3":["py","method","Python method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:exception","3":"py:method","4":"py:function"},terms:{"0625":[9,12],"09090909090909091":7,"120":5,"125":[0,5,6,8,9,12],"130":1,"13636363636363635":7,"13th":1,"1875":6,"1921":5,"1944":[0,7],"1976":7,"1985":5,"1991":12,"1993":[0,7],"1998":5,"1999":5,"2000":5,"2008":[0,7],"2020":8,"220":7,"221":7,"2599":8,"2727272727272727":7,"2855":0,"28571428571429":5,"2897":6,"2901442287369986":5,"2941":6,"350":13,"375":[0,5,6,7,9,12],"4213":8,"4714045207910317":5,"5242185497821":0,"5257063700393976":5,"625":[0,6,8,9,12],"62734114":8,"63_nandi":5,"66666667":5,"75_pratapacekhara":5,"779":6,"8000":10,"875":[0,6],"89_lalitapriya":5,"93_ragavardhana":[5,6,11],"\u015b\u0101rngadeva":1,"\u0915\u0930":1,"\u0917":1,"\u0917\u0926":1,"\u0919":1,"\u0924":1,"\u0924\u0930\u0924":1,"\u0926":1,"\u0928":1,"\u0930":1,"\u0932":1,"\u0935":1,"\u0936":1,"\u0938":1,"\u0938\u0919":1,"ascl\u00e9piade_mineur":5,"austb\u00f8":7,"break":[4,8],"case":[7,12],"class":[0,4,5,6,7,8,9,11,12],"default":[0,4,6,7,8,9,11,12,13],"des\u012bt\u0101la":3,"encyclop\u00e9di":5,"final":[9,13],"float":[5,7,8,9,12],"function":[0,4,6,7,8,9,10,11,12,13],"h\u00e5kon":7,"ha\u00efka\u00ef":13,"import":[0,6,7,8,9,11,12],"int":[4,5,7,8,9,11,12,13],"long":[0,12],"new":[5,6,12],"return":[0,4,5,7,8,9,11,12,13],"sang\u012btaratn\u0101kara":1,"short":[2,12],"static":[0,9],"trait\u00e9":5,"true":[4,5,6,7,8,9,12,13],For:[9,12],Not:6,The:[0,2,3,5,6,7,8,9,11,12,13],There:12,These:[0,5],UDS:7,Useful:12,Uses:8,Using:0,__init__:0,abc:5,about:3,accept:[0,7],access:[0,4],accident:4,accord:[8,12],across:4,act:12,add:[4,12],adding:4,addit:[0,6,11,12],adjac:8,adon:2,affect:7,aggreg:4,aggregated_pc_distribut:4,agnost:8,aim:3,alex:12,algorithm:[0,4,7,8,9],align:3,all:[0,4,5,6,7,8,9,12,13],all_extract:8,all_named_path:11,all_r:[8,9],all_search_result:0,allcorporahasht:6,allow:[0,4,5,6,7,9,12],allow_contiguous_summ:[4,9],allow_mixed_augment:6,allow_overlap:9,allow_stretch_augment:6,allow_subdivis:[4,9],allow_symmetri:7,allow_unnam:9,allowed_modif:9,along:7,alouette_5:7,also:[0,1,2,4,5,6,7,11,12],alter:0,amphibrach:[0,2,9],amphimac:[2,8,9],analys:12,analysi:[0,3,7,8,12],analyz:[4,7,12],anapest:[0,2,8],andrew:12,anga:[5,12],anga_class_count:5,ani:[6,8],annot:13,annotate_scor:13,anoth:[5,12],antibacchiu:2,antipast:2,anyth:6,appear:[5,9,12],appli:0,approach:[8,12],arbitrari:8,argument:5,arrai:[0,5,7,8,9,12],articul:0,articulation_weight:8,as_str:[5,7,12],as_vector:[4,7],asclepiad_m:5,associ:[7,8,9,12],attribut:[6,8],audio:10,augment:[0,5,6,12],automat:6,avail:[0,6],axi:13,b_i:8,bacchiu:[0,2,5],bad:8,bar:[8,13],base:[0,4,5,6,7,8,9,11,12],basic:[3,4],batch_create_extraction_databas:4,batch_create_path_databas:4,becom:[0,12],befor:0,begin:8,being:3,belong:7,below:[0,2],best:[7,8,9],best_source_and_sink:8,between:[0,7,8,13],binari:[7,12],birdsong:12,bob:12,bodi:7,boi:13,bool:[4,5,6,7,8,9,12,13],both:3,boundari:9,breakpoint:8,breve:5,brown:0,bug:3,build:8,build_graph:8,c_score:5,calcul:[7,8,12],calculated_data:8,call:[0,1,4,7],can:[0,3,5,9,11,12],carnat:12,carnatic_str:5,carnatic_string_to_ql_arrai:12,categori:4,categorydata:4,cater:[7,12],central:12,centuri:1,chang:[0,6,12],check:[3,5,7,8,9],check_accuraci:8,check_break_point:8,child:8,choos:[7,8],chord:12,choriamb:[2,9],circul:7,classif:5,classmethod:[4,5,7,11],clear:6,clone:3,cluster:12,code:3,coeffic:7,coeffici:7,collect:[0,1,2,5,7,12],color:[0,7],column:4,com:[3,8],combin:[7,9],come:7,commit:3,common:8,compil:1,complet:8,compon:[8,12],compos:12,composit:[0,4,8,9,11,13],compositiondata:4,compound:8,concret:7,concretescal:7,connect:13,consecut:12,consist:[7,12],consol:12,contain:[0,7,13],content:[0,7,12],contigu:[0,9,12],contiguous_summ:[4,9,12],contour:[0,3],contour_a:7,contour_b:7,contour_class:7,contour_to_neum:7,contour_to_prime_contour:0,contour_to_schultz_prime_contour:0,contourexcept:7,contribut:[0,3],convent:12,convert:[7,12],cool:5,coolness_level:5,corpora:[0,3,4,5,6],corpora_model:3,correl:7,correspond:[5,8,13],cost:[0,8],cost_function_class:[0,4,8,9],costfunct:[0,8],costfunction2d:8,costfunction3d:[4,8,9],could:4,count:[7,12],counter:[5,12],creat:[0,4,7,11,12,13],create_extraction_databas:4,create_path_databas:4,create_tree_diagram:13,creation:13,cseg_data:12,current:[0,6,7,9],custom:0,custom_frag:[0,6],cycl:5,cyclic:5,cyclic_permut:5,dactyl:[2,8,9],data:[0,4,5,6,7,8,9,11,12,13],data_in:4,data_mod:12,databas:[1,2,3,5,11,12],databaseexcept:4,dataclass:0,dataset:[0,4,6,8,9,11],db_path:4,deal:7,decitala:[0,4,5,6,7,8,9,10,11,12,13],decitaladata:4,decitalaexcept:5,decitalahasht:[0,6],decl_api:4,def:[0,8],default_split_dict:8,defin:[5,11,12],definit:4,denomin:12,denomini:12,depth:7,desi:1,desir:[0,4,6],detect:[0,3,7,8,9],determin:[0,7,8,11],develop:3,deviat:[5,8],diagram:[11,13],dianapest:8,diaton:7,diatonic_scale_binari:7,dicret:8,dict:[4,6,7,8,12],dict_in:[6,7,12],dict_to_ordered_dict:12,dictionari:[4,6,7,8,9,12],didactyl:8,differ:[4,5,6,8,9,11,12],difference_tre:9,diiamb:[8,9],dijkstra:[0,3,4,9],dijkstra_best_source_and_sink:8,diproceleusmat:8,directori:[0,1,2,3,5,6,11,12],discov:3,displai:13,distanc:8,distribut:4,divid:12,divis:12,dochmiu:[2,8],docstr:5,document:[0,9],doe:[9,11],doesn:[6,8],don:[7,9],down:7,dpi:13,drop:3,dseg:[5,11,12],dual:5,duplic:7,durabl:4,durat:[5,9,12],dynam:[0,8],e501:12,each:[0,4,8,9,11,12],earliest:8,easier:3,edg:8,effect:9,effici:8,eighth:5,either:[5,7,8,11,12],element:[5,7,9,12],empti:12,encod:[1,2,3,4],end:[8,9,12,13],enforce_earliest_start:[4,8,9],enumer:2,epitrit:2,equal:[7,8,9,12],equival:0,erron:12,essen:5,establish:0,etc:[0,9,12],ethnolog:3,evalu:12,even:12,everi:[8,12],exampl:0,example_data2:12,example_data:12,example_frag:9,except:[4,5,6,7,9,11,12],exclud:[7,12],exclude_major_minor:7,exist:[0,6,7],express:[5,12],extract:[0,4,7,8,9,12,13],extractiondata:4,extrem:7,eye:7,factor:[0,4,5,6,8,9,12],fail:[7,9],fake:13,fals:[4,5,6,7,8,9,11,12,13],fast:0,faster:9,feel:3,feet:13,fermata:12,fht:6,file:[1,2,3,5,7,9,10,11,12,13],filenam:[0,5],filepath:[0,4,7,8,9,10,11,12,13],filter:12,filter_in_retrograd:12,filter_single_anga_class_frag:12,filter_sub_frag:12,find:[0,3,4,8,9,12],find_clust:12,find_possible_superdivis:12,first:[0,7,8,9,12],first_term:8,fix:8,flip:[0,13],floyd:[8,9],floyd_warshal:[3,9],folder:[11,13],follow:[0,3,8,12],foot:[4,5],forc:[6,9],force_overrid:6,form:[0,5,7,8,12],format:[7,8,12],found:7,four:8,frag:11,frag_typ:[9,11],fragment:[0,1,2,3,4,6,8,9,11,12,13],fragment_databas:11,fragment_rol:13,fragmentexcept:5,fragmenthasht:[0,4,6,9],fragments_db:[1,2,5],fragmenttre:[9,11,13],fragmenttreeexcept:11,frame:[4,9],frame_is_spanned_by_slur:9,frame_slur_count:9,frame_slur_start_end_count:9,frame_to_midi:9,frame_to_ql_arrai:9,free:3,from:[0,4,5,6,7,8,9,11,12,13],from_composit:11,from_extract:4,from_frag_typ:[9,11],from_multiple_path:11,from_str:7,full:13,fulli:12,further:7,futur:[0,8],gap:0,gap_weight:8,gener:[0,5,6,7,8,11,12],generalfrag:[0,5,6,8,9,11,12],generate_all_modif:6,generate_path:8,get:9,get_all_coeffici:7,get_break_point:8,get_by_id:5,get_by_ql_arrai:9,get_logg:[9,12],get_object_indic:[9,12],get_pareto_optimal_longest_path:8,get_path:8,get_shel:12,ght:[0,6,9],giant:7,git:3,github:3,give:11,given:[0,4,5,6,7,8,9,11,12,13],gladli:0,gmail:3,gold:0,grabe:5,grace:[9,12],graph:8,greatest:8,greek:[0,3,4,5,8,12,13],greek_foot:[0,6,9,11],greek_foot_ratio:11,greek_metr:5,greek_str:[0,5],greekfoot:[0,5,8,9,11,12],greekfootdata:4,greekfootexcept:5,greekfoothasht:[0,6],grid:8,harmon:0,harmoni:[3,7],has:13,hash:0,hash_tabl:[0,3,4,9],hashtableexcept:6,have:[5,12],heap:8,hear:[3,7],helper:[6,8,12],helpfulli:8,henc:8,here:[0,3,5,8],heurist:8,highli:[0,7],his:[0,1,3],hm_util:3,hmutilsexcept:7,hold:[0,4,6,7,8,9,11,12],home:3,hopefulli:8,how:3,html:[11,13],http:[3,8],hyperparamet:8,iamb:[0,2,8,9,12],id_:[4,8,9],id_num:5,ignor:12,ignore_grac:[9,12],ignore_grace_not:12,ignore_tuplet:12,iii:2,imag:11,implement:[0,7,8],includ:[0,7,8,9,13],include_rest:12,include_self:12,index:[3,8,9,13],india:1,indian:5,indic:[8,12],inform:[0,4,12],inherit:12,initi:5,inner:12,inord:5,input:[6,7,8,12,13],input_:12,input_data:8,input_id:5,insid:12,instanc:[0,6],instanti:0,instead:[7,12],integ:[7,9],intend:[4,13],interest:0,interpol:0,introduct:12,invalid:11,inwardli:7,ionic:2,ionic_major:11,is_color_mod:7,is_non_retrograd:5,is_spanned_by_slur:[4,8,9,12],is_sub_frag:5,issu:[3,5],item:7,iter:[7,8,12],its:[0,5,7,9,11],jaya:5,json:[4,9,12],just:6,kei:[4,7,8,11,12],kept:12,kessler:7,keyword:5,kind:[7,12],krumhansl:7,ks_diaton:7,kwarg:[4,5,8,11],lambda:[11,12],last:9,latest:8,latter:6,lavignac:5,legend:13,len:8,length:[2,4,5,7,9,12],less:8,let:9,letter:7,level:4,librari:[11,13],light:9,like:[0,3,7,12],limit:[0,7],line:13,link:8,list:[0,1,2,4,5,6,7,8,9,11,12,13],load:[0,6,9,12],loader:[9,12],local:4,local_filepath:4,locat:12,log:[4,8,9,12],logger:9,long_frag:12,longer:12,love:[3,9],low:5,lowest:[7,12],luke:[3,12],lukepoeppel:[0,3],m1t2:7,m2t2:0,m3t3:7,macdowel:12,macron:5,made:11,mahler:12,mai:7,major:[2,7],make:[3,12],make_2d_grid:8,make_3d_grid:8,make_4d_grid:8,manipul:0,manner:7,map:12,marker:12,marvin:12,massenet:12,match:7,materi:12,matra:5,matric:8,matrix:8,max_freq:10,maxim:5,mean:[5,8],meant:7,measur:12,measure_by_measure_time_signatur:12,measure_divider_mod:12,melod:0,melodi:[3,7],messag:[8,9],messiaen:[0,3,5,7,8,12],messiean:8,meter:12,meth:5,method:[0,4,5,6,7,11],metric:[0,3,8,12],midi:7,midi_start:7,min:8,mind:7,minim:8,minor:[2,7],mix:[0,6,12],mod:[9,12],mod_hierarchy_v:[4,8,9],mode:[0,7,8,12],model:4,modif:[0,6,7,9],modifi:[9,12],modification_hierarchi:6,modul:[0,3,6,7,11],moiseaux:[0,7],molt:[0,3],molt_queri:[0,7],molt_tonic_v:7,moltexcept:7,monoton:7,monteverdi:12,more:[0,4,7,12],morri:[0,5,7],morris_symmetry_class:5,most:[0,7,8],move:[7,8],mozart:12,multipl:[0,4,6,11,12],music21:[5,7,9,11,12],music:[0,3,5,7,12],musicolog:1,must:[0,5,8,9,12],mxtb:7,my_cost_funct:0,my_frag:0,my_fram:9,my_ht:0,mycooltre:11,myfirstcostfunct:8,myfrag:11,mynandi:5,mysecondcostfunct:8,mytre:11,name:[0,2,4,5,6,8,11,12],narytre:11,nativ:12,natur:7,navig:3,need:[3,8],neg:8,neither:[5,9],net:7,net_ql_arrai:12,neum:7,new_denomin:12,next:8,next_matrix:8,node:[8,11],nolan:5,non:[5,7,8,12],non_retrogradable_measur:12,none:[4,5,7,8,9,10,11,12,13],noqa:[7,8,9,12],nor:9,norm_val:7,normal:[0,4,7],normalize_pc_count:7,normalize_pitch_cont:7,normalizedcount:12,notabl:0,notat:12,note:[0,3,5,7,8,9,12],note_count:7,notimplementederror:5,npvi:5,num:4,num_anga_class:[5,12],num_matra:5,num_onset:[5,8],number:[0,4,5,7,8,9,11,12,13],numpi:[5,7,8,9,12],objec:7,object:[0,4,5,6,7,8,9,11,12,13],obviou:8,octav:7,odd:12,often:0,olivi:[0,3],one:[0,5,8,9],onli:[0,3,4,6,7,8,9,12],onset:[0,5,7,8,9,12],onset_list:8,onset_rang:[0,8,9,12],onset_start:4,onset_stop:4,onset_weight:8,optim:8,option:[5,7,9,11,12,13],order:[7,9,12],ordereddict:12,origin:[5,7,8],orm:4,other:[5,6,7,8],otherwis:[7,11,13],our:0,outer:12,output:[7,12],over:[7,8,12],overal:5,overlap:[8,9],overrid:[6,7,8],oversimplifi:[7,12],own:0,p70:12,packag:[0,3,11],page:3,palindrom:5,param:7,paramet:[0,4,5,6,7,8,9,11,12,13],pars:7,part:[0,4,7,8,9,11,12,13],part_num:[0,4,7,9,11,12,13],particular:6,particularli:[3,12],partit:[8,12],partition_data_by_break_point:8,path:[0,4,5,7,8,9,11,12,13],path_find:[0,3,4,9,13],path_finding_util:[0,3,4,9],pc_counter:7,pc_dict:7,pc_dict_to_vector:7,pc_vector:[0,7],pdf:11,pearson:7,peon:2,peon_check:6,peon_ii:11,peon_iv:[0,6],percept:12,permut:[5,7],phrase:12,phrase_divid:12,piano:13,pip3:3,pitch:[0,4,7,9,12],pitch_cont:[4,7,8,9,12],pitch_content_1:7,pitch_content_2:7,pitch_contour:7,plot:[10,13],plot_2d_search_result:13,plot_spectrogram:10,poeppel:3,pofp:3,point:[7,8],porrectu:7,possibl:[0,3,4,6,7,9,12],post:8,povel:5,power:12,power_list:12,pre:[0,3],pre_augment:5,pred:8,predecessor:8,present:12,pretti:5,previou:8,primarili:9,prime:[0,7],prime_contour:7,print:[0,5,7,8,9,11,12],print_to_consol:12,prior:8,probabl:[7,8,13],problem:[8,12],proceleusmat:8,process:[0,10],program:[0,8],progress:8,proper:3,properti:[5,7],proport:[7,12],prosod:[4,5,12,13],prosodic_frag:6,prosodicexcept:5,prosodicfrag:[0,5],prosodicfragmentdata:4,prosodicfragmenthasht:[0,6],provid:[0,1,2,5,7,8,9,13],provinc:1,prune:[0,7],pvalu:7,python:12,ql_arrai:[0,5,9,12],ql_array_to_carnatic_str:[5,12],ql_array_to_greek_diacrit:[5,12],ql_durat:5,ql_tupl:5,quarter:[2,5,7,9,12],quarterlength:[9,12],queri:[0,7,8],question:8,quick:9,ragavardhana:[0,5,6,11],rais:[5,11],random_fragment_path:5,rang:[0,5,7,9,12],ratio:[5,6,9,11,12],ratio_tre:[9,11],raynard:8,read:[5,7],readabl:[5,7,9,11],reconstruct:8,reconstruct_standard_path:8,reduc:[5,7,12],reduct:[0,7],refer:1,referenc:8,reframe_t:12,region:12,regular:[8,12],rel:12,relat:0,relev:[4,6],reli:[4,8],reload:6,remov:[7,12],renam:8,rep_typ:[9,11],repetit:7,repres:[4,5,7,12],represent:[9,11,12],requir:[4,8],resolut:8,respect:3,rest:12,restrict:0,result:[0,4,6,9,12,13],result_bar_plot:13,retriev:[5,9,12],retriv:8,retrograd:[0,4,5,6,8,9,12],return_count:7,return_list:8,return_ton:7,revers:12,rhythm:[2,3,12],rhythmic:[0,1,3,5,9,11,12],robert:[0,7],roll:[0,9,11,12,13],roll_window:12,rolling_hash_search:[0,7,9],rolling_search:[4,7,8,12],rolling_search_on_arrai:9,rolling_srr:12,rolling_tree_search:9,rsr:9,run:[3,6,9],s_i:8,sai:12,same:[0,12],samuel:7,satifi:12,save:[9,11,12,13],save_filepath:[9,13],save_path:[10,11,13],scale:[0,5,7,12],scatter:13,schmuckler:7,schultz:[0,7],schultz_prime_contour:7,schumckler:7,score:[0,4,5,9,13],search:[0,3,4,5,6,7,8,13],search_constraint:4,search_for_path:11,searchexcept:9,second:8,second_term:8,see:[0,3,4,5,7,9,12],seg:12,self:[0,5,8],sens:7,separ:12,sept:13,sequenc:12,set:[0,5,6,7,8,11,12],shell:12,should:[8,13],show:[8,11],shuffled_transcription_1:0,shuffled_transcription_2:9,signal:10,signatur:12,similarli:0,simpl:[0,7,8,12],simpler:9,simpli:6,singl:[4,7,12],singleton:12,sink:8,sit:12,size:[8,9,12],slur:9,slur_constraint:[4,8,9],slur_count:[4,8,9],slur_start_end_count:[4,8,9],solut:8,solv:8,some:[5,7,12],sort:[7,11,12],sourc:[3,4,5,6,7,8,9,10,11,12,13],sources_and_sink:8,sp_util:3,space:12,span:9,spanner:9,spearman:7,speci:4,special:12,specifi:0,spectrogram:10,split:[8,9],split_dict:[4,8,9],split_extract:8,sponde:[2,5,8,9,12],sql:4,sqlalchemi:4,srr:12,stackoverflow:8,stage:0,stai:7,standard:[0,5,7,8],start:[7,8,9,12,13],std:[0,5,8],std_weight:0,still:[0,12],store:[0,4,5,6,7,8,9,11,13],str:[4,5,7,9,11,12,13],str_in:7,stream:[5,12],stretch:6,stretch_aug:12,stretch_factor:12,string:[7,11,12],string_:12,strip:7,strip_monotonic_pitch_cont:7,structur:8,style:12,sub:[5,12],subcategori:4,subcategorydata:4,subclass:[0,6,9,11],subdivis:[0,6,9,12],success:12,successive_difference_arrai:[5,12],successive_ratio_arrai:[5,12],sue:12,suggest:3,sum:[7,8,12],sum_search:12,summat:[0,9,12],summer:8,support:[0,4,6,7,9,12],symmetri:[5,7],synopsia:7,tabl:[0,4,5,6,9],take:[3,12],tala:[5,12],tala_data:9,target:8,techniqu:[0,6,8],tempfil:13,tend:12,test1:8,test2:8,test:[0,9],test_all_coeffici:7,than:[7,8,9,12],thei:[1,2,13],them:[0,3,6],therefor:7,thi:[0,3,4,5,6,7,8,9,11,12,13],thing:4,this_cycl:5,this_fram:12,this_object:12,those:8,three:[7,8],through:[0,9],ties:[7,9],time:12,timesignatur:12,titl:[10,13],todo:[4,8],togeth:9,tonal:12,tone:7,tonic:7,tonic_valu:7,tool:[3,7,9,12],toolkit:3,total:7,toward:12,training_data:8,transcript:4,transcription_mod:13,transcriptiondata:4,transform:[0,12],transform_to_time_scal:12,translat:7,transliter:5,transposit:[0,7],treant:[11,13],treatis:1,tree:[3,9,13],treeexcept:11,treeplott:11,triiamb:8,triproceleusmat:8,trivial:5,troche:[0,2,8,9,12],try_contiguous_summ:9,try_retrograd:[5,6],tupl:[5,7,8,9,12],tuplet:12,turn:12,two:[7,8,12],type:[0,5,6,7,8,9,11,12,13],udikshana:12,uds_contour:7,understand:7,uniqu:5,unless:[7,12],unnam:9,unnecessari:7,until:[6,7],usag:3,use:[0,3,6,8,12],used:[0,3,4,7,8,9,12,13],useful:[3,9,12],user:[0,4,5,6,8],uses:11,using:[0,7,8,9,11,13],usual:13,util:[3,5,7,9],utilsexcept:12,valu:[4,5,7,8,12],varied_ragavardhana:12,variou:0,vector:7,verbos:[4,8,9,11,13],veri:9,version:3,vertex:8,vertex_1:8,vertex_2:8,vertex_a:[0,8],vertex_b:[0,8],vertic:8,via:8,vis:[3,11],visual:13,vivid:7,vstack:12,wai:9,wand:11,want:[6,12],warn:9,warshal:[8,9],webshot:[11,13],weight:[7,8],weight_a:8,weight_b:8,weird:7,well:[0,13],were:[1,9],when:[4,5,7,9],where:[0,12,13],whether:[4,5,6,7,8,9,12,13],which:[1,5,7,8,9,12,13],window:[0,4,9,11,12],window_s:12,within:9,without:4,work:[3,7,9,12],would:0,write:12,write_analysi:12,write_to_fil:12,written:3,xml:[0,1,2,5,9],xxx:5,xxxxxx:5,xyx:5,xyyyx:5,xyz:5,yet:6,you:[0,3,6],zero:12},titles:["Basic Usage","Des\u012bt\u0101las","Greek Metrics","Decitala Documentation","database","fragment","hash_table","hm","path_finding","search","sp","trees","utils","vis"],titleterms:{"des\u012bt\u0101la":1,basic:0,contour:7,corpora_model:4,databas:4,decitala:3,dijkstra:8,document:3,floyd_warshal:8,fragment:5,greek:2,harmoni:0,hash_tabl:6,hm_util:7,indic:3,instal:3,melodi:0,metric:2,molt:7,path_find:8,path_finding_util:8,pofp:8,rhythm:0,search:9,sp_util:10,tabl:3,tool:0,tree:11,tutori:3,usag:0,util:12,vis:13}}) \ No newline at end of file