Skip to content

Commit c679ff9

Browse files
committed
more youtube
1 parent 623a699 commit c679ff9

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

README-1-Getting-Started.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ Also, to make it easier to see what's different each time,
198198
let's pull out all that setup and [put it into a new file called
199199
`synth_setup.py`](./1_getting_started/synth_setup.py).
200200

201-
Another thing in `synth_setup.py` is putting a nicer amplitude envelope on the sound.
202-
We'll go into more details on that in the next section.
203-
204201
Our [`code.py`](./1_getting_started/code_synth_setup.py) now looks like the below.
205202
We'll use this technique going forward.
206203

@@ -215,13 +212,17 @@ midi_note = 60 # midi note to play, 60 = C4
215212
while True:
216213
print("boop!")
217214
synth.press(midi_note) # start note playing
218-
time.sleep(0.2)
215+
time.sleep(0.1)
219216
synth.release(midi_note) # release the note we pressed, notice it keeps sounding
220-
time.sleep(0.5)
217+
time.sleep(0.3)
221218
midi_note = random.randint(32,72) # pick a new random note
222219
```
223220
> [1_getting_started/code_synth_setup.py](./1_getting_started/code_synth_setup.py)
224221
222+
The sleep times have been sped up, so you can hear the notes overlapping more.
223+
Also note there's been a special change at the end of `synth_setup.py` to make
224+
the boops more appealing. More on that later. (Hint: it's called an "amplitude envelope")
225+
225226
And this sounds like:
226227

227228
<a href="https://www.youtube.com/watch?v=XFT7mV3DepM">
@@ -231,10 +232,6 @@ And this sounds like:
231232
[youtube video](https://www.youtube.com/watch?v=XFT7mV3DepM)
232233

233234

234-
The sleep times have been sped up, so you can hear the notes overlapping more.
235-
Also note there's been a special change at the end of `synth_setup.py` to make
236-
the boops more appealing. More on that later.
237-
238235
## Fun with boops
239236

240237
With just the above, we can do some fun.
@@ -258,9 +255,9 @@ while True:
258255
midi_note = random.choice( [root_note+x for x in scale_pentatonic] )
259256
print("playing!", midi_note)
260257
synth.press(midi_note)
261-
time.sleep(0.05)
258+
time.sleep(0.1)
262259
synth.release(midi_note) # release the note we pressed, notice it keeps sounding
263-
time.sleep(0.25)
260+
time.sleep(0.1)
264261
```
265262
> [1_getting_started/code_generative_penta.py](./1_getting_started/code_generative_penta.py)
266263
@@ -306,6 +303,13 @@ while True:
306303
```
307304
> [1_getting_started/code_chord_melody.py](./1_getting_started/code_chord_melody.py)
308305
306+
<a href="https://www.youtube.com/watch?v=5at6IMn2YyM">
307+
<img alt="code_synth_setup demo" width=640 height=360
308+
src="https://img.youtube.com/vi/5at6IMn2YyM/maxresdefault.jpg"></a>
309+
310+
[youtube video](https://www.youtube.com/watch?v=5at6IMn2YyM)
311+
312+
309313
[ ... TBD video of code_synth_chord_melody.py TBD ... ]
310314

311315
## Controlling Notes
@@ -344,9 +348,11 @@ while True:
344348
```
345349
> [1_getting_started/code_buttons.py](./1_getting_started/code_buttons.py)
346350
347-
```
348-
[ ... TBD video of code_buttons.py TBD ... ]
349-
```
351+
<a href="https://www.youtube.com/watch?v=I8R7uiOD65Q">
352+
<img alt="code_synth_setup demo" width=640 height=360
353+
src="https://img.youtube.com/vi/I8R7uiOD65Q/maxresdefault.jpg"></a>
354+
355+
[youtube video](https://www.youtube.com/watch?v=I8R7uiOD65Q)
350356

351357

352358
### Controlling with MIDI
@@ -379,6 +385,14 @@ while True:
379385
> [1_getting_started/code_midi.py](./1_getting_started/code_midi.py)
380386
381387

382-
```
383-
[ ... TBD video of code_synth_midi.py TBD ... ]
384-
```
388+
<a href="https://www.youtube.com/watch?v=nLH4wXKvQq8">
389+
<img alt="code_synth_setup demo" width=640 height=360
390+
src="https://img.youtube.com/vi/I8R7uiOD65Q/maxresdefault.jpg"></a>
391+
392+
[youtube video](https://www.youtube.com/watch?v=nLH4wXKvQq8)
393+
394+
395+
## Next steps
396+
397+
Now you can make some sounds and control those sounds with buttons or MIDI,
398+
it's time to start sculpting those sounds. Time for [Modulation](README-2-Modulation.md)!

0 commit comments

Comments
 (0)