File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2127,7 +2127,7 @@ frames_i = (add_noise(a) for a in read_wav_file('test.wav'))
2127
2127
write_to_wav_file(' test.wav' , frames_i)
2128
2128
```
2129
2129
2130
- #### Plays Popcorn:
2130
+ ### Synthesizer
2131
2131
``` python
2132
2132
# $ pip3 install simpleaudio
2133
2133
import simpleaudio, math, struct
@@ -2156,6 +2156,7 @@ Basic Script Template
2156
2156
#
2157
2157
2158
2158
from collections import namedtuple
2159
+ from dataclasses import make_dataclass
2159
2160
from enum import Enum
2160
2161
import re
2161
2162
import sys
Original file line number Diff line number Diff line change @@ -1766,7 +1766,7 @@ <h4 id="addsnoisetoamonowavfile">Adds noise to a mono WAV file:</h4>
1766
1766
frames_i = (add_noise(a) < span class ="hljs-keyword "> for</ span > a < span class ="hljs-keyword "> in</ span > read_wav_file(< span class ="hljs-string "> 'test.wav'</ span > ))
1767
1767
write_to_wav_file(< span class ="hljs-string "> 'test.wav'</ span > , frames_i)
1768
1768
</ code > </ pre >
1769
- < h4 id ="playspopcorn " > Plays Popcorn: </ h4 >
1769
+ < h3 id ="synthesizer " > Synthesizer </ h3 >
1770
1770
< pre > < code class ="python language-python hljs "> < span class ="hljs-comment "> # $ pip3 install simpleaudio</ span >
1771
1771
< span class ="hljs-keyword "> import</ span > simpleaudio, math, struct
1772
1772
< span class ="hljs-keyword "> from</ span > itertools < span class ="hljs-keyword "> import</ span > chain, repeat
@@ -1790,6 +1790,7 @@ <h2 id="basicscripttemplate"><a href="#basicscripttemplate" name="basicscripttem
1790
1790
< span class ="hljs-comment "> #</ span >
1791
1791
1792
1792
< span class ="hljs-keyword "> from</ span > collections < span class ="hljs-keyword "> import</ span > namedtuple
1793
+ < span class ="hljs-keyword "> from</ span > dataclasses < span class ="hljs-keyword "> import</ span > make_dataclass
1793
1794
< span class ="hljs-keyword "> from</ span > enum < span class ="hljs-keyword "> import</ span > Enum
1794
1795
< span class ="hljs-keyword "> import</ span > re
1795
1796
< span class ="hljs-keyword "> import</ span > sys
You can’t perform that action at this time.
0 commit comments