mirror of
https://github.com/chocolate-doom/research.git
synced 2024-11-26 14:01:03 +00:00
fdbaf07ec0
Subversion-branch: /research Subversion-revision: 1656
26 lines
285 B
Ruby
Executable file
26 lines
285 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
|
|
require "scanf"
|
|
|
|
index = 0
|
|
|
|
$stdin.each_line do |s|
|
|
|
|
if s !~ /Key on.*octave (\d+), freq 0x([0-9a-f]+)/
|
|
next
|
|
end
|
|
|
|
octave = $1.to_i
|
|
freq = $2.scanf("%x")
|
|
|
|
if index > 0
|
|
puts "#{index},#{octave},#{freq}"
|
|
end
|
|
|
|
index += 1
|
|
|
|
if index >= 512
|
|
break
|
|
end
|
|
end
|
|
|