Skip to content

Commit

Permalink
remove dependencies, add requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
gboyes committed Mar 11, 2018
1 parent 58e27c8 commit 35ed1cd
Show file tree
Hide file tree
Showing 43 changed files with 213 additions and 10,640 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.DS_Store
*~
*pyc
#*#
__pycache__/
venv/
pysdif/
_atom.c
_atom.so
3 changes: 0 additions & 3 deletions examples/.gitignore

This file was deleted.

16 changes: 8 additions & 8 deletions examples/specIMPtest.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import numpy as np
import pydbm.dictionary
import matplotlib.pyplot as plt
import scikits.audiolab
from scipy.io import wavfile
import time

x, fs, p = scikits.audiolab.wavread('../sounds/harm_fof.wav')
fs, x = wavfile.read('./sounds/harm_fof.wav')
x = x / 32768.0

D = pydbm.dictionary.SpecDictionary(fs)
D.addNote('hann', 6000, [512], [np.arange(0, len(x)-512, 256)])
D.addNote(b'hann', 6000, [512], [np.arange(0, len(x)-512, 256)])
a = time.clock()
#mod, res, book = D.mp(x, 1000, 35, 10000, 10, -80, 2)
mod, res, book = D.mp2(x, 1000, 35, 10000, 10, -80, 2)
print(time.clock()-a)
print(book.num())
print('Decomposition took {}'.format(time.clock()-a))
print('Synthesis book contains {} elements'.format(book.num()))

scikits.audiolab.wavwrite(mod, '../sounds/mod.wav', fs)
wavfile.write('./sounds/spec-test-model.wav', fs, mod)
wavfile.write('./sounds/spec-test-residual.wav', fs, res)

0 comments on commit 35ed1cd

Please sign in to comment.