Translate

Now, play around. Change the rates - what happens when you use high values, or small values or negative values? See what happens when you change the `rate:` value for the `:ambi_choir` sample just slightly (say to `0.29`). What happens if you choose a really small `sleep` value? See if you can make it go so fast your computer will stop with an error because it can't keep up (if that happens, just choose a bigger `sleep` time and hit `Run` again).
SourceTranslationState
20
Press the `Run` button again
21
Notice how the drum speed has changed.
22
Finally, *remember this moment*, this is the first time you've live coded with Sonic Pi and it's unlikely to be your last...
23
Ok, that was simple enough. Let's add something else into the mix. Above `sample :bd_haus` add the line `sample :ambi_choir, rate: 0.3`. Your code should look like this:
24
live_loop :flibble do
sample :ambi_choir, rate: 0.3
sample :bd_haus, rate: 1
sleep 1
end
25
Now, play around. Change the rates - what happens when you use high values, or small values or negative values? See what happens when you change the `rate:` value for the `:ambi_choir` sample just slightly (say to `0.29`). What happens if you choose a really small `sleep` value? See if you can make it go so fast your computer will stop with an error because it can't keep up (if that happens, just choose a bigger `sleep` time and hit `Run` again).
26
Try commenting one of the `sample` lines out by adding a `#` to the beginning:
27
live_loop :flibble do
sample :ambi_choir, rate: 0.3
# sample :bd_haus, rate: 1
sleep 1
end
28
Notice how it tells the computer to ignore it, so we don't hear it. This is called a comment. In Sonic Pi we can use comments to remove and add things into the mix.
29
Finally, let me leave you something fun to play with. Take the code below, and copy it into a spare buffer. Now, don't try to understand it too much other than see that there are two loops - so two things going round at the same time. Now, do what you do best - experiment and play around. Here are some suggestions:
30
Try changing the blue `rate:` values to hear the sample sound change.

Loading…

Loading…

threewater2 7 months ago Source string comment

rate应该翻译为什么?

Glossary

Source Translation
No related strings found in the glossary.

Source information

Source string location
01.1-Live-Coding.md:51
Source string age
2 years ago
Translation file
etc/doc/lang/sonic-pi-tutorial-et.po, string 25
String priority
Medium