diff options
author | John Glover <j@johnglover.net> | 2012-10-28 23:29:29 +0000 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2012-10-28 23:29:29 +0000 |
commit | 2055db0dcbcb98dd560a9769c6f0b0124ba2b663 (patch) | |
tree | ce51d2b28b284cb2cf63a63ba9b25ffc1b916dc3 /tests/signals.py | |
parent | 43c4c7da29b8716159afeca71c38c00a788716e4 (diff) | |
download | simpl-2055db0dcbcb98dd560a9769c6f0b0124ba2b663.tar.gz simpl-2055db0dcbcb98dd560a9769c6f0b0124ba2b663.tar.bz2 simpl-2055db0dcbcb98dd560a9769c6f0b0124ba2b663.zip |
[tests] Remove unused test files.
Diffstat (limited to 'tests/signals.py')
-rw-r--r-- | tests/signals.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/signals.py b/tests/signals.py deleted file mode 100644 index 8083f94..0000000 --- a/tests/signals.py +++ /dev/null @@ -1,33 +0,0 @@ -import simpl -import numpy as np - -def sine_wave(n, f=220, sr=44100): - s = simpl.zeros(n) - for i in range(n): - s[i] = np.sin(2.0 * np.pi * f * i/sr) - return s - -def noisy_sine_wave(n, f=220, sr=44100): - s = simpl.zeros(n) - for i in range(n): - s[i] = np.sin(2*np.pi*f*i/sr) + (np.random.random() / 4) - return s - -def sinechirpsine(): - initial_freq = 220 - final_freq = 440 - amp = 0.5 - section_length = 1 # seconds - sampling_rate = 44100 - - audio = simpl.zeros(section_length*sampling_rate*3) - chirp_freq = initial_freq - chirp_rate = (final_freq - initial_freq) / 2 - - for i in range(section_length*sampling_rate): - t = float(i) / sampling_rate - audio[i] = amp * np.sin(2 * np.pi * initial_freq * t) - audio[i+(section_length*sampling_rate)] = amp * np.sin(2 * np.pi * (initial_freq*t + chirp_rate*t*t)) - audio[i+(section_length*sampling_rate*2)] = amp * np.sin(2 * np.pi * final_freq * t) - - return audio |