0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SMC PAD Pocketのバンク切り替えをPCから行う

0
Last updated at Posted at 2026-04-23

評判のいい中華MIDIパッドコントローラーを買いました

専用のアプリ(MidiSuite.exe)を使って7バンクX4プリセットの登録ができます。
プリセットの切り替えは、上の4つのパッドのいずれかを押しながら電源入れることで切り替えできるようです。

バンクの切り替えに関しては、パッドの設定でMODEをControl、TypeをPadBank+(-)に設定すれば
押すたびにバンクの切り替えができるようになります。ただし、+だけしかアサインしないとバンクが進んで行くだけで戻すことができなくなります。。つまり切り替えを考えるとパッドが2つ使えなくなってしまいます。

なんか方法ないかな・・と思っていたところ、MidiSuite.exe内でバンクの切り替えすると実機のバンクも
切り替わることがわかりました。

ならば、、とwiresharkを使って何送ってるか解析してみたところ、MIDIのシステム・エクスクルーシブ・メッセージを送っていることがわかりました。

中身も見たところこんな感じのデータを送っていました。

send Data
{0xf0,0x00,0x32,0x09,0x49,0x00,0x00,0x40,0x02,0x70,0x16,0x00,0x00,0x10,0x00,0x00,0x00,0x01,0x7a,0x01,0xf7};        

送るデータがわかったのでpythonで送って見たところうまく切り替わってくれました!

SMC_PAD.py
import mido
from mido import Message
import time
import sys

print(mido.get_output_names())
print(mido.get_input_names())

c=sys.argv[1] #0〜6

da="f0 00 32 09 49 00 00 40 02 70 16 00 00 10 00 00 00 "
ta=" 01 f7"

OUTport=mido.open_output(mido.get_output_names()[1])
INport=mido.open_input(mido.get_output_names()[2])

h=124
a1=str(c).zfill(2)
h=h-int(c)*2
a2=str(hex(h))[2:4]
data=da+a1+" "+a2+ta
print(data)
msg=mido.Message.from_hex(data)
OUTport.send(msg)

OUTport.close()
INport.close()

MIDI送るだけなら入力のポートを開ける必要なさそうですが、信号送信後PAD側からなにか返してるみたいで
それを受け取らないとうまく切り替わらなかったので入力ポートの設定をしています。

※実行環境はubuntu24.04です。MidiSuite.exeはwineで動かしました

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?