README.md in midiops-0.1.1 vs README.md in midiops-0.2.0
- old
+ new
@@ -1,10 +1,11 @@
# MIDIOps
[![Gem Version](https://badge.fury.io/rb/midiops.svg)](https://rubygems.org/gems/midiops)
+[![Circle CI](https://circleci.com/gh/polamjag/midiops.svg?style=svg)](https://circleci.com/gh/polamjag/midiops)
-MIDI Operator. Heavily inspired by [this blog entry](http://hitode909.hatenablog.com/entry/2015/07/28/134304) and [hitode909/sketch-midi](https://github.com/hitode909/sketch-midi).
+MIDI Operations. Heavily inspired by [this blog entry](http://hitode909.hatenablog.com/entry/2015/07/28/134304) and [hitode909/sketch-midi](https://github.com/hitode909/sketch-midi).
## Installation
[MIDIOps is available on Rubygems](https://rubygems.org/gems/midiops).
@@ -25,31 +26,25 @@
## Usage
This is a super simple example:
```ruby
-require 'unimidi'
+require 'midiops'
observer = MIDIOps::Observer.new
-observer.on [144, 72, 127] do
+observer.on_key 0, :C, 5 do
puts "Ch.0.C5 pressed!"
end
+observer.on_key 0, :D, 5 do |vel|
+ puts "Ch.0.C5 pressed with velocity #{vel}!"
+end
+
observer.listen_first
```
-Execute and press C5 key on your midi device.
-
-Optionally, you can set number of worker thread for massive parallelism like this:
-
-```ruby
-require 'unimidi'
-
-observer = MIDIOps::Observer.new 3 # three workers
-
-# ...
-```
+Connect some MIDI keyboard and execute the script, then press key C5 or D5 on your midi device. Hooray!
See `/examples` for more materials.
## Development