Class: InevitableCacophony::Phrase

Inherits:
Object
  • Object
show all
Defined in:
lib/inevitable_cacophony/phrase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*notes, tempo: raise) ⇒ Phrase

Returns a new instance of Phrase.

Parameters:

  • notes (Array<Note>)

    The notes to play (what you’d write on the bar lines, mostly)

  • tempo (Numeric) (defaults to: raise)

    Tempo in beats per minute.



9
10
11
12
# File 'lib/inevitable_cacophony/phrase.rb', line 9

def initialize(*notes, tempo: raise)
	@tempo = tempo
	@notes = notes
end

Instance Attribute Details

#notesObject (readonly)

Returns the value of attribute notes.



14
15
16
# File 'lib/inevitable_cacophony/phrase.rb', line 14

def notes
  @notes
end

#tempoObject (readonly)

Returns the value of attribute tempo.



14
15
16
# File 'lib/inevitable_cacophony/phrase.rb', line 14

def tempo
  @tempo
end