You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/server/ruby/lib/sonicpi/lang/sound.rb
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2114,7 +2114,7 @@ def sample_loaded?(*args)
2114
2114
docname: :sample_loaded?,
2115
2115
introduced: Version.new(2,2,0),
2116
2116
summary: "Test if sample was pre-loaded",
2117
-
doc: "Given a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`or `.flac` file, returns `true` if the sample has already been loaded.",
2117
+
doc: "Given a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`, `.flac` or `.mp3` file, returns `true` if the sample has already been loaded.",
2118
2118
args: [[:path,:string]],
2119
2119
opts: nil,
2120
2120
accepts_block: false,
@@ -2132,7 +2132,7 @@ def load_sample(*args)
2132
2132
docname: :load_sample,
2133
2133
introduced: Version.new(2,0,0),
2134
2134
summary: "Pre-load first matching sample",
2135
-
doc: "Given a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`or `.flac` file, pre-loads the sample into memory.
2135
+
doc: "Given a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`, `.flac` or `.mp3` file, pre-loads the sample into memory.
2136
2136
2137
2137
You may also specify the same set of source and filter pre-args available to `sample` itself. `load_sample` will then load all matching samples. See `sample`'s docs for more information.",
2138
2138
args: [[:path,:string]],
@@ -2162,7 +2162,7 @@ def load_samples(*args)
2162
2162
docname: :load_samples,
2163
2163
introduced: Version.new(2,0,0),
2164
2164
summary: "Pre-load all matching samples",
2165
-
doc: "Given a directory containing multiple `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`or `.flac` files, pre-loads all the samples into memory.
2165
+
doc: "Given a directory containing multiple `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`, `.flac` or `.mp3` files, pre-loads all the samples into memory.
2166
2166
2167
2167
You may also specify the same set of source and filter pre-args available to `sample` itself. `load_sample` will load all matching samples (not just the sample `sample` would play given the same opts) - see `sample`'s docs for more information.",
2168
2168
args: [[:paths,:list]],
@@ -2278,7 +2278,7 @@ def sample_duration(*args)
2278
2278
docname: :sample_duration,
2279
2279
introduced: Version.new(2,0,0),
2280
2280
summary: "Get duration of sample in beats",
2281
-
doc: "Given the name of a loaded sample, or a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`or `.flac` file returns the length of time in beats that the sample would play for. `sample_duration` understands and accounts for all the opts you can pass to `sample` which have an effect on the playback duration such as `rate:`. The time returned is scaled to the current BPM.
2281
+
doc: "Given the name of a loaded sample, or a path to a `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`, `.flac` or `.mp3` file returns the length of time in beats that the sample would play for. `sample_duration` understands and accounts for all the opts you can pass to `sample` which have an effect on the playback duration such as `rate:`. The time returned is scaled to the current BPM.
2282
2282
2283
2283
*Note:* avoid using `sample_duration` to set the sleep time in `live_loop`s, prefer stretching the sample with the `beat_stretch:` opt or changing the BPM instead. See the examples below for details.",
2284
2284
args: [[:path,:string]],
@@ -2528,7 +2528,7 @@ def sample(*args, &blk)
2528
2528
docname: :sample,
2529
2529
introduced: Version.new(2,0,0),
2530
2530
summary: "Trigger sample",
2531
-
doc: "Play back a recorded sound file (sample). Sonic Pi comes with lots of great samples included (see the section under help) but you can also load and play `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`or `.flac` files from anywhere on your computer too. To play a built-in sample use the corresponding keyword such as `sample :bd_haus`. To play any file on your computer use a full path such as `sample \"/path/to/sample.wav\"`.
2531
+
doc: "Play back a recorded sound file (sample). Sonic Pi comes with lots of great samples included (see the section under help) but you can also load and play `.wav`, `.wave`, `.aif`, `.aiff`, `.ogg`, `.oga`, `.flac` or `.mp3` files from anywhere on your computer too. To play a built-in sample use the corresponding keyword such as `sample :bd_haus`. To play any file on your computer use a full path such as `sample \"/path/to/sample.wav\"`.
2532
2532
2533
2533
There are many opts for manipulating the playback. For example, the `rate:` opt affects both the speed and the pitch of the playback. To control the rate of the sample in a pitch-meaningful way take a look at the `rpitch:` opt.
0 commit comments