- Timestamp:
- Nov 4, 2018, 8:57:33 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 254acce
- Parents:
- 9374e57
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_filter.py
r9374e57 r8ebcd3d 4 4 import os.path 5 5 import aubio 6 6 7 7 8 def apply_filter(path, target): … … 28 29 total_frames += read 29 30 # end of file reached 30 if read < s.hop_size: break 31 if read < s.hop_size: 32 break 31 33 32 34 # print some info … … 34 36 input_str = "input: {:s} ({:.2f} s, {:d} Hz)" 35 37 output_str = "output: {:s}, A-weighting filtered ({:d} frames total)" 36 print 37 print 38 print(input_str.format(s.uri, duration, samplerate)) 39 print(output_str.format(o.uri, total_frames)) 38 40 39 41 if __name__ == '__main__': 40 42 usage = "{:s} <input_file> [output_file]".format(sys.argv[0]) 41 43 if not 1 < len(sys.argv) < 4: 42 print 44 print(usage) 43 45 sys.exit(1) 44 46 if len(sys.argv) < 3:
Note: See TracChangeset
for help on using the changeset viewer.