| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » SelectionFirst() | Version 2.2 |
SelectionFirst 関数は、セレクションの最初のフィクスチャに関する整数セットを返します。これには、パッチ・インデックス番号と、Selection Grid 内の XYZ グリッド値が含まれます。
返される4つの整数をすべて使う必要はありませんが、それらは順番に返されます。
この関数は、引数を受け取りません。
セレクションの最初フィクスチャについて返された数値を Command Line History に出力します。
Lua |
return function() -- Store the return in a local variable local fixtureIndex, gridX, gridY, gridZ = SelectionFirst(); -- Cancel the plugin if no fixture is selected assert(fixtureIndex,"Please select a fixture and try again."); -- Print the index number of the first fixture in the selection Printf("First selected fixture has index number: "..fixtureIndex .." and gridX value: "..gridX .." and gridY value: "..gridY .." and gridZ value: "..gridZ); end |