Rust Wiki
Home
/
Edit MIDI Binding
View
Edit
History
No Category
Getting Started
General
The World
Server Hosting
Other Topics
Getting Started
World Design
Skinning
Game Modes
Workshop
Cinematic Tools
Modding
Other Topics
Weapons
Construction
Items
Resources
Attire
Tools
Medical
Food
Ammo
Traps
Components
Electrical
Fun
Misc
Log in to edit
MIDI Binding
<cat>Dev.Cinematic</cat> <title>MIDI Binding</title> <upload src="739b0/8d833575a78b232.mp4" size="8940887" name="rust_midi_test_1.mp4" /> #Introduction MIDI binding is a set of admin-only commands which can be used to bind MIDI notes to convars in Rust. These MIDI bind functions can also be used during <page text="demo playback">Demos</page> for cinematic-related commands. ##MIDI Hardware vs Software The first consideration is whether you want to use a MIDI hardware setup or a software solution. If you want to use a **MIDI hardware** device such as a [MIDI keyboard](https://en.wikipedia.org/wiki/MIDI_keyboard) or controller, you can simply plug the device into your machine via USB and begin setting up convars. If instead you want to use **MIDI software**, for example a MIDI controller app on a smartphone/tablet or an Elgato Stream Deck, you will need to set up a virtual MIDI port on your system. Learn more by reading the [MIDI software setup](#midisoftwaresetup) section of this page. #Getting Started Before you can start binding MIDI inputs to convars, there are a few initial steps you will need to take. ##Enable MIDI Convars Use the command `midiconvar.enabled 1` to enable MIDI convar reading and writing in Rust. This setting will be saved to your user configuration and recalled on restart. ##Debug Mode To verify that Rust is listening to messages sent from your MIDI device, use the command `midiconvar.debugmode 1` Once enabled, start pressing down on keys or moving knobs/sliders on the MIDI device connected to your system. The console will print out the note numbers and knob values from your MIDI device in real-time. This command is useful for quickly identifying the note/knob number for specific keys and controls on your MIDI device, as well as the channel number for the note values. You can then use this info to setup your MIDI convar binds. #Convar Setup There are two main MIDI functions which can be assigned to convars in Rust: * Key Presses * Knobs / Sliders Before creating any binds, ensure you've [enabled MIDI convars](#enablemidiconvars) in the console first. ##Key Press Binds These are also known as note on/off MIDI behaviours - for example pressing a key on a MIDI keyboard or controller device. **Note ON** functions are indicated when a MIDI key/button is pressed down. **Note OFF** functions are indicated when a MIDI key/button is released. <note>In most cases you may only need to bind a single key press to a command, which is where 'note on' is useful. In other cases, you may want to bind a key release to a command to make a 'hold' key for calling commands, which is where 'note off' comes in handy.</note> To bind these functions in Rust, use the following commands: ###NOTE ON ``` midiconvar.bindkeyon <note> <channel> <convar> ``` For example: `bindkeyon 12 1 "graphics.dof 1"` will bind Note 12 on Channel 1 to set Depth of Field to true. This function means that when Note 12 is *pressed* on your MIDI device it will enable Depth of Field. ### NOTE OFF ``` midiconvar.bindkeyoff <note> <channel> <convar> ``` For example: `bindkeyoff 12 1 "graphics.dof 0"` will bind Note 12 on Channel 1 to set Depth of Field to false. This function means that when Note 12 is *released* on your MIDI device it will disable Depth of Field. These two *ON* and *OFF* examples together mean that Note 12 will become a 'hold' key - in other words, the Depth of Field effect (specified in the above convar parameter) will only be active whilst the note is being pressed down. ____ ##Knob and Slider Binds These are MIDI behaviours which have a value range between `0` and `1` - for example moving a slider to it's min/max. ``` midiconvar.bindknob <note> <channel> <convar> <min value> <max value> ``` For example: `bindknob 3 1 graphics.dof_focus_dist 0 50` will bind Knob 3 on Channel 1 to set the Depth of Field focus distance to range between a minimum value of 0 and a maximum of 50. This function means that turning (or sliding) Knob 3 on your MIDI device will adjust the focus point for the Depth of Field within the range specified. <note>If you have [debug mode](#debugmode) enabled, you can see the command along with the current knob range value printed in the console.</note> #Additional Commands Below are some additional commands useful for MIDI convar binding. ##Print Binds `midiconvar.printbindings` - Prints to console a list of all the MIDI notes and knobs bound to convars. MIDI binds are stored in the text file **convarbindings.txt** located in the ‘midi’ folder in your root game directory: ``` C:\Program Files (x86)\Steam\steamapps\common\Rust\midi\convarbindings.txt ``` ##Clear Binds `midiconvar.clearallbindings` - Removes all MIDI convar bindings. #MIDI Software Setup ##Virtual MIDI Port To use MIDI software for MIDI convar binds, you will first need to set up a virtual MIDI port on your system. One example is to use software such as [loopMIDI](https://www.tobias-erichsen.de/software/loopmidi.html) which creates a MIDI loopback port to send MIDI notes through via other applications. Once installed, you simply create a port with a name of your choosing (such as the example port below named "Rust") and let loopMIDI run in the background. ![loopMIDI](https://files.facepunch.com/wiki/files/739b0/8d8343022a21384.png) You can now use the custom port you've created to route MIDI notes from a software of your choosing into Rust. Below are a few software examples which make use of this setup. #Software Examples ##Elgato Stream Deck The Elgato Stream Deck features a [MIDI plugin](https://trevligaspel.se/streamdeck/midi/index.html) which allows you to add actions such as MIDI note on/off functions to your Stream Deck device. These work perfectly with Rust's MIDI convars and can be used either as single-press or hold types. Install the plugin from the Stream Deck store by clicking the 'More actions' button on the bottom-right corner of the Stream Deck software, then search for 'MIDI'. Once installed, the plugin will appear in your actions list: ![Stream Deck Midi Action](https://files.facepunch.com/wiki/files/739b0/8d8345c368a90d3.png) Then add a "Note On/Off" function to your profile and configure as necessary. The properties for **Channel** and **Key** (aka Note) will correlate to the convar parameters used in your [key binds](#keypressbinds) within Rust. ![Midi Action Example](https://files.facepunch.com/wiki/files/739b0/8d8345da41722a5.png) The example above is an action which sends Note 8 to Channel 1 once the button is pressed. Make sure that the name of the [virtual loopback port](#virtualmidiport) you've created in loopMIDI is selected in the 'Midi Out port' drop-down menu. Your custom port will only appear whilst loopMIDI is running. ____ ##Mobile/Tablet Apps ["LK" by Imaginando](https://www.imaginando.pt/products/lk/downloads) have a MIDI controller application for iOS and Android which can send MIDI notes to your PC over Wi-Fi. This setup also requires their desktop software called [UBRIDGE](https://www.imaginando.pt/products/ubridge) to communicate between your smartphone/tablet and PC. You need to ensure that the 'Output' on UBRIDGE is set to the name of the [virtual loopback port](#virtualmidiport) you've created in loopMIDI. ![UBRIDGE Output](https://files.facepunch.com/wiki/files/739b0/8d83460cadf7b74.png) Then on the LK app, select your computer name from 'Device' drop-down menu at the top and you're all set. Use the [MIDI debug mode](#debugmode) command in Rust whilst using the app's controllers to see which note and knob numbers they correlate to. You will then be able to achieve results like this: <upload src="739b0/8d83461b14fbc8b.mp4" size="8230000" name="rust_midi_test_3.mp4" /> #FAQ ##Who can use MIDI binds? MIDI convars can only be used by server admins or during demo playback. ##Will my MIDI hardware/device work with Rust? Theoretically, any MIDI device should work with MIDI convar binding in Rust. If your hardware is not being detected, it's likely the drivers or device itself has not been installed correctly. ##My MIDI binds aren't working! Make sure you have [enabled MIDI convars](#enablemidiconvars) in the console. You can also double check if your device is sending MIDI messages to Rust by using the [debug mode](#debugmode) command. ##What controller is being used in the video at the top of the page? The controller featured in [this demonstration clip](https://files.facepunch.com/wiki/files/739b0/8d833575a78b232.mp4) is a Korg nanoKONTROL 2 MIDI controller. ##Will I be banned by EAC for using MIDI convars? No.
Rust Wiki
Playing
Getting Started
0
General
5
Chat
Keybinds
Teams
Tool Cupboard, decay and building privilege
Useful Console Commands
The World
7
Animals
Building-terminology
Farming Basics
Fishing
Ore Nodes
Outpost
The Map
Server Hosting
15
Adding custom radios to Boombox
Centralized Banning
Creating a hidden, whitelisted server
Creating a server
Custom Server Icon
Getting started with your rust server
Hosting Custom Maps
Procedural Generation Customization
Receiving player reports
Rust+ Server
Server Browser Tags
Server Custom Emojis
Server DNS Records
Server Gamemodes
Server Wipe Timer
Other Topics
5
Graffiti Pack
Instruments
Sunburn
Twitch Drops
Weather
Developers
Getting Started
0
World Design
8
Custom Maps
FAQ and Troubleshooting
Map Data
Map Editors
Terrain
Topology
Utility Prefabs
Volume Prefabs
Skinning
2
Creating Skins
Creating Transparent PNGs
Game Modes
0
Workshop
2
Getting Your Skin Accepted
Workshop FAQ
Cinematic Tools
9
Cinematic Animations
CopyPaste
Debug Camera
Demos
Depth Of Field
MIDI Binding
Other Commands
Overview
Prefabs & Entities
Modding
10
Coroutines
CSharp Basics
CSharp Formatting
Entities
Hooks
Item Mods
Items Overview
Modding
Modding Overview
Modding Tools
Other Topics
0
Items
Weapons
52
16x Zoom Scope
8x Zoom Scope
Assault Rifle
Beancan Grenade
Bolt Action Rifle
Bone Club
Bone Knife
Butcher Knife
Candy Cane Club
Combat Knife
Compound Bow
Crossbow
Custom SMG
Double Barrel Shotgun
Eoka Pistol
F1 Grenade
Flame Thrower
Holosight
Hunting Bow
L96 Rifle
Longsword
LR-300 Assault Rifle
M249
M39 Rifle
M92 Pistol
Mace
Machete
MP5A4
Multiple Grenade Launcher
Muzzle Boost
Muzzle Brake
Nailgun
Paddle
Pitchfork
Pump Shotgun
Python Revolver
Revolver
Rocket Launcher
Salvaged Cleaver
Salvaged Sword
Semi-Automatic Pistol
Semi-Automatic Rifle
Silencer
Simple Handmade Sight
Snowball
Spas-12 Shotgun
Stone Spear
Thompson
Waterpipe Shotgun
Weapon flashlight
Weapon Lasersight
Wooden Spear
Construction
45
Armored Door
Armored Double Door
Barbed Wooden Barricade
Blueprint
Building Plan
Chainlink Fence
Chainlink Fence Gate
Code Lock
Concrete Barricade
Door Closer
Floor grill
Garage Door
High External Stone Gate
High External Stone Wall
High External Wooden Gate
High External Wooden Wall
Key Lock
Ladder Hatch
Large Water Catcher
Metal Barricade
Metal horizontal embrasure
Metal Shop Front
Metal Vertical embrasure
Metal Window Bars
Mining Quarry
Netting
Prison Cell Gate
Prison Cell Wall
Pump Jack
Reinforced Glass Window
Reinforced Window Bars
Sandbag Barricade
Sheet Metal Door
Sheet Metal Double Door
Shop Front
Small Water Catcher
Stone Barricade
Tool Cupboard
Watch Tower
Wood Double Door
Wood Shutters
Wooden Barricade
Wooden Door
Wooden Ladder
Wooden Window Bars
Items
75
Barbeque
Bed
Bota Bag
Camp Fire
Chair
Chinese Lantern
Chippy Arcade Game
Christmas Door Wreath
Christmas Lights
Christmas Tree
Composter
Double Sign Post
Dragon Door Knocker
Drop Box
Easter Door Wreath
Festive Doorway Garland
Festive Window Garland
Fridge
Furnace
Hitch & Trough
Huge Wooden Sign
Jack O Lantern Angry
Jack O Lantern Happy
Kayak
Landscape Picture Frame
Lantern
Large Banner Hanging
Large Banner on pole
Large Furnace
Large Planter Box
Large Wood Box
Large Wooden Sign
Locker
Mail Box
Medium Wooden Sign
One Sided Town Sign Post
Paper Map
Pookie Bear
Portrait Picture Frame
Reactive Target
Repair Bench
Research Table
Rug
Rug Bear Skin
Salvaged Shelves
Scarecrow
Search Light
Single Sign Post
Skull Door Knocker
Skull Fire Pit
Sleeping Bag
Small Oil Refinery
Small Planter Box
Small Stash
Small Stocking
Small Wooden Sign
Snowman
Spinning wheel
Stone Fireplace
SUPER Stocking
Survival Fish Trap
Table
Tall Picture Frame
Tuna Can Lamp
Two Sided Hanging Sign
Two Sided Town Sign Post
Vending Machine
Water Barrel
Water Purifier
Wood Storage Box
Work Bench Level 1
Work Bench Level 2
Work Bench Level 3
XL Picture Frame
XXL Picture Frame
Resources
31
Animal Fat
Battery - Small
Bone Fragments
CCTV Camera
Charcoal
Cloth
Coal :(
Crude Oil
Diesel Fuel
Empty Can Of Beans
Empty Tuna Can
Explosives
Gun Powder
High Quality Metal
High Quality Metal Ore
Human Skull
Leather
Low Grade Fuel
Metal Fragments
Metal Ore
Paper
Research Paper
Salt Water
Scrap
Stones
Sulfur
Sulfur Ore
Targeting Computer
Water
Wolf Skull
Wood
Attire
78
A Barrel Costume
Arctic Scientist Suit
Bandana Mask
Baseball Cap
Basic Horse Shoes
Bone Armor
Bone Helmet
Boonie Hat
Boots
Bucket Helmet
Bunny Ears
Bunny Onesie
Burlap Gloves
Burlap Headwrap
Burlap Shirt
Burlap Shoes
Burlap Trousers
Candle Hat
Clatter Helmet
Coffee Can Helmet
Crate Costume
Diving Fins
Diving Mask
Diving Tank
Dragon Mask
Frog Boots
Glowing Eyes
Hazmat Suit
Heavy Plate Helmet
Heavy Plate Jacket
Heavy Plate Pants
Heavy Scientist Suit
Hide Boots
Hide Halterneck
Hide Pants
Hide Poncho
Hide Skirt
Hide Vest
High Quality Horse Shoes
Hoodie
Improvised Balaclava
Jacket
Leather Gloves
Longsleeve T-Shirt
Metal Chest Plate
Metal Facemask
Miners Hat
Mummy Suit
Night Vision Goggles
Pants
Party Hat
Rat Mask
Reindeer Antlers
Riot Helmet
Road Sign Jacket
Road Sign Kilt
Roadsign Gloves
Roadsign Horse Armor
Saddle bag
Santa Beard
Santa Hat
Scarecrow Suit
Scarecrow Wrap
Scientist Suit
Scientist Suit
Shirt
Shorts
Snow Jacket
Surgeon Scrubs
T-Shirt
Tactical Gloves
Tank Top
Wetsuit
Wolf Headdress
Wood Armor Helmet
Wood Armor Pants
Wood Chestplate
Wooden Horse Armor
Tools
26
Binoculars
Birthday Cake
bucket.water
Camera
Chainsaw
Flare
Flashlight
Garry's Mod Tool Gun
Geiger Counter
Hammer
Handmade Fishing Rod
Hatchet
Jackhammer
Pickaxe
RF Transmitter
Rock
Salvaged Axe
Salvaged Hammer
Salvaged Icepick
Satchel Charge
Smoke Grenade
Stone Hatchet
Stone Pickaxe
Survey Charge
Timed Explosive Charge
Torch
Medical
5
Anti-Radiation Pills
Bandage
Blood
Large Medkit
Medical Syringe
Food
51
Apple
Black Raspberries
Blueberries
Burnt Bear Meat
Burnt Chicken
Burnt Deer Meat
Burnt Horse Meat
Burnt Human Meat
Burnt Pork
Burnt Wolf Meat
Cactus Flesh
Can of Beans
Can of Tuna
Candy Cane
Chocolate Bar
Cooked Bear Meat
Cooked Chicken
Cooked Deer Meat
Cooked Fish
Cooked Horse Meat
Cooked Human Meat
Cooked Pork
Cooked Wolf Meat
Corn
Corn Clone
Corn Seed
Farming & Genetics
Granola Bar
Hemp Clone
Hemp Seed
Minnows
Mushroom
Pickles
Pumpkin
Pumpkin Plant Clone
Pumpkin Seed
Raw Bear Meat
Raw Chicken Breast
Raw Deer Meat
Raw Fish
Raw Horse Meat
Raw Human Meat
Raw Pork
Raw Wolf Meat
Rotten Apple
Small Trout
Small Water Bottle
Spoiled Chicken
Spoiled Human Meat
Spoiled Wolf Meat
Water Jug
Ammo
24
12 Gauge Buckshot
12 Gauge Incendiary Shell
12 Gauge Slug
40mm HE Grenade
40mm Shotgun Round
40mm Smoke Grenade
5.56 Rifle Ammo
Bone Arrow
Explosive 5.56 Rifle Ammo
Fire Arrow
Handmade Shell
High Velocity Arrow
High Velocity Rocket
HV 5.56 Rifle Ammo
HV Pistol Ammo
Incendiary 5.56 Rifle Ammo
Incendiary Pistol Bullet
Incendiary Rocket
Nailgun Nails
Pistol Bullet
Rocket
SAM Ammo
Smoke Rocket WIP!!!!
Wooden Arrow
Traps
7
Flame Turret
Homemade Landmine
SAM Site
Shotgun Trap
Snap Trap
Tesla Coil
Wooden Floor Spikes
Components
20
Armored Cockpit Vehicle Module
Bleach
Duct Tape
Electric Fuse
Empty Propane Tank
Gears
Glue
Metal Blade
Metal Pipe
Metal Spring
Rifle Body
Road Signs
Rope
Semi Automatic Body
Sewing Kit
Sheet Metal
SMG Body
Sticks
Tarp
Tech Trash
Electrical
38
AND Switch
Audio Alarm
Auto Turret
Blocker
Cable Tunnel
Ceiling Light
Counter
Deluxe Christmas Lights
Door Controller
Electrical Branch
Elevator
Flasher Light
HBHF Sensor
Igniter
Large Rechargable Battery
Large Solar Panel
Laser Detector
Medium Rechargable Battery
Memory Cell
OR Switch
Pressure Pad
RAND Switch
RF Broadcaster
RF Pager
RF Receiver
Root Combiner
Simple Light
Siren Light
Small Generator
Small Rechargable Battery
Splitter
Switch
Tesla Coil
Test Generator
Timer
Wind Turbine
Wire Tool
XOR Switch
Fun
28
Acoustic Guitar
Blue Boomer
Blue Roman Candle
Canbourine
Champagne Boomer
Cowbell
Firecracker String
Green Boomer
Green Roman Candle
Jerry Can Guitar
Junkyard Drum Kit
New Year Gong
Orange Boomer
Pan Flute
Plumber's Trumpet
Red Boomer
Red Roman Candle
Red Volcano Firework
Shovel Bass
Sousaphone
Violet Boomer
Violet Roman Candle
Violet Volcano Firework
Wheelbarrow Piano
White Volcano Firework
Wrapped Gift
Wrapping Paper
Xylobone
Misc
45
Blue Keycard
Bronze Egg
Coffin
Cursed Cauldron
Decorative Baubels
Decorative Gingerbread Men
Decorative Pinecones
Decorative Plastic Candy Canes
Decorative Tinsel
Door Key
Egg Basket
Fogger-3000
Giant Candy Decor
Giant Lollipop Decor
Gold Egg
Gravestone
Graveyard Fence
Green Keycard
Hab Repair
Halloween Candy
Large Candle Set
Large Loot Bag
Large Present
MC repair
Medium Loot Bag
Medium Present
Note
Painted Egg
Pumpkin Bucket
Red Keycard
Rustigé Egg - Blue
Rustigé Egg - Red
ScrapTransportHeliRepair
Sickle
Silver Egg
Small Candle Set
Small Loot Bag
Small Present
Snow Machine
Spider Webs
Spooky Speaker
Star Tree Topper
Strobe Light
Tree Lights
Wooden Cross