This project integrates bluetooth toys to VRChat avatars using OSC.
- DG-Lab E-Stim
- VRChat (you must have an avatar supporting OSC with suitable avatar parameters)
This program will communicate with VRChat using OSC.
It will listen to some values from VRC, and change the strength of toys.
For example, with this program, you can implement effects like when someone touch ears of your avatar, you will get shocked.
- Download the latest release from release page.
- unzip the file and run
osc-toys.exe
. - Find an avatar supports OSC parameters, such as avatars enabled VRCContactReceiver.
- Note that the parameters should be
float
. I.e. Proximity reveiver type. - If you don't know what it is, find a modeler/avatar-creater to help you.
- Note that the parameters should be
- Start VRC, fill in necessary fields in WebUI and click
Connect and Start
button inCoyote
page. Enjoy it with your partner!
You can also run the program from source code on your own demand.
- Clone this repo and install dependences.
git clone https://github.com/Sakura0721/osc-toys.git
cd osc-toys
pip install -r requirements.txt
- Complie frontend:
cd frontend
npm install
npm run build
npm run export
- Run the program:
python main.py
It's not recommended to change the default settings because the WebUI is enough for most users.
In case you want to change the settings, here are some fields you can change in settings.yaml
:
coyote_uid
: If you don't know what it is, just setcoyote_uid: ""
, the program will try to detact your device automatically.coyote_safe_mode
: Enable or disable safe mode. This caps the max e-stim output of the device. Warning: Don't touch unless you know what you're doing!coyote_max_power_a
andcoyote_max_power_b
: Output power of Coyote when the value from VSC equals to1.0
.coyote_pattern_a
andcoyote_pattern_b
: Output pattern of Coyote. Seedata\estim\pattern_dict.json
.coyote_addr_a
andcoyote_addr_b
: OSC address bind to channel A/B.vrc_host
andvrc_osc_port
: OSC ip address and port of VRC. If you have no idea what it is, leave it as default.
TBD: Better documentation here.
E-stim patterns are listed under the data/estim/pattern_dict.json
file, and the data/estim/patterns/
folder.
- The program can't connect to Coyote. / The program disconnects from Coyote sometimes.
- If the program faild to connect to Coyote, try re-run it or re-run it after reboot bluetooth of your computer. Notices that you should run the program when the light of Coyote is NOT
white
. If the light iswhite
, it means the device is in pairing mode, and the program can't connect to it. - The connection quality issue is caused by many reasons, such as the device is too far from your computer, or there are too many bluetooth devices around you. Try to move your device closer to your computer, or move your computer to a place with less bluetooth devices.
- If the program faild to connect to Coyote, try re-run it or re-run it after reboot bluetooth of your computer. Notices that you should run the program when the light of Coyote is NOT
- The change of strength is not smooth or with latency.
- As tested, the program works fine when
window_size = 0.1
, i.e. the program will update the strength of toys every 0.1 seconds. If you want to make the change smoother, you can try to decrease the value ofwindow_size
. But when the value is too small, the Coyote device may not be able to handle it (too many power update request), and the change will be delayed. So you should find a balance.
- As tested, the program works fine when
OSC-Toys Official Discord Server
- Decouple the OSC server and the bluetooth communication.
- Currently int the code, the OSC server and bluetooth device start and stop together. This is not a good design. The OSC server should be able to run without bluetooth device connected. Otherwise, adding more toys will be difficult.
- Add more toys.
- If you have any toys want to be supported, welcome to open an issue or a PR.
- Support GUI.
- A WebUI has been added.
- Change the implementation of communication with Coyote.
- Some of the problems currently encountered (connection, and update delays) may be related to python's bluetooth library and async implementation. Not sure if switching to another implementation will improve, it may take some experimenting.
- Code of communication with Coyote is based on GIFT. Thanks to @MinLL and @inertaert.