class Midi_interface

Attributes

output[RW]

Public Class Methods

new() click to toggle source
# File lib/melody_object/midi_interface.rb, line 7
def initialize

@output=UniMIDI::Output.open(0)
  
end

Public Instance Methods

note_off(note,channel,velocity) click to toggle source
# File lib/melody_object/midi_interface.rb, line 20
def note_off(note,channel,velocity)     
@output.puts(0x80|channel, note, velocity) # note on

  
end
note_on(note,channel,velocity) click to toggle source
# File lib/melody_object/midi_interface.rb, line 13
def note_on(note,channel,velocity)     
@output.puts(0x90|channel, note, velocity) # note on

  
end