GetFader(handle, {[string],[integer]})

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

説明

GetFader 関数は、オブジェクトのフェーダ位置を示す浮動小数点数値を返します。

引数

  • handle:
    light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます(後述の例を参照)。
  • table:
    テーブルには、トークンとインデックスという2つの要素を含めることができます。重要な要素はトークンです。
    • token: どのフェーダ値を要求するかを指定します。有効な値は以下のとおりです。
      • FaderMaster
      • FaderX
      • FaderXA
      • FaderXB
      • FaderTemp
      • FaderRate
      • FaderSpeed
      • FaderHighlight
      • FaderLowlight
      • FaderSolo
      • FaderTime

戻り値

  • number:
    フェーダ位置を示す浮動小数点数値を返します。

選択したシーケンスの Master および Rate フェーダの位置を出力します。

Lua
return function()
-- SelectedSequence() creates a handle to the selected sequence.
local selectedSequence = SelectedSequence()
-- Get the value for the Master fader.
local faderMasterValue = selectedSequence:GetFader({})
-- Get the value for the Rate fader.
local faderRateValue = selectedSequence:GetFader({token="FaderRate"})
-- Print feedback with the values.
Printf("The selected sequence Master fader value is: ".. tostring(faderMasterValue))
Printf("The selected sequence Rate fader value is: ".. tostring(faderRateValue))
end