-
Notifications
You must be signed in to change notification settings - Fork 13
8 ‐ Output File Names
For complete documentation see Preprocessing on the docs site.
Every analysis writes files, and after an afternoon of work a folder can hold dozens. The naming rules here decide what each file is called and whether a re-run replaces the old file or sits beside it—worth two minutes before your first long session, and exactly where to look when a file seems to have vanished.
Every analysis method accepts two parameters that control output file naming:
-
target_name—the output file path. IfNone(default), a suffix is appended to the source filename in the same directory. For example,historyondance.avigivesdance_history.avi. -
overwrite—ifTrue(default), an existing file is replaced in place, so re-running a method overwrites the previous result. Withoverwrite=False, the name is silently incremented instead, keeping every run:dance_history.avi→dance_history_0.avi→dance_history_1.avi.
import musicalgestures as mg
mv = mg.MgVideo('/path/to/video.avi')
mv.history(target_name='/output/my_history.avi', overwrite=False) # keep every runA project from the fourMs Lab, RITMO Centre for Interdisciplinary Studies in Rhythm, Time and Motion, Department of Musicology, University of Oslo.