mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Use standard ruby debug mechanism
This commit is contained in:
parent
cb762c4eee
commit
9a9ca22d9a
|
@ -5,8 +5,6 @@
|
||||||
# Based on reverse engineering work by Alf Warnock & Alain Brenzikofer
|
# Based on reverse engineering work by Alf Warnock & Alain Brenzikofer
|
||||||
#
|
#
|
||||||
|
|
||||||
DEBUG = false
|
|
||||||
|
|
||||||
require File.dirname($0)+'/plistWriter'
|
require File.dirname($0)+'/plistWriter'
|
||||||
require File.dirname($0)+'/vl'
|
require File.dirname($0)+'/vl'
|
||||||
|
|
||||||
|
@ -326,7 +324,7 @@ end
|
||||||
|
|
||||||
if styleFile
|
if styleFile
|
||||||
styleFile = File.basename(styleFile, '.STY')
|
styleFile = File.basename(styleFile, '.STY')
|
||||||
puts "Style #{styleFile}" if DEBUG
|
puts "Style #{styleFile}" if $DEBUG
|
||||||
groove = STY_GROOVE[styleFile] || groove
|
groove = STY_GROOVE[styleFile] || groove
|
||||||
end
|
end
|
||||||
OUTPUT['groove'] = groove[0] || 'Swing'
|
OUTPUT['groove'] = groove[0] || 'Swing'
|
||||||
|
@ -341,16 +339,16 @@ if biab.sub!(/^.*?\xA0\xB0\xC1/m, '')
|
||||||
(0...noteCount).each do |i|
|
(0...noteCount).each do |i|
|
||||||
onset, channel, pitch, velocity, duration = biab[i*12, 12].unpack('VCCCxV')
|
onset, channel, pitch, velocity, duration = biab[i*12, 12].unpack('VCCCxV')
|
||||||
break if channel==0
|
break if channel==0
|
||||||
puts "O #{onset}; C #{channel}; P #{pitch}; V #{velocity}; D #{duration}" if DEBUG
|
puts "O #{onset}; C #{channel}; P #{pitch}; V #{velocity}; D #{duration}" if $DEBUG
|
||||||
if channel==176 or channel==179
|
if channel==176 or channel==179 or channel==180
|
||||||
pitch = VL::NoPitch
|
pitch = VL::NoPitch
|
||||||
end
|
end
|
||||||
onset = (onset / 10.0).round
|
onset = (onset / 10.0).floor
|
||||||
RAWNOTES.push([onset, pitch])
|
RAWNOTES.push([onset, pitch])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
p RAWNOTES, CHORDS, STEPS, ROOTS if DEBUG
|
p RAWNOTES, CHORDS, STEPS, ROOTS if $DEBUG
|
||||||
|
|
||||||
CHORDS.pop
|
CHORDS.pop
|
||||||
measLen = VL::Fract.new(PROP['timeNum']*48, PROP['timeDenom']).num
|
measLen = VL::Fract.new(PROP['timeNum']*48, PROP['timeDenom']).num
|
||||||
|
|
Loading…
Reference in New Issue
Block a user