| 22 |
item(:checkbox, :title=>"Change only editable tracks", :tag=>"editable_only"), |
item(:checkbox, :title=>"Change only editable tracks", :tag=>"editable_only"), |
| 23 |
item(:checkbox, :title=>"Change only selected events", :tag=>"selection_only")) |
item(:checkbox, :title=>"Change only selected events", :tag=>"selection_only")) |
| 24 |
} |
} |
| 25 |
if hash["status"] == 0 |
if hash[:status] == 0 |
| 26 |
old = hash["old"] |
old = hash["old"].to_i |
| 27 |
new = hash["new"] |
new = hash["new"].to_i |
| 28 |
editable_only = hash["editable_only"] |
editable_only = hash["editable_only"] |
| 29 |
selection_only = hash["selection_only"] |
selection_only = hash["selection_only"] |
| 30 |
# puts "old = #{old}, new = #{new}, editable_only = #{editable_only}" |
puts "old = #{old}, new = #{new}, editable_only = #{editable_only}" |
| 31 |
each_track { |tr| |
each_track { |tr| |
| 32 |
next if editable_only && !tr.editable? |
next if editable_only != 0 && !tr.editable? |
| 33 |
tr.send(selection_only ? :each_selected : :each) { |p| |
tr.send(selection_only != 0 ? :each_selected : :each) { |p| |
| 34 |
if p.kind == :control && p.code == old |
if p.kind == :control && p.code == old |
| 35 |
p.code = new |
p.code = new |
| 36 |
end |
end |
| 207 |
|
|
| 208 |
end |
end |
| 209 |
|
|
| 210 |
register_menu("Change timebase...", :change_timebase) |
register_menu("Change Timebase...", :change_timebase) |
| 211 |
register_menu("Randomize ticks...", :randomize_ticks, 1) |
register_menu("Randomize Ticks...", :randomize_ticks, 1) |
| 212 |
register_menu("Thin selected events...", :thin_events, 1) |
register_menu("Thin Selected Events...", :thin_events, 1) |
|
# register_menu("Change control number...", :change_control_number_ext) |
|