Skip to content

Commit 37d858d

Browse files
committed
Merge pull request raspberrypi#43 from chrisreynolds/patch-1
Update sonic-pi.md
2 parents 8fb17b0 + 7c256ae commit 37d858d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

usage/sonic-pi.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ def frere
102102
sleep 0.5
103103
end
104104
```
105+
Then call the function by typing `frere`. For example in a loop:
106+
107+
```ruby
108+
4.times do
109+
frere
110+
end
111+
```
105112

106113
## Synths
107114

@@ -127,14 +134,6 @@ with_synth "fm"
127134
end
128135
```
129136

130-
Then call the function by typing `frere`. For example in a loop:
131-
132-
```ruby
133-
4.times do
134-
frere
135-
end
136-
```
137-
138137
## Threads
139138

140139
You can play two tunes at the same time using threads. Like loops, they are blocks encasing lines with the `end` keyword:

0 commit comments

Comments
 (0)