Class: NoteSender

Inherits:
Object
  • Object
show all
Defined in:
lib/midinous/proc_midi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(note, chan, vel) ⇒ NoteSender

Returns a new instance of NoteSender.



104
105
106
107
108
# File 'lib/midinous/proc_midi.rb', line 104

def initialize(note,chan,vel)
	@note = note
	@chan = chan
	@vel  = vel
end

Instance Attribute Details

#chanObject (readonly)

Returns the value of attribute chan.



103
104
105
# File 'lib/midinous/proc_midi.rb', line 103

def chan
  @chan
end

#noteObject (readonly)

Returns the value of attribute note.



103
104
105
# File 'lib/midinous/proc_midi.rb', line 103

def note
  @note
end

#velObject (readonly)

Returns the value of attribute vel.



103
104
105
# File 'lib/midinous/proc_midi.rb', line 103

def vel
  @vel
end

Instance Method Details

#playObject



110
111
112
# File 'lib/midinous/proc_midi.rb', line 110

def play
	Pm.note_send(@chan,@note,@vel)
end

#stopObject



113
114
115
# File 'lib/midinous/proc_midi.rb', line 113

def stop
	Pm.note_rlse(@chan,@note)
end