Sha256: 89c30af00051f4fe04cd5236eb692585929f61b2e146cc323b842ef4b3481a7e

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

module Qcmd
  class Aliases
    def self.defaults
      @defaults ||= {
        'n' => 'cue $1 name $2',
        # zero-out sliders for cue_number
        'zero-out' => '(log-silent)' +
                      (1..48).map {|n| "(cue $1 sliderLevel #{n} 0)"}.join(' ') +
                      '(log-noisy) (echo "set slider levels for cue $1 to all zeros")',
        # copy-sliders from_cue_number to_cue_number
        'copy-sliders' => '(log-silent)' +
                          (1..48).map {|n| "(cue $2 sliderLevel #{n} (cue $1 sliderLevel #{n}))"}.join(' ') +
                          '(log-noisy) (echo "copied slider levels from cue $1 to cue $2")',
        'boost' => '(cue $1 sliderLevel $2 ++$3)',
        'drop'  => '(cue $1 sliderLevel $2 --$3)'
      }.merge(copy_cue_actions)
    end

    def self.copy_cue_actions
      Hash[
        %w(name notes fileTarget cueTargetNumber cueTargetId preWait duration
           postWait continueMode flagged armed colorName).map do |field|
          [
            "copy-#{ field }",
            "(cue $2 #{ field } (cue $1 #{ field }))"
          ]
        end
      ]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qcmd-0.2.0 lib/qcmd/aliases.rb
qcmd-0.1.16 lib/qcmd/aliases.rb
qcmd-0.1.16.pre2 lib/qcmd/aliases.rb
qcmd-0.1.16.pre lib/qcmd/aliases.rb