Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/Ruby_Scripts/200.commands.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 82 by toshinagata1964, Sun May 28 02:15:58 2017 UTC revision 114 by toshinagata1964, Sun Sep 24 15:45:59 2017 UTC
# Line 22  def change_control_number_ext Line 22  def change_control_number_ext
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
# Line 207  end Line 207  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)  

Legend:
Removed from v.82  
changed lines
  Added in v.114

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26