These notes collect app usage, Unity development and device integration notes for OpenSoundLab.
- See the OpenSoundLab Quickstart
- Turn off Auto Sleep in the headset and the IR Distance Sensor via MQDH so the headset keeps running when you remove it from your head.
- Benefits:
- Sound can keep running continuously
- Network timeout kicks are less likely
- You avoid tracking offset glitches when the headset tracks continuously
- Benefits:
- See the build instructions
- Install and use Git for cloning
- Quest Link only works on x64 Windows systems
- Download the Meta Quest Link app
- Log into the Meta Quest Link app with your Meta user
- Connect your Meta Quest headset
- If applicable, quit the currently running app on Quest
- Make sure that only one headset is connected to the PC
- Try Air Link. It is usually more robust when Wi-Fi is good.
- Please note: cable link will not work if Air Link is active.
- Meta Quest Link > Settings > Beta > Restart Quest Link
- Meta Quest Debug Tool > Restart Meta service
- Kill all Meta-related processes in Task Manager
- Meta Quest Developer Hub must show "Device Setup" and "USB Test" when clicking a headset
- If not, restart the PC
- Try reinstalling the Link driver on your computer. You can find the installable Meta driver file at
c:\Program Files\Oculus\Support\oculus-drivers\oculus-driver.exe. - If connection issues persist, follow these steps for purging rotten configs: https://www.reddit.com/r/OculusQuest/comments/uv5clc/completely_remove_all_oculus_software/
- Apparently Quest framerate should be set to standard 72, otherwise tearing can occur.
- Turning off USB power saving might help with connection problems.
- Important: Visible Game tabs in Unity that are attached to the Layout currently (Unity 2022) produce significant frame drops with Quest Link. Therefore, hide the Game tab or detach it to a floating window.
- See the OpenSoundLab Quickstart
- Make sure you have your changes in Assets/StreamingAssetsPreZip
- Do a full build export. Running in Editor or patching a build is not enough. This will overwrite the zips in Assets/StreamingAssets.
- These zips are deployed to standalone builds, but they are only actually decompressed into your player preference folder if your OpenSoundLab/OpenMultiLab folder does not exist when opening the app. For example, this happens when it has been deleted by hand or by uninstalling the app first. Only then are the default files written to the headset player preference folder.
- This seems to occur when copying XML patch save files via SideQuest
- Even though they are readable to the group
ext_data_rw, they apparently also need to be writable for the group - This command fixes this:
adb shell "chmod 777 /sdcard/Android/data/io.sphericals.OpenMultiLab/files/OpenSoundLab/Saves/*.xml"You can run it via PowerShell, Terminal or Meta Quest Developer Hub (MQDH). You can use Chocolatey on Windows or Homebrew on macOS to install ADB system-wide as a package.
Please note that these instructions are still very rudimentary and might not be enough for you to create new devices. Better documentation will follow.
- Add your Prefab "YourDevice" to Resources/Prefabs, or duplicate a similar one
- Add or copy yourDeviceInterface.cs and yourSignalGenerator.cs in a new folder at /Assets/Scripts/YourDevice
- Add YourDeviceType to MenuItem.DeviceType and give it a label and category index
- Add yourDeviceInterface.cs and yourSignalGenerator.cs to your Prefab, or replace old scripts if the prefab was duplicated
- Add handle scripts, if not copied
- Also create a Prefab Variant of the Prefab in MenuPrefabs
- Remove all scripts on the Prefab Variant
- Define appearance in the menu
- TODO: reactivate the auto stripping script?
- Add Menu Variant to RemoveDeviceComponents.cs in RemoveDeviceComponents
- Required for spawning from menu: add to Registered Spawnable Prefabs in both LocalNetworkManager and OslRelayNetworkManager in NetworkManager, i.e. in both oslLocalNetworkScene and oslRelayNetworkScene. Do not press "Populate Spawnable Prefabs", since that adds too much undesired stuff.
- Add NetworkIdentity, NetworkAuthority, NetworkTransform and whatever else you want to sync on the network, if not copied
- Define YourData in yourDeviceInterface.cs, implement GetData() and Load(InstrumentData d)
- Add YourData and YourDeviceType to xmlUpdate.cs. That is two separate switch statements, add them to both.
- Add [XmlInclude(typeof(YourData))] to SaveLoadInterface.cs
- Fork the main repository before coding on GitHub
- Clone your fork to local
- Create a feature branch for your developments
- Push to your own fork on GitHub
- Create and send a pull request for your commits
adb shelladb tcpip 5555for wireless debuggingadb connect 192.168.178.34:5555with the IP address adapted- Record clean 60 fps video on Quest 2:
setprop debug.oculus.capture.bitrate 10000000; setprop debug.oculus.refreshRate 60; setprop debug.oculus.fullRateCapture 1; setprop debug.oculus.gpuLevel 4; setprop debug.oculus.cpuLevel 4- Record mostly clean 60 fps video on Quest 3 (macOS version):
adb shell setprop debug.oculus.refreshRate 120; adb shell setprop debug.oculus.fullRateCapture 0; adb shell setprop debug.oculus.swapInterval 2; adb shell setprop debug.oculus.drrForceDisable 1; adb shell setprop debug.oculus.cpuLevel 5; adb shell setprop debug.oculus.gpuLevel 5; adb shell setprop debug.oculus.capture.bitrate 10000000- Record mostly clean 60 fps video on Quest 3 (Git Bash on Windows, run this inside the scrcpy folder):
./adb.exe shell setprop debug.oculus.refreshRate 120; ./adb.exe shell setprop debug.oculus.fullRateCapture 0; ./adb.exe shell setprop debug.oculus.swapInterval 2; ./adb.exe shell setprop debug.oculus.drrForceDisable 1; ./adb.exe shell setprop debug.oculus.cpuLevel 5; ./adb.exe shell setprop debug.oculus.gpuLevel 5; ./adb.exe shell setprop debug.oculus.capture.bitrate 10000000"cat /proc/meminfo" | grep MemFreeadb logcat -s VrApiadb logcat | grep Unity
Please note: scrcpy sometimes shows flashing glitches on Meta Quest 3 when using --crop, --angle or interacting with the Meta menus. Consider doing your cropping and rotating in OBS instead, although it might work fine for you.
- Install scrcpy. On macOS run:
brew install scrcpy- Connect the Quest headset via USB and accept ADB debugging in the headset.
- Sometimes this prompt does not appear. Either you already allow debugging connections and can proceed or you have to make that prompt reappear again. Instructions on the latter will follow.
- Then open Terminal, assuming that you have ADB installed system-wide.
- Enter this command. This will identify the IP address of the connected headset, open up a TCP/IP ADB server on the headset, connect to the headset via Wi-Fi and open a scrcpy connection via TCP/IP. Remove the cropping and rotating if you see flashes. You can remove the USB cable when you see the stream:
adb shell svc usb setFunctions adb; \
adb kill-server; \
sleep 1; \
ip=$(adb shell ip -o -4 addr show up | awk '!/ lo /{print $4}' | cut -d/ -f1 | grep -E '^(10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.)' | head -n1); \
sleep 1; \
adb kill-server; \
adb tcpip 5555; \
sleep 1; \
adb connect $ip:5555; \
sleep 1; \
scrcpy --select-tcpip -b 16M --crop=2064:2208:0:0 --angle=19- You can also do these steps separately:
adb shell "ip addr show wlan0 | grep 'inet ' | awk '{print \$2}' | cut -d/ -f1" | xargs -I {} sh -c "adb tcpip 5555 && adb connect {}"
scrcpy -b 16M --crop=2064:2208:0:0- For streaming:
scrcpy -b 20M --video-buffer=100 --no-audio --max-fps=60- With Git Bash on Windows:
./adb.exe shell "ip addr show wlan0 | grep 'inet ' | awk '{print \$2}' | cut -d/ -f1" | xargs -I {} sh -c "./adb.exe tcpip 5555 && ./adb.exe connect {}"