MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano

MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

Usage

bgpiano-send and bgpiano-recv

Point to Point (Decentralized)

The GoBGP library we use does not support customizing peer TCP port. Thus, you are stuck with port 179 and would (in most cases) need root privilege to listen on that port.

Instrument (MIDI sender) side:

sudo bgpiano-send --bgp-port=179 --bgp-peer-ip=<peer-ip>

Synthesizer (MIDI receiver) side:

sudo bgpiano-recv --bgp-port=179 --bgp-peer-ip=<peer-ip>

Reflected (Centralized)

Reflector side: gobgp or equivalent software required. Any RFC-compliant BGP daemon configured as an RR or RS can be used.

sudo gobgpd --log-plain --config-file=contrib/rr-gobgp/gobgpd.toml

Instrument (MIDI sender) side:

bgpiano-send --bgp-peer-ip=<reflector-ip>

Synthesizer (MIDI receiver) side:

bgpiano-recv --bgp-peer-ip=<reflector-ip>

Utilities

There are some utility programs for debugging your BGP and MIDI sessions. These can run independently and helped a lot during the development process.

  • bgpcat: Connects to a BGP daemon and prints a stream of received routes.
  • midils: Lists all the MIDI input and output ports (devices) on your computer.
  • miditail: Connects to a MIDI input port and prints a stream of received messaged, both in HEX and decoded form.
  • midipipe: Receives MIDI messages from multiple input ports and sends them to multiple output ports.

Building

Go 1.18 or higher is required.

Linux

Requirements:

  • $GOPATH environment variable is set
  • $GOBIN is in $PATH
  • GCC is installed (for CGO)
  • Dependencies: libasound2-dev
go install github.com/goreleaser/[email protected]
goreleaser build --single-target --snapshot --rm-dist -f contrib/goreleaser/goreleaser.linux.yaml

Notes:

  • Check PIE: checksec --dir=dist (should be all green)

Windows

GoBGP does not support Windows officially. But don't worry! We understand music production is hard under Linux and you might have connected all your instruments to your Windows computer. This project equally supports Windows. (Actually, most of the development work is done under Windows.)

The only thing you need is a little hack on the GoBGP library:

cd ..
git clone https://github.com/osrg/gobgp.git
cd gobgp
git apply ..\bgpiano\contrib\windows\gobgp-windows.patch
cd ..\bgpiano
cp contrib\windows\_go.work go.work

go install github.com/goreleaser/goreleaser@latest
goreleaser build --snapshot --rm-dist --single-target -f .\contrib\goreleaser\goreleaser.windows.yaml

FAQ

Why?

There is a trend that Chinese BGP players1 misuse 广播 (lit. broadcasting) in the meaning of 宣告 (lit. announcement). As a terminology fundamentalist and one of the earliest BGP players, I hate this incorrect usage of word to the bone. However, this wrong terminology is now widespread, so I decided to fix it the other way around, by literally broadcasting a piece of music across the Internet, through the BGP RIB.

How?

The MIDI message is encoded in either extended community or large community. See protocol.md for details.

Will this add additional pressure to the routers?

Yes, but unless you programmatically play something violent like 最終鬼畜妹フランドール・S, a modern router should handle it pretty easily.

What's the latency?

For BGP propagation latency across the globe, The speed of BGP network propagation by Ben Cox already provided an excellent overview.

On the topic of latency deviation, due to how BGP routes are received and updated, there are no guarantee that any individual note will arrive on time. Why not have some Jazz instead?

Footnotes

  1. slang for public ASN owners who use the ASN only for education, research and zhuangbility.

Owner
James Swineson
A programmer at large.
James Swineson
Similar Resources

Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

May 8, 2022

Gomu is intuitive, powerful CLI music player.

Gomu is intuitive, powerful CLI music player.

Gomu (Go Music Player) Gomu is intuitive, powerful CLI music player. It has embedded scripting language and event hook to enable user to customize the

Jun 26, 2022

Kwed-dl - A tool to download latest music files from remix.kwed.org

kwed-dl A small program to download latest tracks from remix.kwed.org. Keeps a counter in your home-folder (_kwedrc on windows and .kwedrc on linux).

May 24, 2022

Muclean - A simple music file renamer

Muclean A simple music file renamer Installation go install github.com/CJ-Jackso

Jan 23, 2022

Talk to your Novation Launchpad in Go

launchpad A package allows you to talk to your Novation Launchpad in Go. Light buttons or read your touches. This library is currently only working wi

Apr 26, 2022

Soundcloud-watch - Watch your Soundcloud likes for removed songs

Soundcloud Watcher Tool to watch for any added/removed likes from a profile. TOD

May 30, 2022

Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for.

Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for.

Squizit is a simple tool, that aim to help you get the grade you want, not the one you have learnt for. Screenshots First, input PIN Then enjoy! Hoste

