Skip to content

Commit

Permalink
comments, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arirusso committed Apr 6, 2011
1 parent 99f870a commit bd4a692
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.rdoc
Expand Up @@ -29,6 +29,10 @@ gem install midi-winmm
== Tests

please see {test/config.rb}[http://github.com/arirusso/midi-winmm/blob/master/test/config.rb] before running tests

== Documentation

{rdoc}[http://rdoc.info/gems/midi-winmm]

== License

Expand Down
2 changes: 1 addition & 1 deletion lib/midi-winmm.rb
Expand Up @@ -4,7 +4,7 @@
# of the WinMM System API
#
module MIDIWinMM
VERSION = "0.0.1"
VERSION = "0.1.0"
end

require 'ffi'
Expand Down
9 changes: 8 additions & 1 deletion lib/midi-winmm/input.rb
Expand Up @@ -58,7 +58,14 @@ def gets
msgs
end

# same as gets but returns message data as string of hex digits
# same as gets but returns message data as string of hex digits as such:
# [
# { :data => "904060", :timestamp => 904 },
# { :data => "804060", :timestamp => 1150 },
# { :data => "90447F", :timestamp => 1300 }
# ]
#
#
def gets_bytestr
msgs = gets
msgs.each { |msg| msg[:data] = msg[:data].map { |b| s = b.to_s(16).upcase; b < 16 ? s = "0" + s : s; s }.join }
Expand Down

0 comments on commit bd4a692

Please sign in to comment.