3 """A simple example using aubio.source."""
8 samplerate = 0 # use original source samplerate
9 hop_size = 256 # number of frames to read in one block
10 src = aubio.source(sys.argv[1], samplerate, hop_size)
14 samples, read = src() # read hop_size new samples from source
15 total_frames += read # increment total number of frames
16 if read < hop_size: # end of file reached
19 fmt_string = "read {:d} frames at {:d}Hz from {:s}"
20 print(fmt_string.format(total_frames, src.samplerate, src.uri))