Discover Packages
github.com/chigirits/vrchat-midicon
command
module
Version:
v0.0.0-...-7a79955
Opens a new window with list of versions in this module.
Published: Mar 15, 2020
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
vrchat-midicon
「VRChat内でオブジェクトを掴んで回すとローカルマシン上のMIDIメッセージ(コントロールチェンジ)として送信される」ギミックを実現するためのコマンドラインツールです。
デモ
しくみ
本プログラムは以下の 4. を行うものです。1. ~ 3. の工程を実現するには、この用途を前提としたVRChatワールドが必要です。画像を参考に作成してください。
ワールド内に配置したノブをプレイヤーが回すと、裏面に貼ってあるグラデーションも回る(円錐状に色相が変化する)
ノブ裏面のある一点を Camera が映し、1px四方の RenderTexture にその色が書き込まれる
その RenderTexture を貼った Quad をノブの数だけ横に並べておき、それをプレイヤーの Stream Camera で映してデスクトップに表示する
デスクトップに表示されている映像をこのプログラムがキャプチャし、ノブの数だけサンプリングした点の色から色相(0..360)の配列を作成、それをMIDIコントロールチェンジ(0..127)の配列へ変換してMIDIインタフェースに送信する(色相と値の対応は以下)
色
RGB
値
赤
#FF0000
0.0
黄色
#FFFF00
25.4
緑
#00FF00
50.8
シアン
#00FFFF
76.2
青
#0000FF
101.6
マゼンタ
#FF00FF
127.0
ビルド
go build -o vrchat-midicon.exe *.go
つかいかた
vrchat-midicon.exe list でMIDI出力ポート一覧を表示
[0] Microsoft GS Wavetable Synth 0
[1] Komplete Audio 6 MIDI 1
[2] loopMIDI Port 2
[3] nanoKONTROL2 3
vrchat-midicon.exe start <MIDI出力ポート番号> <CC0> <CC1> で開始
<MIDI出力ポート番号> には1.で調べた目的のポートの先頭にある数字を指定
<CC0>, <CC1> にはそれぞれ画面左手・右手に映っている Quad の色と対応するCC番号を指定(ノブ正面から見ると左右が逆になることに注意)
ライセンス
MIT License
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.