SetFader(handle, {[number], [boolean], [string]})

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object API » SetFader(handle, {[number], [boolean], [string]})
Version 2.2

説明

SetFader 関数は、フェーダを指定されたレベルに設定します。フェーダを持つオブジェクトで用いる必要があります。

引数

  • handle:
    light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます。
  • table:
    テーブルには、キー/値形式で最大3つの名前付き要素を含めることができます。
    • "value":
      0〜100のスケールでフェーダ位置を示す浮動小数点数値です。これは常にテーブルの一部である必要があります。
    • "token":
      フェーダを表す文字列です。文字列は "Fader" で始まる必要があります。省略した場合、値は Master フェーダに割り当てられます。フェーダ名は、使用するオブジェクトに対して有効でなければなりません
      使用可能なトークンは以下の通りです。
      • "FaderMaster"
      • "FaderX"
      • "FaderXA"
      • "FaderXB"
      • "FaderTemp"
      • "FaderRate"
      • "FaderSpeed"
      • "FaderHighlight"
      • "FaderLowlight"
      • "FaderTime"
      • "FaderSolo"
    • "faderEnabled":
      フェーダが切り替え可能な場合、この boolean 値を用いてフェーダを有効/無効にできます。true に設定すると、フェーダが有効になります。

戻り値

この関数は何も返しません。

この例では、選択したシーケンスの Master フェーダを100%に変更し、Time フェーダを5秒に変更して、それを有効にします。

Lua
return function()
-- SelectedSequence() creates a handle to the selected sequence.
local selectedSequence = SelectedSequence()
-- Set the master fader to 100. The FaderMaster is the default token, so it can be omitted.
selectedSequence:SetFader({value=100.0})
-- Set the time fader to 5 seconds and enable the fader.
selectedSequence:SetFader({value=50.0, faderEnabled=1, token="FaderTime"})
end