Class: InevitableCacophony::Note
- Inherits:
-
Struct
- Object
- Struct
- InevitableCacophony::Note
- Defined in:
- lib/inevitable_cacophony/note.rb
Instance Attribute Summary collapse
-
#beat ⇒ Object
Returns the value of attribute beat.
-
#ratio ⇒ Object
Returns the value of attribute ratio.
Class Method Summary collapse
-
.rest(beat) ⇒ Object
Create a rest for the duration of the given beat.
Instance Method Summary collapse
- #after_delay ⇒ Object
- #duration ⇒ Object
- #frequency ⇒ Object
-
#initialize(ratio, beat) ⇒ Note
constructor
A new instance of Note.
- #start_delay ⇒ Object
Constructor Details
#initialize(ratio, beat) ⇒ Note
Returns a new instance of Note.
11 12 13 |
# File 'lib/inevitable_cacophony/note.rb', line 11 def initialize(ratio, beat) super(ratio, beat) end |
Instance Attribute Details
#beat ⇒ Object
Returns the value of attribute beat
7 8 9 |
# File 'lib/inevitable_cacophony/note.rb', line 7 def beat @beat end |
#ratio ⇒ Object
Returns the value of attribute ratio
7 8 9 |
# File 'lib/inevitable_cacophony/note.rb', line 7 def ratio @ratio end |
Class Method Details
Instance Method Details
#after_delay ⇒ Object
27 28 29 |
# File 'lib/inevitable_cacophony/note.rb', line 27 def after_delay beat.after_delay end |
#duration ⇒ Object
31 32 33 |
# File 'lib/inevitable_cacophony/note.rb', line 31 def duration beat.duration end |
#frequency ⇒ Object
35 36 37 |
# File 'lib/inevitable_cacophony/note.rb', line 35 def frequency ratio end |
#start_delay ⇒ Object
23 24 25 |
# File 'lib/inevitable_cacophony/note.rb', line 23 def start_delay beat.start_delay end |