Mar 11, 2022

Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.

Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.

Packiffer is a lightweight cross-platform networking toolkit that let you sniff/analyze/inject/filter packets.

Jul 1, 2022

BGP implemented in the Go Programming Language

GoBGP: BGP implementation in Go GoBGP is an open source BGP implementation designed from scratch for modern environment and implemented in a modern pr

Jun 28, 2022

An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.

An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.

Ligolo-ng : Tunneling like a VPN An advanced, yet simple, tunneling tool that uses a TUN interface. by TNP IT Security Table of Contents Introduction

Jun 28, 2022

Vippy - A Virtual IP/BGP/IPVS Load-Balancer for Equinix Metal

Vippy - A Virtual IP/BGP/IPVS Load-Balancer for Equinix Metal If I figure out how to make it work.. How it works! The Vippy LB PoC uses BGP/IPVS and E

Mar 10, 2022

Woole (or Wormhole) is a reverse-proxy, sniffing, and tunneling tool developed in Go

The Wormhole (or just Woole) is an Open-Source reverse-proxy, sniffing, and tunneling tool developed in Go Summary How it Works Client Server Build Di

May 9, 2022

:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

May 4, 2022

If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too.

relaxduration If you accept that 1 day is 24 hours in some situations, you might want to parse it in Go too. This package tries to handle situations w

Feb 21, 2022

Send network packets over a TCP or UDP connection.

Packet is the main class representing a single network message. It has a byte code indicating the type of the message and a []byte type payload.

Jun 26, 2022

Subdomain scanner, asynchronous dns packets, use pcap to scan 1600,000 subdomains in 1 second

ksubdomain是一款基于无状态的子域名爆破工具,类似无状态端口扫描,支持在Windows/Linux/Mac上进行快速的DNS爆破,在Mac和Windows上理论最大发包速度在30w/s,linux上为160w/s。 hacking8信息流的src资产收集 https://i.hacking8

Jun 26, 2022

A toy project to play music (aha, Nose in fact) through Prometheus metrics

tiplay A toy project to play music (aha, mostly Noise in fact) through Prometheu

Jan 12, 2022

Imagine a simple, beautiful, secure, and freaking fast way to broadcast your events throw the internet

Event Superintendent Imagine a simple, beautiful, secure, and freaking fast way to broadcast your events throw the internet. That's exactly why you sh

Jan 28, 2022

EasyMidi is a simple and reliable library for working with standard midi file (SMF)

EasyMidi EasyMidi is a simple and reliable library for working with standard midi file (SMF). Installing A step by step series of examples that tell y

Jun 7, 2022
Pigiron is a MIDI routing utility with an extensive OSC interface.

Pigiron README (c) 2021 Steven Jones Pigiron is a fully configurable MIDI routing utility written in Go. It includes a MIDI file player and has a comp

Jan 18, 2022
Tracker-style microtonal MIDI sequencer

Faunatone A tracker-style microtonal MIDI sequencer. Since MIDI does not have any widely-implemented native support for microtonality, Faunatone uses

May 29, 2022
HIDI - flexible HID to MIDI translation layer
HIDI - flexible HID to MIDI translation layer

This application is a translation layer between HID devices like keyboards or gamepads and MIDI interface

Jun 30, 2022
Sequence-based Go-native audio mixer for music apps

Mix https://github.com/go-mix/mix Sequence-based Go-native audio mixer for music apps See demo/demo.go: package main import ( "fmt" "os" "time"

Jun 15, 2022
Unlock Music Project - CLI Edition

Unlock Music Project - CLI Edition Original: Web Edition

Jun 26, 2022
Go library for searching on YouTube Music.

ytmusic Go library for searching on YouTube Music and getting other useful information. Installing go get github.com/raitonoberu/ytmusic Usage Search

Apr 14, 2022
A music programming language for musicians. :notes:

Installation | Docs | Changelog | Contributing composers chatting Alda is a text-based programming language for music composition. It allows you to co

Jul 2, 2022
Self-hosted music streaming server 🎶 with RESTful API and Web interface
Self-hosted music streaming server 🎶 with RESTful API and Web interface

Self-hosted music streaming server ?? with RESTful API and Web interface. Think of it as your very own Spotify!

Jun 27, 2022
Download and listen music in the terminal!
Download and listen music  in the terminal!

?? this cli still has a lot of bugs ?? A simple tool to download and listen music in the terminal. You will need: golang deno v1.16+ youtube-dl Instal

Jun 27, 2022
A tool coded by GO to decode cryptoed netease music files and qqmusic files

nqdumpgo A tool coded by GO to decode cryptoed netease music files and qqmusic files 一个使用 Go 语言编写的用于解密被网易云音乐或 QQ 音乐加密的文件的程序,Go 程序在拥有与 C++程序相近的效率的同时,大大

Jun 4, 2022