-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4ba111
commit b67187a
Showing
13 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from maelzel.snd import sndfiletools | ||
import pitchtools as pt | ||
import matplotlib.pyplot as plt | ||
import time | ||
|
||
|
||
def peakbpf(): | ||
peaks = sndfiletools.peakbpf("snd/finneganswake.wav", channel=1, resolution=0.05) | ||
t, maxpeak = sndfiletools.maxPeak("snd/finneganswake.wav") | ||
print(f"Max. peak: {maxpeak} at {t} seconds") | ||
for t, peak in zip(*peaks.points()): | ||
db = pt.amp2db(peak) | ||
print(f"{t=:.3f}, {peak=:.4f} ({db:.1f} dB)") | ||
peaks.plot() | ||
|
||
|
||
if __name__ == "__main__": | ||
peakbpf() | ||
plt.show() | ||
|