Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

w/o block example

  • Loading branch information...
commit bde204a699ced9e75e2a7776ec63161c3ccb2cb5 1 parent f2a2d59
@arirusso authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 examples/without_block.rb
View
18 examples/without_block.rb
@@ -0,0 +1,18 @@
+#!/usr/bin/env ruby
+$:.unshift File.join( File.dirname( __FILE__ ), '../lib')
+
+require "micromidi"
+
+# this example demonstrates using MicroMIDI without a block
+# this allows you to use it as a more conventional Ruby library
+
+@o = UniMIDI::Output.use(:first)
+
+midi = MIDI::IO.new(@o)
+
+midi.note("C")
+midi.off
+
+midi.cc(5, 120)
+
+midi.play("C3", 0.5)
Please sign in to comment.
Something went wrong with that request. Please try again.