Block-level use sample pack

with_sample_pack  pack_path (string)

Given a path to a folder of samples on your filesystem, this method makes any .wav, .wave, .aif, or .aiff files in that folder available as samples inside the given block. Consider using with_sample_pack_as when using multiple sample packs.

Introduced in v2.0

Example

# Example 1

with_sample_pack '/path/to/sample/dir' do
  sample :foo 
end


 
#=> plays /path/to/sample/dir/foo.{wav|wave|aif|aiff}