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

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

説明

GetFaderText 関数は、オブジェクトのフェーダ値を示す文字列を返します。

引数

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

戻り値

  • string:
    フェーダ値を示す文字列を返します。

選択したシーケンスの Master および Rate フェーダの値を文字列で出力します。

Lua
return function()
-- SelectedSequence() creates a handle to the selected sequence.
local selectedSequence = SelectedSequence()
-- Get the value for the Master fader. Since it is the default, no token needs to be defined.
local faderMasterText = selectedSequence:GetFaderText({})
-- Get the value for the Rate fader.
local faderRateText = selectedSequence:GetFaderText({token="FaderRate"})
-- Print feedback with the values.
Printf("The selected sequence Master fader value text is: ".. tostring(faderMasterText))
Printf("The selected sequence Rate fader value text is: ".. tostring(faderRateText))
end