class Alda::Voice

A voice event. An Alda::EventContainer containing an Alda::Voice can be created using event list sugar. See Alda::EventList#method_missing.

Alda::Score.new do
  piano_ v1 c d e f v2 e f g a
end

Attributes

num[RW]

The string representing the voice's number.

Public Class Methods

new(num) → Alda::Voice click to toggle source

Creates an Alda::Voice.

# File lib/alda-rb/event.rb, line 692
def initialize num
  @num = num
end

Public Instance Methods

to_alda_code() click to toggle source
# File lib/alda-rb/event.rb, line 696
def to_alda_code
  ?V + num + ?:
end