|
|
@ -2255,7 +2255,7 @@ frames_i = (add_noise(a) <span class="hljs-keyword">for</span> a <span class="h |
|
|
|
write_to_wav_file(<span class="hljs-string">'test.wav'</span>, frames_i) |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
<div><h3 id="synthesizer">Synthesizer</h3><div><h4 id="playssongpopcornbygershonkingsley">Plays song Popcorn by Gershon Kingsley:</h4><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install simpleaudio</span> |
|
|
|
<div><h3 id="synthesizer">Synthesizer</h3><div><h4 id="playspopcornbygershonkingsley">Plays Popcorn by Gershon Kingsley:</h4><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install simpleaudio</span> |
|
|
|
<span class="hljs-keyword">import</span> simpleaudio, math, struct |
|
|
|
<span class="hljs-keyword">from</span> itertools <span class="hljs-keyword">import</span> chain, repeat |
|
|
|
F = <span class="hljs-number">44100</span> |
|
|
|
xxxxxxxxxx