Class: Sox
- Inherits:
-
Object
- Object
- Sox
- Defined in:
- lib/build_audulus_wavetable_node.rb
Class Method Summary collapse
-
.load_samples(path) ⇒ Object
load the WAV file at
pathand turn it into a list of samples, -1 to 1 in value.
Class Method Details
.load_samples(path) ⇒ Object
load the WAV file at path and turn it into a list of samples, -1 to 1 in value
37 38 39 40 41 42 43 44 45 |
# File 'lib/build_audulus_wavetable_node.rb', line 37 def self.load_samples(path) `sox "#{path}" -t dat -`. lines. reject {|l| l.start_with?(';')}. map(&:strip). map(&:split). map(&:last). map(&:to_f) end |