Module: MicroMIDI

Extended by:
MicroMIDI
Included in:
MicroMIDI
Defined in:
lib/micromidi.rb,
lib/micromidi/state.rb,
lib/micromidi/device.rb,
lib/micromidi/context.rb,
lib/micromidi/module_methods.rb,
lib/micromidi/instructions/input.rb,
lib/micromidi/instructions/sysex.rb,
lib/micromidi/instructions/output.rb,
lib/micromidi/instructions/sticky.rb,
lib/micromidi/instructions/message.rb,
lib/micromidi/instructions/process.rb,
lib/micromidi/instructions/composite.rb,
lib/micromidi/instructions/shorthand.rb

Defined Under Namespace

Modules: Device, Instructions, Session Classes: Context, State

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.m(*args, &block) ⇒ Object


6
7
8
# File 'lib/micromidi/instructions/shorthand.rb', line 6

def self.m(*args, &block)
  send(:message, *args, &block)
end

Instance Method Details

#new(*args, &block) ⇒ Context

Shortcut to create a new context

Parameters:

  • args (*Object)
  • block (Proc)

Returns:


9
10
11
12
13
# File 'lib/micromidi/module_methods.rb', line 9

def new(*args, &block)
  inputs = Device.get_inputs(args)
  outputs = Device.get_outputs(args)
  Context.new(inputs, outputs, &block)
end