src package#
Subpackages#
- src.clean package
- Submodules
- src.clean.clean_utils module
HidePrintsItemMakerYtDlpFakeLogger_DemucsMaker_DemucsMaker._download_audio_excerpt_from_youtube()_DemucsMaker._get_valid_links()_DemucsMaker._logger_wrapper()_DemucsMaker._split_left_right_audio_channels()_DemucsMaker.abs_tol_DemucsMaker.cleanup_post_separation()_DemucsMaker.finalize_output()_DemucsMaker.fmt_DemucsMaker.fname_DemucsMaker.get_cmd()_DemucsMaker.get_item()_DemucsMaker.get_lr_audio_DemucsMaker.in_file_DemucsMaker.instrs_DemucsMaker.run_separation()_DemucsMaker.separate_audio()_DemucsMaker.use_demucs_DemucsMaker.use_mvsep_DemucsMaker.use_spleeter_DemucsMaker.ydl_opts
_MVSEPMaker_MVSEPMaker.LOAD_KWS_MVSEPMaker.MVSEP_KWARGS_MVSEPMaker.MVSEP_LOCATION_MVSEPMaker._download_audio_excerpt_from_youtube()_MVSEPMaker._get_valid_links()_MVSEPMaker._logger_wrapper()_MVSEPMaker._split_left_right_audio_channels()_MVSEPMaker.abs_tol_MVSEPMaker.align_audio_signals()_MVSEPMaker.calculate_best_shift()_MVSEPMaker.cleanup_post_separation()_MVSEPMaker.finalize_output()_MVSEPMaker.fmt_MVSEPMaker.fname_MVSEPMaker.get_cmd()_MVSEPMaker.get_files_to_keep()_MVSEPMaker.get_item()_MVSEPMaker.get_lr_audio_MVSEPMaker.in_file_MVSEPMaker.instrs_MVSEPMaker.rename_piano_file()_MVSEPMaker.run_separation()_MVSEPMaker.separate_audio()_MVSEPMaker.shift_audio_signal()_MVSEPMaker.use_demucs_MVSEPMaker.use_mvsep_MVSEPMaker.use_spleeter_MVSEPMaker.ydl_opts
_SpleeterMaker_SpleeterMaker._download_audio_excerpt_from_youtube()_SpleeterMaker._get_valid_links()_SpleeterMaker._logger_wrapper()_SpleeterMaker._split_left_right_audio_channels()_SpleeterMaker.abs_tol_SpleeterMaker.cleanup_post_separation()_SpleeterMaker.finalize_output()_SpleeterMaker.fmt_SpleeterMaker.fname_SpleeterMaker.get_cmd()_SpleeterMaker.get_item()_SpleeterMaker.get_lr_audio_SpleeterMaker.in_file_SpleeterMaker.instrs_SpleeterMaker.run_separation()_SpleeterMaker.separate_audio()_SpleeterMaker.use_demucs_SpleeterMaker.use_mvsep_SpleeterMaker.use_spleeter_SpleeterMaker.ydl_opts
return_timestamp()
- src.clean.make_dataset module
- Module contents
- src.detect package
- Submodules
- src.detect.midi_utils module
IntervalMIDIMakerMelodyMakerMelodyMaker.MIDDLE_CMelodyMaker.SHORTEST_RHYTHMMelodyMaker.TIME_THRESHMelodyMaker._extract_highest_note()MelodyMaker._quantize_notes_in_beat()MelodyMaker._remove_iois_below_threshold()MelodyMaker._remove_pitches_below_threshold()MelodyMaker.chunk_melody()MelodyMaker.extract_intervals()MelodyMaker.extract_melody()MelodyMaker.load_midi()
Notegroup_onsets()
- src.detect.onset_utils module
ClickTrackMakerOnsetMakerOnsetMaker._get_channel_override_fpath()OnsetMaker._load_audio()OnsetMaker.beat_track_rnn()OnsetMaker.compare_downbeats()OnsetMaker.compare_onset_detection_accuracy()OnsetMaker.detection_note_valuesOnsetMaker.extract_downbeats()OnsetMaker.finalize_output()OnsetMaker.format_arg()OnsetMaker.generate_click_track()OnsetMaker.generate_matched_onsets_dictionary()OnsetMaker.get_nonsilent_sections()OnsetMaker.get_signal_to_noise_ratio()OnsetMaker.get_silent_track_percent()OnsetMaker.get_spectral_flatness()OnsetMaker.match_onsets_and_beats()OnsetMaker.onset_detect_cnn()OnsetMaker.process_mixed_audio()OnsetMaker.process_separated_audio()OnsetMaker.remove_onsets_in_silent_passages()OnsetMaker.return_converged_parameters_cnn()OnsetMaker.save_annotations()OnsetMaker.top_dbOnsetMaker.window
bandpass_filter()calculate_tempo()create_silent_clicktrack()
- src.detect.optimise_detection_parameters module
OptimizeBeatTrackRNNOptimizeBeatTrackRNN.analyze_track()OptimizeBeatTrackRNN.argsOptimizeBeatTrackRNN.audio_cutoffOptimizeBeatTrackRNN.csv_nameOptimizeBeatTrackRNN.enable_logger()OptimizeBeatTrackRNN.get_f_score()OptimizeBeatTrackRNN.instrOptimizeBeatTrackRNN.joblib_backendOptimizeBeatTrackRNN.log_iteration()OptimizeBeatTrackRNN.lookup_results_from_cache()OptimizeBeatTrackRNN.n_jobsOptimizeBeatTrackRNN.objective_function()OptimizeBeatTrackRNN.return_kwargs()OptimizeBeatTrackRNN.run_optimization()
OptimizeOnsetDetectCNNOptimizeOnsetDetectCNN.analyze_track()OptimizeOnsetDetectCNN.argsOptimizeOnsetDetectCNN.audio_cutoffOptimizeOnsetDetectCNN.csv_nameOptimizeOnsetDetectCNN.enable_logger()OptimizeOnsetDetectCNN.fpsOptimizeOnsetDetectCNN.get_f_score()OptimizeOnsetDetectCNN.joblib_backendOptimizeOnsetDetectCNN.log_iteration()OptimizeOnsetDetectCNN.lookup_results_from_cache()OptimizeOnsetDetectCNN.n_jobsOptimizeOnsetDetectCNN.objective_function()OptimizeOnsetDetectCNN.return_kwargs()OptimizeOnsetDetectCNN.run_optimization()
OptimizerOptimizer.analyze_track()Optimizer.audio_cutoffOptimizer.csv_nameOptimizer.enable_logger()Optimizer.get_f_score()Optimizer.joblib_backendOptimizer.log_iteration()Optimizer.lookup_results_from_cache()Optimizer.n_jobsOptimizer.objective_function()Optimizer.return_kwargs()Optimizer.run_optimization()
optimize_beat_tracking()optimize_onset_detection_cnn()
- src.detect.process_dataset module
- Module contents
- src.features package
- Submodules
- src.features.features_utils module
- src.features.melody_features module
ContourExtractorIntervalExtractorMelodyChunkManagerPitchExtractorTonalityExtractorTonalityExtractor.MAJ_PROFILETonalityExtractor.MIN_PROFILETonalityExtractor.count_nonzero()TonalityExtractor.get_between()TonalityExtractor.krumhansl_schmuckler()TonalityExtractor.quantile25()TonalityExtractor.quantile75()TonalityExtractor.truncate_df()TonalityExtractor.update_summary_dict()
- src.features.rhythm_features module
AsynchronyAsynchrony.count_nonzero()Asynchrony.extract_asynchronies()Asynchrony.get_between()Asynchrony.groupwise_asynchronization()Asynchrony.mean_absolute_asynchrony()Asynchrony.mean_pairwise_asynchrony()Asynchrony.mean_relative_asynchrony()Asynchrony.pairwise_asynchronization()Asynchrony.quantile25()Asynchrony.quantile75()Asynchrony.truncate_df()Asynchrony.update_summary_dict()
BeatUpbeatRatioIOIComplexityIOIComplexity._bin_ioi()IOIComplexity._get_summary_dict()IOIComplexity.alphabetIOIComplexity.bin_iois()IOIComplexity.col_namesIOIComplexity.count_nonzero()IOIComplexity.extract_complexity()IOIComplexity.fracsIOIComplexity.get_between()IOIComplexity.lz77_compress()IOIComplexity.quantile25()IOIComplexity.quantile75()IOIComplexity.truncate_df()IOIComplexity.update_summary_dict()
PhaseCorrectionPhaseCorrection.count_nonzero()PhaseCorrection.extract_model_coefficients()PhaseCorrection.format_array()PhaseCorrection.format_async_arrays()PhaseCorrection.generate_model()PhaseCorrection.get_between()PhaseCorrection.quantile25()PhaseCorrection.quantile75()PhaseCorrection.shifter()PhaseCorrection.truncate()PhaseCorrection.truncate_df()PhaseCorrection.update_summary_dict()
ProportionalAsynchronyProportionalAsynchrony.LOWER_BOUNDProportionalAsynchrony.REF_INSTRProportionalAsynchrony.UPPER_BOUNDProportionalAsynchrony._extract_async_stats()ProportionalAsynchrony._extract_proportional_durations()ProportionalAsynchrony._format_async_df()ProportionalAsynchrony.count_nonzero()ProportionalAsynchrony.get_between()ProportionalAsynchrony.quantile25()ProportionalAsynchrony.quantile75()ProportionalAsynchrony.truncate_df()ProportionalAsynchrony.update_summary_dict()
RollingIOISummaryStatsRollingIOISummaryStats.binary_entropy()RollingIOISummaryStats.count_nonzero()RollingIOISummaryStats.extract_rolling_statistics()RollingIOISummaryStats.get_between()RollingIOISummaryStats.lempel_ziv_complexity()RollingIOISummaryStats.npvi()RollingIOISummaryStats.quantile25()RollingIOISummaryStats.quantile75()RollingIOISummaryStats.truncate_df()RollingIOISummaryStats.update_summary_dict()
TempoSlopeget_beats_from_matched_onsets()
- src.features.simulations_utils module
- Module contents
- src.visualise package
- Submodules
- src.visualise.asynchrony_plots module
BarPlotProportionalAsynchronyBarPlotProportionalAsynchrony.BAR_KWSBarPlotProportionalAsynchrony.ERROR_KWSBarPlotProportionalAsynchrony._add_notation_vals()BarPlotProportionalAsynchrony._bootstrap()BarPlotProportionalAsynchrony._bootstrap_errorbars()BarPlotProportionalAsynchrony._create_plot()BarPlotProportionalAsynchrony._format_ax()BarPlotProportionalAsynchrony._format_fig()BarPlotProportionalAsynchrony.axBarPlotProportionalAsynchrony.create_plot()BarPlotProportionalAsynchrony.dfBarPlotProportionalAsynchrony.figBarPlotProportionalAsynchrony.gBarPlotProportionalAsynchrony.output_dir
HistPlotProportionalAsynchronyHistPlotProportionalAsynchrony.FILL_KWSHistPlotProportionalAsynchrony.PLOT_KWSHistPlotProportionalAsynchrony.VLINE_KWSHistPlotProportionalAsynchrony._add_images()HistPlotProportionalAsynchrony._create_plot()HistPlotProportionalAsynchrony._find_peaks()HistPlotProportionalAsynchrony._format_ax()HistPlotProportionalAsynchrony._format_fig()HistPlotProportionalAsynchrony._kde()HistPlotProportionalAsynchrony.axHistPlotProportionalAsynchrony.create_plot()HistPlotProportionalAsynchrony.dfHistPlotProportionalAsynchrony.figHistPlotProportionalAsynchrony.gHistPlotProportionalAsynchrony.output_dir
HistPlotProportionalAsynchronyTriosPianoHistPlotProportionalAsynchronyTriosPiano.FILL_KWSHistPlotProportionalAsynchronyTriosPiano.PLOT_KWSHistPlotProportionalAsynchronyTriosPiano.VLINE_KWSHistPlotProportionalAsynchronyTriosPiano.XTICKLABELSHistPlotProportionalAsynchronyTriosPiano.XTICKSHistPlotProportionalAsynchronyTriosPiano._add_bandleader_images()HistPlotProportionalAsynchronyTriosPiano._add_notation_images()HistPlotProportionalAsynchronyTriosPiano._create_plot()HistPlotProportionalAsynchronyTriosPiano._format_ax()HistPlotProportionalAsynchronyTriosPiano._format_fig()HistPlotProportionalAsynchronyTriosPiano._kde()HistPlotProportionalAsynchronyTriosPiano.axHistPlotProportionalAsynchronyTriosPiano.create_plot()HistPlotProportionalAsynchronyTriosPiano.dfHistPlotProportionalAsynchronyTriosPiano.figHistPlotProportionalAsynchronyTriosPiano.gHistPlotProportionalAsynchronyTriosPiano.img_locHistPlotProportionalAsynchronyTriosPiano.output_dir
PolarPlotAsynchronyPolarPlotAsynchrony.ARROW_KWSPolarPlotAsynchrony.CIRCLE_FILL_KWSPolarPlotAsynchrony.CIRCLE_LINE_KWSPolarPlotAsynchrony.CIRCLE_PADDINGPolarPlotAsynchrony.CIRCLE_PADDING_RANGEPolarPlotAsynchrony.FILL_KWSPolarPlotAsynchrony.KDE_BANDWIDTHPolarPlotAsynchrony.LINE_KWSPolarPlotAsynchrony._add_center_circle()PolarPlotAsynchrony._create_plot()PolarPlotAsynchrony._format_ax()PolarPlotAsynchrony._format_fig()PolarPlotAsynchrony._format_ticks()PolarPlotAsynchrony._kde()PolarPlotAsynchrony.axPolarPlotAsynchrony.create_plot()PolarPlotAsynchrony.dfPolarPlotAsynchrony.figPolarPlotAsynchrony.gPolarPlotAsynchrony.output_dir
RegPlotPianistAsynchronyRegPlotPianistAsynchrony.BIN_MULTIPLERRegPlotPianistAsynchrony.FILL_KWSRegPlotPianistAsynchrony.FORMULARegPlotPianistAsynchrony.HIST_KWSRegPlotPianistAsynchrony.LINE_KWSRegPlotPianistAsynchrony.N_BOOTRegPlotPianistAsynchrony.RE_STRUCTRegPlotPianistAsynchrony.SCATTER_KWSRegPlotPianistAsynchrony._add_notation_vals()RegPlotPianistAsynchrony._create_main_plot()RegPlotPianistAsynchrony._create_marginal_plots()RegPlotPianistAsynchrony._create_plot()RegPlotPianistAsynchrony._format_ax()RegPlotPianistAsynchrony._format_bootstrap_lines()RegPlotPianistAsynchrony._format_fig()RegPlotPianistAsynchrony._format_main_ax()RegPlotPianistAsynchrony._format_marginal_ax()RegPlotPianistAsynchrony._get_bootstrapped_sample()RegPlotPianistAsynchrony._get_line()RegPlotPianistAsynchrony._mixedlm()RegPlotPianistAsynchrony.axRegPlotPianistAsynchrony.create_plot()RegPlotPianistAsynchrony.dfRegPlotPianistAsynchrony.figRegPlotPianistAsynchrony.gRegPlotPianistAsynchrony.output_dir
ScatterPlotAsynchronyTrackScatterPlotAsynchronyTrack._create_plot()ScatterPlotAsynchronyTrack._format_ax()ScatterPlotAsynchronyTrack._format_fig()ScatterPlotAsynchronyTrack.axScatterPlotAsynchronyTrack.create_plot()ScatterPlotAsynchronyTrack.dfScatterPlotAsynchronyTrack.figScatterPlotAsynchronyTrack.format_df()ScatterPlotAsynchronyTrack.gScatterPlotAsynchronyTrack.output_dirScatterPlotAsynchronyTrack.wraparound
- src.visualise.bur_plots module
BarPlotBURHistPlotBURByInstrumentHistPlotBURByInstrument.BURS_WITH_IMAGESHistPlotBURByInstrument.HIST_KWSHistPlotBURByInstrument.KDE_KWSHistPlotBURByInstrument.VLINE_KWSHistPlotBURByInstrument._add_peaks()HistPlotBURByInstrument._create_plot()HistPlotBURByInstrument._format_ax()HistPlotBURByInstrument._format_fig()HistPlotBURByInstrument._kde()HistPlotBURByInstrument.add_bur_images()HistPlotBURByInstrument.axHistPlotBURByInstrument.create_plot()HistPlotBURByInstrument.dfHistPlotBURByInstrument.figHistPlotBURByInstrument.gHistPlotBURByInstrument.output_dir
HistPlotBURTrackHistPlotBURTrack.BURS_WITH_IMAGESHistPlotBURTrack.HIST_KWSHistPlotBURTrack.KDE_KWSHistPlotBURTrack.VLINE_KWSHistPlotBURTrack._add_peaks()HistPlotBURTrack._create_plot()HistPlotBURTrack._format_ax()HistPlotBURTrack._format_fig()HistPlotBURTrack._kde()HistPlotBURTrack.add_bur_images()HistPlotBURTrack.axHistPlotBURTrack.create_plot()HistPlotBURTrack.dfHistPlotBURTrack.figHistPlotBURTrack.format_df()HistPlotBURTrack.gHistPlotBURTrack.output_dir
RegPlotBURTempoRegPlotBURTempo.BIN_MULTIPLERRegPlotBURTempo.BURS_WITH_IMAGESRegPlotBURTempo.BUR_THRESHOLDRegPlotBURTempo.FILL_KWSRegPlotBURTempo.HIST_KWSRegPlotBURTempo.LINE_KWSRegPlotBURTempo.MODELRegPlotBURTempo.N_BOOTRegPlotBURTempo.RE_FORMULARegPlotBURTempo.SCATTER_KWSRegPlotBURTempo._create_main_plot()RegPlotBURTempo._create_marginal_plots()RegPlotBURTempo._create_plot()RegPlotBURTempo._format_ax()RegPlotBURTempo._format_bootstrap_lines()RegPlotBURTempo._format_df()RegPlotBURTempo._format_fig()RegPlotBURTempo._format_main_ax()RegPlotBURTempo._format_marginal_ax()RegPlotBURTempo._get_bootstrapped_sample()RegPlotBURTempo._get_line()RegPlotBURTempo._mixedlm()RegPlotBURTempo.add_bur_images()RegPlotBURTempo.axRegPlotBURTempo.create_plot()RegPlotBURTempo.dfRegPlotBURTempo.figRegPlotBURTempo.gRegPlotBURTempo.output_dir
ViolinPlotBURsViolinPlotBURs.BURS_WITH_IMAGESViolinPlotBURs.EBAR_KWSViolinPlotBURs.PALViolinPlotBURs.SCAT_KWSViolinPlotBURs.VP_KWSViolinPlotBURs._add_bandleader_images()ViolinPlotBURs._add_nburs_to_tick()ViolinPlotBURs._create_plot()ViolinPlotBURs._format_ax()ViolinPlotBURs._format_fig()ViolinPlotBURs.add_bur_images()ViolinPlotBURs.axViolinPlotBURs.create_plot()ViolinPlotBURs.dfViolinPlotBURs.figViolinPlotBURs.gViolinPlotBURs.img_locViolinPlotBURs.output_dir
- src.visualise.complexity_plots module
BarPlotComplexityDensityBarPlotComplexityDensity.BAR_KWSBarPlotComplexityDensity._create_plot()BarPlotComplexityDensity._format_ax()BarPlotComplexityDensity._format_fig()BarPlotComplexityDensity.axBarPlotComplexityDensity.create_plot()BarPlotComplexityDensity.dfBarPlotComplexityDensity.figBarPlotComplexityDensity.gBarPlotComplexityDensity.output_dir
BarPlotTotalBinsBarPlotTotalBins.BAR_KWSBarPlotTotalBins._add_notation_images()BarPlotTotalBins._create_plot()BarPlotTotalBins._format_ax()BarPlotTotalBins._format_fig()BarPlotTotalBins.axBarPlotTotalBins.create_plot()BarPlotTotalBins.dfBarPlotTotalBins.figBarPlotTotalBins.gBarPlotTotalBins.img_locBarPlotTotalBins.output_dir
HistPlotBinsHistPlotBinsTrackHistPlotBinsTrack.HIST_KWSHistPlotBinsTrack.LINE_KWSHistPlotBinsTrack.PALETTEHistPlotBinsTrack.VLINE_KWSHistPlotBinsTrack._create_plot()HistPlotBinsTrack._format_ax()HistPlotBinsTrack._format_df()HistPlotBinsTrack._format_fig()HistPlotBinsTrack._kde()HistPlotBinsTrack.axHistPlotBinsTrack.create_plot()HistPlotBinsTrack.dfHistPlotBinsTrack.figHistPlotBinsTrack.gHistPlotBinsTrack.output_dir
RegPlotTempoDensityComplexityRegPlotTempoDensityComplexity.HIST_KWSRegPlotTempoDensityComplexity.LINE_KWSRegPlotTempoDensityComplexity.REG_KWSRegPlotTempoDensityComplexity.SCATTER_KWSRegPlotTempoDensityComplexity.TEXT_BBOXRegPlotTempoDensityComplexity._add_regression_coeff()RegPlotTempoDensityComplexity._create_main_plot()RegPlotTempoDensityComplexity._create_marginal_plot()RegPlotTempoDensityComplexity._create_plot()RegPlotTempoDensityComplexity._format_ax()RegPlotTempoDensityComplexity._format_fig()RegPlotTempoDensityComplexity._format_main_ax()RegPlotTempoDensityComplexity._format_marginal_ax()RegPlotTempoDensityComplexity.axRegPlotTempoDensityComplexity.create_plot()RegPlotTempoDensityComplexity.dfRegPlotTempoDensityComplexity.figRegPlotTempoDensityComplexity.gRegPlotTempoDensityComplexity.output_dir
ViolinPlotOnsetComplexityViolinPlotOnsetComplexity.EBAR_KWSViolinPlotOnsetComplexity.KDE_KWSViolinPlotOnsetComplexity.PALViolinPlotOnsetComplexity.SCAT_KWSViolinPlotOnsetComplexity._add_bandleader_images()ViolinPlotOnsetComplexity._create_plot()ViolinPlotOnsetComplexity._format_ax()ViolinPlotOnsetComplexity._format_df()ViolinPlotOnsetComplexity._format_fig()ViolinPlotOnsetComplexity.axViolinPlotOnsetComplexity.create_plot()ViolinPlotOnsetComplexity.dfViolinPlotOnsetComplexity.figViolinPlotOnsetComplexity.gViolinPlotOnsetComplexity.img_locViolinPlotOnsetComplexity.output_dir
- src.visualise.coordination_plots module
BarPlotCouplingCoefficientsBarPlotCouplingCoefficients.BAR_KWSBarPlotCouplingCoefficients._create_plot()BarPlotCouplingCoefficients._format_ax()BarPlotCouplingCoefficients._format_fig()BarPlotCouplingCoefficients.axBarPlotCouplingCoefficients.create_plot()BarPlotCouplingCoefficients.dfBarPlotCouplingCoefficients.figBarPlotCouplingCoefficients.gBarPlotCouplingCoefficients.output_dir
BarPlotModelComparisonBarPlotModelComparison.BAR_KWSBarPlotModelComparison._create_plot()BarPlotModelComparison._format_ax()BarPlotModelComparison._format_fig()BarPlotModelComparison.axBarPlotModelComparison.create_plot()BarPlotModelComparison.dfBarPlotModelComparison.figBarPlotModelComparison.gBarPlotModelComparison.output_dir
BarPlotSimulationComparisonBarPlotSimulationComparison.BAR_KWSBarPlotSimulationComparison.HATCHESBarPlotSimulationComparison.PALBarPlotSimulationComparison.TRIANGLE_KWSBarPlotSimulationComparison._create_plot()BarPlotSimulationComparison._format_ax()BarPlotSimulationComparison._format_df()BarPlotSimulationComparison._format_fig()BarPlotSimulationComparison._format_params()BarPlotSimulationComparison.axBarPlotSimulationComparison.create_plot()BarPlotSimulationComparison.dfBarPlotSimulationComparison.figBarPlotSimulationComparison.gBarPlotSimulationComparison.output_dir
HistPlotCouplingTermsHistPlotCouplingTerms.HIST_KWSHistPlotCouplingTerms.KDE_KWSHistPlotCouplingTerms.TITLESHistPlotCouplingTerms._create_plot()HistPlotCouplingTerms._format_ax()HistPlotCouplingTerms._format_fig()HistPlotCouplingTerms._hist()HistPlotCouplingTerms._kde()HistPlotCouplingTerms.axHistPlotCouplingTerms.create_plot()HistPlotCouplingTerms.dfHistPlotCouplingTerms.figHistPlotCouplingTerms.gHistPlotCouplingTerms.output_dir
RegPlotCouplingGrangerCrossRegPlotCouplingGrangerCross.COUPLING_COLSRegPlotCouplingGrangerCross.CROSS_COLSRegPlotCouplingGrangerCross.GRANGER_COLSRegPlotCouplingGrangerCross.HIST_KWSRegPlotCouplingGrangerCross.LINE_KWSRegPlotCouplingGrangerCross.REG_KWSRegPlotCouplingGrangerCross.SCATTER_KWSRegPlotCouplingGrangerCross.TEXT_BBOXRegPlotCouplingGrangerCross._add_regression_coeff()RegPlotCouplingGrangerCross._create_main_plot()RegPlotCouplingGrangerCross._create_marginal_plot()RegPlotCouplingGrangerCross._create_plot()RegPlotCouplingGrangerCross._format_ax()RegPlotCouplingGrangerCross._format_df()RegPlotCouplingGrangerCross._format_fig()RegPlotCouplingGrangerCross._format_main_ax()RegPlotCouplingGrangerCross._format_marginal_ax()RegPlotCouplingGrangerCross.axRegPlotCouplingGrangerCross.create_plot()RegPlotCouplingGrangerCross.dfRegPlotCouplingGrangerCross.figRegPlotCouplingGrangerCross.gRegPlotCouplingGrangerCross.output_dir
RegPlotCouplingHalvesRegPlotCouplingHalves.HIST_KWSRegPlotCouplingHalves.LINE_KWSRegPlotCouplingHalves.REG_KWSRegPlotCouplingHalves.SCATTER_KWSRegPlotCouplingHalves.TEXT_BBOXRegPlotCouplingHalves._add_regression_text()RegPlotCouplingHalves._create_main_plot()RegPlotCouplingHalves._create_marginal_plot()RegPlotCouplingHalves._create_plot()RegPlotCouplingHalves._format_ax()RegPlotCouplingHalves._format_fig()RegPlotCouplingHalves._format_main_ax()RegPlotCouplingHalves._format_marginal_ax()RegPlotCouplingHalves.axRegPlotCouplingHalves.create_plot()RegPlotCouplingHalves.dfRegPlotCouplingHalves.figRegPlotCouplingHalves.gRegPlotCouplingHalves.output_dir
TriangleAxisTrianglePlotChronologyTrianglePlotTrackTrianglePlotTrack.BAR_KWSTrianglePlotTrack._create_plot()TrianglePlotTrack._format_ax()TrianglePlotTrack._format_bar_df()TrianglePlotTrack._format_df()TrianglePlotTrack._format_fig()TrianglePlotTrack.axTrianglePlotTrack.create_plot()TrianglePlotTrack.dfTrianglePlotTrack.figTrianglePlotTrack.gTrianglePlotTrack.output_dir
- src.visualise.corpus_plots module
BarPlotBandleaderDurationBarPlotBandleaderDuration.BAR_KWSBarPlotBandleaderDuration._create_plot()BarPlotBandleaderDuration._format_ax()BarPlotBandleaderDuration._format_df()BarPlotBandleaderDuration._format_fig()BarPlotBandleaderDuration.abbreviate()BarPlotBandleaderDuration.axBarPlotBandleaderDuration.create_plot()BarPlotBandleaderDuration.dfBarPlotBandleaderDuration.figBarPlotBandleaderDuration.gBarPlotBandleaderDuration.initials()BarPlotBandleaderDuration.output_dir
BarPlotCorpusDurationBarPlotCorpusDuration.BAR_KWSBarPlotCorpusDuration.PERC_KWSBarPlotCorpusDuration._add_bandleader_images()BarPlotCorpusDuration._add_percentage()BarPlotCorpusDuration._create_plot()BarPlotCorpusDuration._format_ax()BarPlotCorpusDuration._format_df()BarPlotCorpusDuration._format_fig()BarPlotCorpusDuration.axBarPlotCorpusDuration.create_plot()BarPlotCorpusDuration.dfBarPlotCorpusDuration.figBarPlotCorpusDuration.gBarPlotCorpusDuration.img_locBarPlotCorpusDuration.output_dir
BarPlotFScoresBarPlotLastFMStreamsBarPlotLastFMStreams.BAR_KWSBarPlotLastFMStreams.PALBarPlotLastFMStreams._create_plot()BarPlotLastFMStreams._format_ax()BarPlotLastFMStreams._format_fig()BarPlotLastFMStreams.axBarPlotLastFMStreams.create_plot()BarPlotLastFMStreams.dfBarPlotLastFMStreams.figBarPlotLastFMStreams.gBarPlotLastFMStreams.output_dir
BarPlotSoloDurationBarPlotSoloDuration.BAR_KWSBarPlotSoloDuration.PALBarPlotSoloDuration._create_plot()BarPlotSoloDuration._format_ax()BarPlotSoloDuration._format_fig()BarPlotSoloDuration.axBarPlotSoloDuration.create_plot()BarPlotSoloDuration.dfBarPlotSoloDuration.figBarPlotSoloDuration.format_func()BarPlotSoloDuration.gBarPlotSoloDuration.output_dir
BarPlotSubjectiveRatingsBarPlotSubjectiveRatings.BAR_KWSBarPlotSubjectiveRatings.COLSBarPlotSubjectiveRatings.HATCHESBarPlotSubjectiveRatings._create_plot()BarPlotSubjectiveRatings._format_ax()BarPlotSubjectiveRatings._format_df()BarPlotSubjectiveRatings._format_fig()BarPlotSubjectiveRatings._get_color()BarPlotSubjectiveRatings._get_legend_handles()BarPlotSubjectiveRatings.axBarPlotSubjectiveRatings.create_plot()BarPlotSubjectiveRatings.dfBarPlotSubjectiveRatings.figBarPlotSubjectiveRatings.gBarPlotSubjectiveRatings.output_dir
BoxPlotRecordingLengthBoxPlotRecordingLength.PALBoxPlotRecordingLength.TICKSBoxPlotRecordingLength._add_bandleader_images()BoxPlotRecordingLength._add_number_of_tracks()BoxPlotRecordingLength._create_plot()BoxPlotRecordingLength._format_ax()BoxPlotRecordingLength._format_bandleader()BoxPlotRecordingLength._format_fig()BoxPlotRecordingLength._format_time()BoxPlotRecordingLength.axBoxPlotRecordingLength.create_plot()BoxPlotRecordingLength.dfBoxPlotRecordingLength.figBoxPlotRecordingLength.gBoxPlotRecordingLength.img_locBoxPlotRecordingLength.output_dir
CountPlotPanningHistPlotRecordingYearHistPlotRecordingYear.BAR_KWSHistPlotRecordingYear._create_plot()HistPlotRecordingYear._format_ax()HistPlotRecordingYear._format_df()HistPlotRecordingYear._format_fig()HistPlotRecordingYear.axHistPlotRecordingYear.create_plot()HistPlotRecordingYear.dfHistPlotRecordingYear.figHistPlotRecordingYear.gHistPlotRecordingYear.output_dir
LinePlotOptimizationIterationsLinePlotOptimizationIterations.LINE_KWSLinePlotOptimizationIterations.ORDERLinePlotOptimizationIterations.SCATTER_KWSLinePlotOptimizationIterations._create_plot()LinePlotOptimizationIterations._format_ax()LinePlotOptimizationIterations._format_df()LinePlotOptimizationIterations._format_fig()LinePlotOptimizationIterations._format_legend()LinePlotOptimizationIterations.axLinePlotOptimizationIterations.create_plot()LinePlotOptimizationIterations.dfLinePlotOptimizationIterations.figLinePlotOptimizationIterations.gLinePlotOptimizationIterations.output_dir
SpecPlotBandsTimelinePlotBandleadersTimelinePlotBandleaders.BAR_KWSTimelinePlotBandleaders.PALTimelinePlotBandleaders.SCATTER_KWSTimelinePlotBandleaders.TEXT_KWSTimelinePlotBandleaders._add_pianist_image()TimelinePlotBandleaders._create_plot()TimelinePlotBandleaders._format_ax()TimelinePlotBandleaders._format_corpus_df()TimelinePlotBandleaders._format_fig()TimelinePlotBandleaders._format_timeline_df()TimelinePlotBandleaders._get_birth_death_range()TimelinePlotBandleaders.axTimelinePlotBandleaders.create_plot()TimelinePlotBandleaders.dfTimelinePlotBandleaders.figTimelinePlotBandleaders.gTimelinePlotBandleaders.img_locTimelinePlotBandleaders.output_dir
- src.visualise.interactive_plots module
- src.visualise.random_forest_plots module
BarPlotCategoryImportancesBarPlotCategoryImportances.BAR_KWSBarPlotCategoryImportances.ERROR_KWSBarPlotCategoryImportances._create_plot()BarPlotCategoryImportances._format_ax()BarPlotCategoryImportances._format_fig()BarPlotCategoryImportances._format_ticks()BarPlotCategoryImportances.axBarPlotCategoryImportances.create_plot()BarPlotCategoryImportances.dfBarPlotCategoryImportances.figBarPlotCategoryImportances.gBarPlotCategoryImportances.hatchesBarPlotCategoryImportances.output_dir
BarPlotFeatureImportancesBarPlotFeatureImportances.BAR_KWSBarPlotFeatureImportances.ERROR_KWSBarPlotFeatureImportances._create_plot()BarPlotFeatureImportances._format_ax()BarPlotFeatureImportances._format_fig()BarPlotFeatureImportances._format_ticks()BarPlotFeatureImportances.axBarPlotFeatureImportances.create_plot()BarPlotFeatureImportances.dfBarPlotFeatureImportances.figBarPlotFeatureImportances.gBarPlotFeatureImportances.hatchesBarPlotFeatureImportances.output_dir
CountPlotMissingValuesCountPlotMissingValues.BAR_KWSCountPlotMissingValues._create_plot()CountPlotMissingValues._format_ax()CountPlotMissingValues._format_df()CountPlotMissingValues._format_fig()CountPlotMissingValues.axCountPlotMissingValues.create_plot()CountPlotMissingValues.dfCountPlotMissingValues.figCountPlotMissingValues.gCountPlotMissingValues.output_dir
HeatMapFeatureCorrelationHeatMapFeatureCorrelation.HEAT_KWSHeatMapFeatureCorrelation.LINE_KWSHeatMapFeatureCorrelation.TEXT_KWSHeatMapFeatureCorrelation._add_text_to_triangle()HeatMapFeatureCorrelation._create_plot()HeatMapFeatureCorrelation._format_ax()HeatMapFeatureCorrelation._format_cax()HeatMapFeatureCorrelation._format_corr_labels()HeatMapFeatureCorrelation._format_fig()HeatMapFeatureCorrelation._format_tick_labels()HeatMapFeatureCorrelation.axHeatMapFeatureCorrelation.create_plot()HeatMapFeatureCorrelation.dfHeatMapFeatureCorrelation.figHeatMapFeatureCorrelation.gHeatMapFeatureCorrelation.output_dir
HeatMapPredictionProbDendroHeatMapPredictionProbDendro.DENDRO_KWSHeatMapPredictionProbDendro.MODEL_KWSHeatMapPredictionProbDendro.PALHeatMapPredictionProbDendro._add_pianist_images()HeatMapPredictionProbDendro._create_dendrogram()HeatMapPredictionProbDendro._create_plot()HeatMapPredictionProbDendro._fit_agg()HeatMapPredictionProbDendro._format_annotations()HeatMapPredictionProbDendro._format_ax()HeatMapPredictionProbDendro._format_ax_ticks()HeatMapPredictionProbDendro._format_dax()HeatMapPredictionProbDendro._format_fig()HeatMapPredictionProbDendro.axHeatMapPredictionProbDendro.create_plot()HeatMapPredictionProbDendro.dfHeatMapPredictionProbDendro.figHeatMapPredictionProbDendro.gHeatMapPredictionProbDendro.img_locHeatMapPredictionProbDendro.output_dir
HistPlotFirstLastPHistPlotFirstLastP.FILL_KWSHistPlotFirstLastP.KDE_BWHistPlotFirstLastP.KDE_KWSHistPlotFirstLastP.TEXT_KWSHistPlotFirstLastP._create_plot()HistPlotFirstLastP._format_ax()HistPlotFirstLastP._format_fig()HistPlotFirstLastP._get_kde()HistPlotFirstLastP._get_pval()HistPlotFirstLastP._slice_kde()HistPlotFirstLastP.axHistPlotFirstLastP.create_plot()HistPlotFirstLastP.dfHistPlotFirstLastP.figHistPlotFirstLastP.gHistPlotFirstLastP.output_dir
RegPlotCareerJazzProgressRegPlotCareerJazzProgress.N_JOBSRegPlotCareerJazzProgress.REG_KWSRegPlotCareerJazzProgress._create_plot()RegPlotCareerJazzProgress._format_ax()RegPlotCareerJazzProgress._format_fig()RegPlotCareerJazzProgress.axRegPlotCareerJazzProgress.bootstrap()RegPlotCareerJazzProgress.categoriesRegPlotCareerJazzProgress.create_plot()RegPlotCareerJazzProgress.dfRegPlotCareerJazzProgress.figRegPlotCareerJazzProgress.fit_model()RegPlotCareerJazzProgress.gRegPlotCareerJazzProgress.get_line()RegPlotCareerJazzProgress.markersRegPlotCareerJazzProgress.output_dirRegPlotCareerJazzProgress.paletteRegPlotCareerJazzProgress.predictorsRegPlotCareerJazzProgress.xspace
RegPlotPredictorsCareerProgressRegPlotPredictorsCareerProgress.REG_KWSRegPlotPredictorsCareerProgress.TEXT_KWSRegPlotPredictorsCareerProgress._create_plot()RegPlotPredictorsCareerProgress._format_ax()RegPlotPredictorsCareerProgress._format_fig()RegPlotPredictorsCareerProgress.axRegPlotPredictorsCareerProgress.categoriesRegPlotPredictorsCareerProgress.create_plot()RegPlotPredictorsCareerProgress.dfRegPlotPredictorsCareerProgress.figRegPlotPredictorsCareerProgress.gRegPlotPredictorsCareerProgress.markersRegPlotPredictorsCareerProgress.output_dirRegPlotPredictorsCareerProgress.paletteRegPlotPredictorsCareerProgress.predictors
RocPlotLogRegressionStripPlotLogitCoeffsStripPlotLogitCoeffs.ERROR_KWSStripPlotLogitCoeffs.LEGEND_KWSStripPlotLogitCoeffs.STRIP_KWSStripPlotLogitCoeffs._add_pvals()StripPlotLogitCoeffs._create_plot()StripPlotLogitCoeffs._format_ax()StripPlotLogitCoeffs._format_df()StripPlotLogitCoeffs._format_fig()StripPlotLogitCoeffs._format_legend()StripPlotLogitCoeffs._format_p()StripPlotLogitCoeffs._format_yticks()StripPlotLogitCoeffs.axStripPlotLogitCoeffs.create_plot()StripPlotLogitCoeffs.dfStripPlotLogitCoeffs.figStripPlotLogitCoeffs.gStripPlotLogitCoeffs.output_dirStripPlotLogitCoeffs.palette
- src.visualise.visualise_utils module
- Module contents
Submodules#
src.process module#
Process a track directly from the command line.
- src.process.create_output_filestructure(filename: str)#
Creates necessary folder structure for track with given filename
- src.process.extract_track_features(track: OnsetMaker, exog_ins) dict#
Processes a single track, extracting all required features, and returns a dictionary
- src.process.format_predictions(predict_proba: ndarray, class_names: ndarray) str#
Formats model predictions into a nice human-readable string
- src.process.get_track_dictionary(filename: str, start: str, stop: str, json_location: str = '') dict#
Returns a dictionary from json_location or creates a dictionary from scratch
- src.process.make_pianist_prediction(feature_dict: dict, model_filepath: str | None = None)#
Predicts the pianist for an input track from extracted features using the pre-trained model
- src.process.preprocess_local_audio(audio_fpath: str, start_ts: str, end_ts: str) ndarray#
Loads a local audio file from audio_fpath and truncates to given start and end timestamp
- src.process.proc_inner(input: str, json: str, params: str, begin: str, end: str, exog_ins: str, generate_click: bool)#
An inner function for processing that can be imported directly in Python
- src.process.validate_input(input: str, begin: str, end: str) str#
Validate input URL address or filepath
src.utils module#
Utility classes, functions, and variables used across the entire pipeline
- class src.utils.CorpusMaker(data: list[dict])#
Bases:
objectConverts a multi-sheet Excel spreadsheet into the required format for processing
- static add_missing_channel_overrides(channel_overrides: dict) dict#
In cases where one instrument is hard panned, set all other instruments to use the other channel
- bandleader_instr = 'piano'#
- static construct_filename(item, id_chars: int = 8, desired_words: int = 5) str#
Constructs the filename for an item in the corpus
- format_first_downbeat(start_ts: float, first_downbeat: float) float#
Gets the position of the first downbeat in seconds, from the start of an excerpt
- static format_timestamp(ts: str, as_string: bool = True)#
Formats a timestamp string correctly. Returns as either a datetime or string, depending on as_string
- format_track_dict(track_dict: dict) Generator#
Formats each dictionary, corresponding to a single track
- format_trio_spreadsheet(**kwargs)#
- classmethod from_excel(fname: str, ext: str = 'xlsx', **kwargs)#
Construct corpus from an Excel spreadsheet, potentially containing multiple sheets
- classmethod from_json(fname: str, ext: str = 'json')#
Construct corpus from a JSON
- get_excerpt_duration(start, stop) str#
Returns the total duration of an excerpt, in the format %M:%S
- json_indent = 4#
- keep_all_tracks = False#
- lbz_url_cutoff = 49#
- static str_to_dict(s: str) dict#
Converts a string representation of a dictionary to a dictionary
- src.utils.check_item_present_locally(fname: str) bool#
Returns whether a given filepath is present locally or not
- src.utils.construct_audio_fpath_with_channel_overrides(root_fname: str, channel: str | None = None, instr: str | None = None) str#
From a root file name, optional channel (“l” or “r”) and instrument, constructs the complete file name
- src.utils.convert_to_mp3(dirpath: str, ext: str = '.wav', delete: bool = False, cutoff: int = False) None#
Converts all files with target .wav in dirpath to low bitrate `.mp3`s
- src.utils.disable_settingwithcopy_warning(func: Callable) Callable#
Simple decorator that disables the annoying SettingWithCopy warning in Pandas
- src.utils.flatten_dict(dd: dict, separator='_', prefix='')#
Flattens a dictionary with dictionaries as values, with given separator and prefict
- src.utils.get_audio_duration(fpath: str) float#
Opens a given audio file and returns its duration
- src.utils.get_cached_track_ids(fpath: str = 'c:\\python projects\\jazz-corpus-analysis/data/cambridge-jazz-trio-database-v02') Generator#
Gets the names of tracks which have already been processed
- src.utils.get_project_root() Path#
Returns the root directory of the project
- src.utils.ignore_warning(*args, **kwargs)#
Decorator function for suppressing warnings during a function call
- src.utils.initialise_queue(target_func: ~typing.Callable = <function serialise_from_queue>, *target_func_args) tuple#
Initialise the objects we need for caching through multiprocessing
- Args:
target_func (Callable, optional): target function for the worker process, defaults to serialise_from_queue *target_func_args: arguments passed to target_func
- Returns:
tuple
- src.utils.iqr_filter(arr: array, low: int = 25, high: int = 75, mult: float = 1.5, fill_nans: bool = False) ndarray#
Simple IQR-based range filter that subsets array b where q1(b) - 1.5 * iqr(b) < b[n] < q3(b) + 1.5 * iqr(b)
- Parameters:
arr (np.array): the array of values to clean low (int, optional): the lower quantile to use, defaults to 25 high (int, optional): the upper quantile to use, defaults to 75 mult (float, optional): the amount to multiply the IQR by, defaults to 1.5 fill_nans (bool, optional): replace cleaned values with np.nan, such that the array shape remains the same
- Returns:
np.array
- src.utils.load_annotations_from_files(dirpath: str)#
Loads a single track from loose files generated in src.utils.generate_corpus_files
- src.utils.load_corpus_from_files(dirpath: str) list#
Loads an entire folder of tracks as OnsetMaker instances
- src.utils.load_csv(fpath: str = 'r../../data/processed', fname: str = 'processing_results') dict#
Simple wrapper around json.load that catches errors when working on the same file in multiple threads
- src.utils.load_json(fpath: str = 'r../../data/processed', fname: str = 'processing_results.json') dict#
Simple wrapper around json.load that catches errors when working on the same file in multiple threads
- src.utils.remove_punctuation(s: str) str#
Removes punctuation from a given input string s
- src.utils.retry(exception, tries=4, delay=3, backoff=2) Callable#
Retry calling the decorated function using an exponential backoff.
- src.utils.return_function_kwargs(func) list#
Returns a list of keyword arguments accepted by a given function
- src.utils.save_csv(obj, fpath: str, fname: str) None#
Simple wrapper around csv.DictWriter with protections to assist in multithreaded access
- src.utils.save_json(obj: dict, fpath: str, fname: str) None#
Simple wrapper around json.dump with protections to assist in multithreaded access
- src.utils.serialise_from_queue(item_queue, fpath: str) None#
Iteratively append items in a queue to a single file. Process dies when NoneType added to queue
- Args:
item_queue: the multiprocessing.Manager.Queue instance to draw items from fpath (str): the filepath to save items to (file will be created if it does not exist)
- Returns:
None
- src.utils.serialise_object(obj: object, fpath: str, fname: str, use_pickle: bool = False) None#
Wrapper around dill.dump that takes in an object, directory, and filename, and creates a serialised object
- src.utils.try_get_kwarg_and_remove(kwarg: str, kwargs: dict, default_=False) Any#
Try and get an argument from a kwargs dictionary, remove after getting, and return the value (or a default).
- Arguments:
kwarg (str): the argument to attempt to get from the kwargs dictionary kwargs (dict): the dictionary of keyword arguments default_ (bool, optional): the value to return if kwarg is not found in kwargs, defaults to None
- Returns:
Any: the value returned from kwargs, or a default
- src.utils.unserialise_object(fpath: str, use_pickle: bool = False, _ext: str = 'p') list#
Simple wrapper that unserialises an iterable pickle object using pickle or dill and returns it