shithub: neindaw

Download patch

ref: 709abb0906f7cb1ecde0e86fb701979edfd772f9
parent: ced961be3380556f92801b92973cb90a4a95b799
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Jun 12 05:12:28 EDT 2020

add contrib/o (thanks umbraticus)

diff: cannot open b/contrib//null: file does not exist: 'b/contrib//null'
--- a/README.md
+++ b/README.md
@@ -19,11 +19,13 @@
 
 ## Testing
 
-One can use [ORCΛ](https://git.sr.ht/~ft/orca) coupled with neindaw as
-a live-coding environment under Plan 9, see [piper](https://git.sr.ht/~ft/neindaw/tree/master/piper/README.md).
+`contrib` directory contains a script `o` that provides an easy way to run neindaw with ORCΛ.
 
-Here a basic example of using neindaw
-manually is shown.
+More details about [ORCΛ](https://git.sr.ht/~ft/orca) coupled with neindaw as
+a live-coding environment under Plan 9:
+[piper](https://git.sr.ht/~ft/neindaw/tree/master/piper/README.md).
+
+Here a basic example of using neindaw manually is shown.
 
 So far three instruments are available: a simplified kick drum,
 AY-3-8910 and a piano.
--- /dev/null
+++ b/contrib/README.md
@@ -1,0 +1,6 @@
+# Contributions
+
+`o` (by umbraticus) will start a nested rio with all neindaw
+instruments, `daw/cfg`, `piper` and `orca` in paused mode.  If you
+have a directory `$home/orca`, it will be the current directory as
+well.
--- /dev/null
+++ b/contrib/o
@@ -1,0 +1,23 @@
+#!/bin/rc
+rfork en
+font = /lib/font/bit/vga/unicode.font
+if(~ $#* 0) instr = (kick_drum piano ay)
+if not instr = $*
+for(i in $instr){
+	daw/$i -m /n/$i || exit badarg
+	cat /n/$i/clone >/dev/null
+}
+
+>/tmp/orcastart cat <<'...'
+#!/bin/rc
+echo resize -minx 96 > /dev/wctl
+label orca
+d = `{syscall -o read 0 buf 48 </dev/wctl >[2]/dev/null}
+d = `{echo $d(3) $d(1) -8-p2/2+p4-p | dc}
+window -r $d(3) 0 $d(1) 9000 'echo daw/cfg /n/$instr; daw/cfg /n/$instr; rc'
+window -r 0 0 $d(2) 9000 'echo ''orca -p -u /fd/3 |[3] daw/piper'' /n/$instr
+	orca -p -u /fd/3 |[3] daw/piper /n/$instr; rc'
+...
+chmod +x /tmp/orcastart
+
+window -cd $home/orca -r 0 0 9000 9000 -m rio -i /tmp/orcastart