class InevitableCacophony::Note
Public Class Methods
new(ratio, beat)
click to toggle source
@param ratio [Numeric] Note
frequency, as a multiple of the tonic. @param amplitude [Rhythm::Beat] A Beat object defining amplitude and timing
Calls superclass method
# File lib/inevitable_cacophony/note.rb, line 11 def initialize(ratio, beat) super(ratio, beat) end
rest(beat)
click to toggle source
Create a rest for the duration of the given beat. @param beat [Beat]
# File lib/inevitable_cacophony/note.rb, line 17 def self.rest(beat) # Can't set ratio to 0 as it causes divide-by-zero errors new(1, Rhythm::Beat.new(0, beat.duration, beat.timing)) end
Public Instance Methods
after_delay()
click to toggle source
# File lib/inevitable_cacophony/note.rb, line 27 def after_delay beat.after_delay end
duration()
click to toggle source
# File lib/inevitable_cacophony/note.rb, line 31 def duration beat.duration end
frequency()
click to toggle source
# File lib/inevitable_cacophony/note.rb, line 35 def frequency ratio end
start_delay()
click to toggle source
# File lib/inevitable_cacophony/note.rb, line 23 def start_delay beat.start_delay end