Skip to content

Commit

Permalink
Instantiate GeometricScale in a slightly more friendly way for learn …
Browse files Browse the repository at this point in the history
…README and example
  • Loading branch information
JohnVinyard committed Sep 4, 2017
1 parent 795b3b4 commit 881a6d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/pytorch_autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
samplerate = zounds.SR11025()
BaseModel = zounds.stft(resample_to=samplerate, store_fft=True)

scale = zounds.GeometricScale(300, 3040, 0.016985, 300)
scale = zounds.GeometricScale(
start_center_hz=300,
stop_center_hz=3040,
bandwidth_ratio=0.016985,
n_bands=300)
scale.ensure_overlap_ratio(0.5)


Expand Down
7 changes: 6 additions & 1 deletion zounds/learn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ from random import choice
samplerate = zounds.SR11025()
BaseModel = zounds.stft(resample_to=samplerate, store_fft=True)

scale = zounds.GeometricScale(300, 3040, 0.016985, 300)
scale = zounds.GeometricScale(
start_center_hz=300,
stop_center_hz=3040,
bandwidth_ratio=0.016985,
n_bands=300)
scale.ensure_overlap_ratio(0.5)


Expand Down Expand Up @@ -203,4 +207,5 @@ if __name__ == '__main__':
globals=globals(),
locals=locals())
app.start(8888)

```

0 comments on commit 881a6d8

Please sign in to comment.