Objective
Use MIDI Device(Such as MIDI Keyboard,Pedal) as VRCHAT motion control function(OSC)
Join VRChat Beta program
Open Steam and open VRCHAT property window.
Choice open-beta - Open Beta
Close window.
It should be reloading.
Check VRCHAT+OSC is enabled.
Launch VRCHAT at desktop mode.
Press R hold and click options.
Make sure you can see OSC menu.
Click OSC Debug and check it.
It is OK to proceed next step if you can see this message.
If you see OSC was turned off in your settings ~~~
at first line....
Open OSC menu and make sure OSC Enabled is enabled.(Picture's status is disabled)
Just click it and enable it.
Nice! Let's go next step, DO NOT close your VRCHAT and keep the debug screen up..
Install TouchOSC
https://hexler.net/touchosc#_
Click GET TOUCHOSC
Click Windows
and Download it
Launch TouchOSC
If you have money, Why don't you purchase licences?
Connect settings TouchOSC to VRCHAT
Choice TouchOSC Edit
→Connections
Configure like screenshot as below(FYI, It will NOT work if you set host to "localhost" set "127.0.0.1")
Done and back to main window.
Add control button
Test sending click event from TouchOSC
Maybe you can check more easily if you put a window side by side.
Click Run button(▶) in TouchOSC
You can check that TouchOSC sent button event from OSC to VRCHAT
If you want to close run mode, click a point which locate upright.
[Main topic] OSC events triggered by MIDI signals
Configure MIDI input in TouchOSC
TouchOSC Edit
→Connections
→MIDI
Click "Browse" and set MIDI Device output(Send Port)and input(Receive Port)
Done!
Install MIDI monitoring tool "Protokol"
Monitor MIDI note data
MIDI note(ex. C1 at keyboard)
MIDI Control Change(ex. sustain pedal as 64)
RECEIVE | ENDPOINT(A-Series Keyboard) TYPE(CONTROLCHANGE) CHANNEL(1) DATA1(64) DATA2(79)
は
`RECEIVE | MIDI (DEVICENAME) TYPE(TYPE NAME) CHANNEL(1) DATA1(ControllNo.:64) DATA2(Velocity:0-127)
These numbers and parameters will be use in MIDI input mapping phase.
Make MIDI input to OSC event
- Click "Button" and show details.
- Expand
Messages
→MIDI
tab details.
Enable →Check
Send → Not Check
Receive →Check
Feedback→Check
Connections: 1 OK MIDI input device No.
Trigger : Default OK(as screenshot shows)
Type: if use midi note NOTE_ON
, if you use pedals,CONTROL CHANGE
Channel: Choice CONSTANT input channel No. which you checked at monitar(here:1)
Note: Choice CONSTANT input midi note No.(Here, C1key :64)
Velocity: Default OK(x : VALUE)
Scale: Set input range.(0-127)
Test with VRCHAT OSC DEBUG
Click TouchOSC Run(▶) button.
Animation show
In the following animation, Protokol is shown in the lower right to see the MIDI response, VRCHAT's ORC DEBUG screen is running in the background, and OSC DEBUG is running in the lower left.
Here's how it works when I press the C1 (Do) key as a test!
Assign to VRCHAT motion
Now that we have successfully sent the data to VRCHAT, let's assign the VRCHAT functions.C:\Users\{$USERNAME}\AppData\LocalLow\VRChat\VRChat\OSC\{hogehoge}\Avatars
There is a json for each avatar
This JSON has a parameter called input, and by sending a request with the specified type (Int in this case) in this address, the corresponding function will become available.
By setting the address listed in address
as the destination of TouchOSC button events, you can use the avatar function from OSC.
{
"name": "VRCEmote",
"input": {
"address": "/avatar/parameters/VRCEmote",
"type": "Int"
},
"output": {
"address": "/avatar/parameters/VRCEmote",
"type": "Int"
}
},
This time we will use the default Emote function of VRC (avatar/parameters/VRCEmote
). (It's like Wave or Die...).
Click on a TouchOSC button and change the value of Control
→Name
from the default value of button1 in Detail View.
→The first /
should be pulled out and replaced with →avatar/parameters/VRCEmote
.
After making the changes, run TouchOSC again (▶) and press the C1 (Do) key.
A single parameter may have multiple functions assigned to it. For example, in avatar/parameters/VRCEmote
, you can use other functions such as Clap and Die depending on the Int value you give.
To change the Int value, click the TouchOSC button
-> right side detail view
-> Messages
-> OSC
-> change the Scale
range.
If we set this to 2, we get ....
In closing
I've been using VRCHAT for about two weeks now, and I'd like to thank the community for being so kind to me, and I hope this article will help those of you who are trying to enjoy VRCHAT more.
Reference
Special Thanks
@dokkozo He provided information on the section to assign to VRCHAT motions.
Also, his(her) avatars are super very kawaii, which motivates me.