Skip to content

Instantly share code, notes, and snippets.

View onyx-and-iris's full-sized avatar
💭
Reading: Effective C 2e by Robert C Seacord

Onyx and Iris onyx-and-iris

💭
Reading: Effective C 2e by Robert C Seacord
View GitHub Profile
@onyx-and-iris
onyx-and-iris / appgain.ahk
Created July 24, 2022 22:05
adds increment and decrement volume function for app gain using VMR.ahk
#Include VMR.ahk
vm := new VMR().login()
vol := 0.5
vm.strip[6].AppGain := Format("(""Spotify"", {:.1f})", vol)
^a::
vol -= 0.1
vm.strip[6].AppGain := Format("(""Spotify"", {:.1f})", vol)
return
@onyx-and-iris
onyx-and-iris / vm_streamlabs_sync.py
Last active September 16, 2022 11:57
sync voicemeeter states with streamlabs desktop scene switches
"""
Creates some dummy test scenes and rotates through them.
For each scene switch some Voicemeeter parameters are changed.
Requires voicemeeter-api package at https://github.com/onyx-and-iris/voicemeeter-api-python
"""
import asyncio
import logging
@onyx-and-iris
onyx-and-iris / sendtext.py
Last active September 16, 2022 13:31
Send a Voicemeeter text request using VBAN (sendtext)
import socket
import time
from dataclasses import dataclass
from pathlib import Path
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib
@onyx-and-iris
onyx-and-iris / obstoxair.py
Created September 21, 2022 21:40
sync XAir mute states to OBS scene switches
import obsws_python as obs
import xair_api
mapping = {
"START": 1,
"BRB": 2,
"END": 3,
"LIVE": 4,
} # set the mapping for the scene to channel mapping here. "scenename": "channel"
obsip = "localhost" # set the obs machine ip here. localhost works if you run this script on the same machine.
@onyx-and-iris
onyx-and-iris / recordstate.py
Last active December 7, 2022 17:50
toggles record state and prints event notifications
import time
import obsws_python as obs
def on_record_state_changed(data):
"""The state of the record output has changed."""
print(f"Current record state: {data.output_state}")
if data.output_state == "OBS_WEBSOCKET_OUTPUT_STARTED":
import logging
import time
from pathlib import Path
import requests
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
logging.basicConfig(level=logging.INFO)
@onyx-and-iris
onyx-and-iris / main.rb
Created August 3, 2023 11:46
Control Voicemeeter Gainlayers using Korg NanoControl2 sliders
require_relative "../../lib/voicemeeter"
class Main
GAINLAYER = 0
def initialize(vm)
@vm = vm
@vm.register(method(:on_midi)
end
@onyx-and-iris
onyx-and-iris / source_projector.py
Last active October 10, 2023 19:43
Projects a source named "VSCode" in fullscreen to monitor identified by "AORUS FI27Q-X(0)"
import logging
import obsws_python as obs
logging.basicConfig(
level=logging.DEBUG,
)
def main():
@onyx-and-iris
onyx-and-iris / basic.spec
Created November 15, 2023 16:04
Spec file for buildling nvda-voicemeeter for Basic kind
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
added_files = [
( 'controllerClient/x64', 'controllerClient/x64' ),
( 'controllerClient/x86', 'controllerClient/x86' ),
]
@onyx-and-iris
onyx-and-iris / launch.py
Created January 26, 2024 17:00
Voicemeeter Launcher
import logging
import os
import subprocess
import time
from pathlib import Path
import voicemeeterlib
logging.basicConfig(level=logging.DEBUG)