| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » FromAddr(string[, handle]) | Version 2.2 |
FromAddr 関数は、番号付けまたは名前付けされたアドレスを、コマンドで使用できるハンドルに変換します。
最初のシーケンスのアドレスを出力します。
Lua |
return function() -- Converts the string to a handle and store in a variabel. local mySequenceHandle = FromAddr("14.14.1.6.1") -- Converts the handle back to a numbered string and prints it. Printf("The address is: " ..mySequenceHandle:Addr()) -- Converts the handle to a named string and prints it. Printf("The address is: " ..mySequenceHandle:AddrNative()) -- Store the handle of the selected datapool. local myDataPool = DataPool() -- Prints the address of the selected datapool. Printf("The datapool address is: " ..myDataPool:Addr()) --- The follwoing example uses the name of a sequence in the sequence pool. --- Please adjust the "Default" name in the next line to match an existing named sequence. -- Finds the address based on the base location and a text string with names. local alsoMySequenceHandle = FromAddr("Sequences.Default", myDataPool) -- Converts the handle back to a numbered string and prints it. Printf("The address is: " ..alsoMySequenceHandle:Addr()) -- Converts the handle to a named string and prints it. Printf("The address is: " ..alsoMySequenceHandle:AddrNative()) end |