Pre-load samples

load_samples

[paths (list)]

Given an array of paths to wav|wave|aif|aiff files, loads them all into memory so that they may be played with via sample with no delay. See load_sample.

Introduced in v2.0.0

Example 0 


sample :ambi_choir
                  

load_samples [:elec_plip, :elec_blip]
sample :elec_plip                    
                                     



 
 # This has to first load the sample before it can play it which may
 # cause unwanted delay.
 
 # Let's load some samples in advance of using them
 # When we play :elec_plip, there is no extra delay
 # as it has already been loaded.



Example 1 


load_samples :elec_plip, :elec_blip
                                   
sample :elec_blip                  



 
 # You may omit the square brackets, and
 # simply list all samples you wish to load
 # Before playing them.



Example 2 


load_samples ["/home/pi/samples/foo.wav"]
sample "/home/pi/sample/foo.wav"         



 
 # You may also load full paths to samples.
 # And then trigger them with no more loading.