Translate

live_loop :flibble do
sample :ambi_choir, rate: 0.3
sample :bd_haus, rate: 1
sleep 1
end
SourceTranslationState
19
Change the `sleep` value from `0.5` to something higher like `1`.
将`sleep`的值从`0.5`改成一个更大的,比如`1`。
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...
最后,记住这个时刻。这是你第一次用Sonic Pi 编写音乐,我相信这也绝不是你最后一次。
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:
OK,这真的是太简单啦!让我们在混响中添加一些其他东西。在‘sample :bd_haus’上面添加一行:`sample :ambi_choir, rate: 0.3`。你的代码就变成这样:
24
live_loop :flibble do
sample :ambi_choir, rate: 0.3
sample :bd_haus, rate: 1
sleep 1
end
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).
现在,开始播放吧。改变rates(音调),看看rate设为很高或者很低甚至为负数时会发生什么?看看我们把`:ambi_choir`的`rate:`调小一点(调成‘0.29’?)会发生什么?把`sleep`的值调得很小又如何呢?如果你把`sleep` 设置的很低,你的电脑可能会崩溃(如果真的崩溃了,只要设高一点儿,然后重新运行就可以啦)。
26
Try commenting one of the `sample` lines out by adding a `#` to the beginning:
试着把一个`sample`代码行注释掉(在这一行前加一个`#`):
27
live_loop :flibble do
sample :ambi_choir, rate: 0.3
# sample :bd_haus, rate: 1
sleep 1
end
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.
注意:这是告诉电脑忽略这条语句,所以我们这条语句我们是听不到的。我们称之为注释。在Sonic Pi中我们可以用注释来疏略一条语句。
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:
最后,然我给你留点好玩的。复制下面的代码到空白区域。现在,不要想太多,只要知道这是两个循环就行了——这两个循环同时运行。现在,拿这两个循环做实验吧!下面是一些建议:

Loading…

Loading…

Things to check

Glossary

Source Translation
No related strings found in the glossary.

Source information

Flags
no-wrap
Source string location
01.1-Live-Coding.md:43
Source string age
2 years ago
Translation file
etc/doc/lang/sonic-pi-tutorial-zh-Hans.po, string 24
String priority
Medium