diff --git a/rms_analysis.py b/rms_analysis.py index ad27011..6021363 100644 --- a/rms_analysis.py +++ b/rms_analysis.py @@ -254,7 +254,7 @@ def note_stats( r, decay_pct=50.0, extraDurSearchMs=500 ): -def locate_peak_indexes( xV, xV_srate, eventMsL, audioFn ): +def locate_peak_indexes( xV, xV_srate, eventMsL, audioFn="" ): pkIdxL = [] for i, (begMs, endMs) in enumerate(eventMsL): @@ -601,6 +601,9 @@ def write_audacity_label_files( inDir, analysisArgsD, reverseFl=True ): takeDir = os.path.join(pitchDir,takeFolder) + if not os.path.isfile(os.path.join(takeDir,"seq.json")): + continue + r = rms_analysis_main( takeDir, midi_pitch, **analysisArgsD ) labelFn = os.path.join(takeDir,"audacity.txt")