vrchat-midicon

command module
v0.0.0-...-7a79955 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 14 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.

README

vrchat-midicon

Go Report Card License

「VRChat内でオブジェクトを掴んで回すとローカルマシン上のMIDIメッセージ(コントロールチェンジ)として送信される」ギミックを実現するためのコマンドラインツールです。

デモ

thumbnail

しくみ

本プログラムは以下の 4. を行うものです。1. ~ 3. の工程を実現するには、この用途を前提としたVRChatワールドが必要です。画像を参考に作成してください。

  1. ワールド内に配置したノブをプレイヤーが回すと、裏面に貼ってあるグラデーションも回る(円錐状に色相が変化する)

  2. ノブ裏面のある一点を Camera が映し、1px四方の RenderTexture にその色が書き込まれる

  3. その RenderTexture を貼った Quad をノブの数だけ横に並べておき、それをプレイヤーの Stream Camera で映してデスクトップに表示する

  4. デスクトップに表示されている映像をこのプログラムがキャプチャし、ノブの数だけサンプリングした点の色から色相(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

つかいかた

  1. vrchat-midicon.exe list でMIDI出力ポート一覧を表示

    [0] Microsoft GS Wavetable Synth 0
    [1] Komplete Audio 6 MIDI 1
    [2] loopMIDI Port 2
    [3] nanoKONTROL2 3
    
  2. vrchat-midicon.exe start <MIDI出力ポート番号> <CC0> <CC1> で開始

    • <MIDI出力ポート番号> には1.で調べた目的のポートの先頭にある数字を指定
    • <CC0>, <CC1> にはそれぞれ画面左手・右手に映っている Quad の色と対応するCC番号を指定(ノブ正面から見ると左右が逆になることに注意)

ライセンス

MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址