Module: Scissor
- Defined in:
- lib/scissor.rb,
lib/scissor/tape.rb,
lib/scissor/writer.rb,
lib/scissor/fragment.rb,
lib/scissor/loggable.rb,
lib/scissor/sequence.rb,
lib/scissor/sound_file.rb
Defined Under Namespace
Modules: Loggable
Classes: Fragment, Sequence, SoundFile, Tape, Writer
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
25
26
27
|
# File 'lib/scissor.rb', line 25
def logger
@logger
end
|
Class Method Details
.join(scissor_array) ⇒ Object
43
44
45
46
47
|
# File 'lib/scissor.rb', line 43
def join(scissor_array)
scissor_array.inject(Scissor()) do |m, scissor|
m + scissor
end
end
|
.mix(scissor_array, filename, options = {}) ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/scissor.rb', line 49
def mix(scissor_array, filename, options = {})
writer = Scissor::Writer.new
scissor_array.each do |scissor|
writer.add_track(scissor.fragments)
end
writer.to_file(filename, options)
Scissor(filename)
end
|
.sequence(*args) ⇒ Object
39
40
41
|
# File 'lib/scissor.rb', line 39
def sequence(*args)
Scissor::Sequence.new(*args)
end
|
.silence(duration) ⇒ Object
33
34
35
36
37
|
# File 'lib/scissor.rb', line 33
def silence(duration)
Scissor(File.dirname(__FILE__) + '/../data/silence.mp3').
slice(0, 1).
fill(duration)
end
|
Instance Method Details
#logger ⇒ Object
28
29
30
|
# File 'lib/scissor.rb', line 28
def logger
self.class.logger
end
|