shithub: rc

Download patch

ref: 86451640fa84b12366ad3f077635354c1b232535
parent: 531cc91cd4780a77772252228193e57805339fa9
author: qwx <qwx@sciops.net>
date: Mon Sep 4 21:17:12 EDT 2023

add midipipe: experimenting with standardizing midi handling

--- /dev/null
+++ b/bin/midipipe
@@ -1,0 +1,19 @@
+#!/bin/rc
+fn cleanup{
+	rm -f /srv/midi
+}
+fn sigint{
+	cleanup
+	exit
+}
+fn sigexit{
+	cleanup
+}
+
+rfork n
+rm -f /srv/midi
+bind -a '#|' /mnt/midi
+<>[3]/mnt/midi/data1 {
+	echo 3 >/srv/midi
+	cat $* >/mnt/midi/data
+}