rms_analysis.py : Don't crash in write_audacity_label_files() when seq.json does not exist.
This commit is contained in:
parent
f36e7c8a64
commit
7119fe471b
@ -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 = []
|
pkIdxL = []
|
||||||
for i, (begMs, endMs) in enumerate(eventMsL):
|
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)
|
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 )
|
r = rms_analysis_main( takeDir, midi_pitch, **analysisArgsD )
|
||||||
|
|
||||||
labelFn = os.path.join(takeDir,"audacity.txt")
|
labelFn = os.path.join(takeDir,"audacity.txt")
|
||||||
|
Loading…
Reference in New Issue
Block a user