Skip to content

Instantly share code, notes, and snippets.

@aisot

aisot/README.md Secret

Last active February 24, 2023 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aisot/60123e671433b14e669ff24baf438633 to your computer and use it in GitHub Desktop.
Save aisot/60123e671433b14e669ff24baf438633 to your computer and use it in GitHub Desktop.
TouchOSCを使う場合

これは、MIDI入力をOSCとして送信するためのTouchOSC用のスクリプトです。 使用するには「TouchOSC」が必要です。

設定

Scriptの入力

右下のScriptの項目にこのページにあるLuaスクリプトを入れる

image1

MIDI入力デバイスの設定

メニュー[Edit]→[Prefernes]→[MIDI] Inputsの中から使用するMIDIデバイスにチェックを入れる

image2

メニュー[Edit]→[Connections]→[MIDI]

Connection1にチェックを入れて「Receive Port:」の「Browse」から使用するMIDIデバイスを選択する

image3

OSC送信先の設定

メニュー[Edit]→[Connections]→[OSC]

  • 「Connection1」にチェックを入れて[UDP]を選択
  • 「Host:」を「127.0.0.1」
  • 「Send Port:」をデフォルトなら「19100」にする

image4

ログの表示

メニュー[View]→[Toggle Log]

ライセンス

CC0 1.0(著作権なし)

function onReceiveMIDI(data, connections)
print('/rawmidi\t', table.unpack(data))
sendOSC(
{
'/rawmidi',
{
{ tag = 'i', value = data[1] },
{ tag = 'i', value = data[2] },
{ tag = 'i', value = data[3] },
}
}
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment