Block-level use sample pack alias

with_sample_pack_as  pack_path (string)

Similar to with_sample_pack except you can assign prefix aliases for samples. This lets you ‘namespace’ your sounds so that they don’t clash, even if they have the same filename.

Introduced in v2.0

Example

# Example 1

with_sample_pack_as '/home/yourname/path/to/sample/dir', :my_samples do
 
  sample :my_samples__foo 
end


 
# The foo sample is now available, with a prefix of 'my_samples'
#=> plays /home/yourname/path/to/sample/dir/foo.{wav|wave|aif|aiff}