From ade5c32ee9086e686f114236ccabe71fc2a95599 Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Mon, 16 Feb 2015 02:10:45 -0500 Subject: [PATCH] notes --- doc/rai.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++++ stream-syntax.rkt | 42 +++++++++++++++++++------------------ test/Makefile | 7 ++++++- 3 files changed, 81 insertions(+), 21 deletions(-) diff --git a/doc/rai.txt b/doc/rai.txt index 2e22703..fbb2078 100644 --- a/doc/rai.txt +++ b/doc/rai.txt @@ -3027,3 +3027,56 @@ echo $DEVNAME | grep /dev/midi && socat -u file:$DEVNAME UDP-SENDTO:239.0.0.1:12 # socat -u UDP4-RECV:10000,ip-add-membership=239.0.0.1:192.168.11.238 - |hd # socat -u UDP4-RECV:10000,ip-add-membership=239.0.0.1:0.0.0.0 - |hd + + +Entry: next? +Date: Fri Feb 13 18:25:46 EST 2015 + +What's next? I've been thinking about porting the model to Haskell. +Not sure if this is really useful at this point. Maybe best to clean +up the model internally first. + +There are some ugly ad-hoc things in there that are quite useful in +practice, but would need some effort to type properly: + +- delay lines +- control rate hacks +- fixed primitives +- parameter range specs + +Look at stream-syntax.rkt for hints of these. + +Currently no inspiration.. Probably best to move to application? + + +Entry: Abstracting primitives +Date: Fri Feb 13 18:39:23 EST 2015 + +One of the interesting changes is to make the set of primitives +programmable, to be able to target different machines. It might be +too constraining to keep a single base language. + +E.g. allow implementation in base language but allow mapping to +different primitive cores. + +[1] entry://20141129-181735 + + + +Entry: Application +Date: Fri Feb 13 19:21:50 EST 2015 + +Problem right now is really user interface. I've got all these synths +I want to build but I keep getting stuck in finding ways to make them +playable / explorable. + +Core OS will probably be in Rust eventually. I had a couple of days +of deep-dive and I feel I'm ready. Should probably think about +ARM-targeting to keep things lean? + +For now thought the problem is graphics and UI/UX. Rai can be used to +generate computations for visualizations. I might take a detour +finishing logic analyzer visualizations. + + + diff --git a/stream-syntax.rkt b/stream-syntax.rkt index b055312..6cf1126 100644 --- a/stream-syntax.rkt +++ b/stream-syntax.rkt @@ -254,6 +254,7 @@ (declare-prims ai-impl make-ai + ;; *** CONTROL / SPECIAL PURPOSE **** ;; SPACE/TIME OPERATIONS (feedback/n 4) ;; output feedback / unit time delay @@ -268,6 +269,27 @@ (copy 1) ;; node copy. (used in type bridging and implementation of hold). (index 3) ;; array indexing + + (cast/n 2) ;; type casting + + ;; CONDITIONAL + (if 3) + + ;; AD-HOC EXTENSIONS + (dl-shift 2) ;; shift delay line state vector + (dl-ref 2) ;; read from delay line state vector + + (tag 2) ;; tag node with arbitrary list of pairs dictionary '((k . v) ...) + (debug 1) + + + ;; EXPERIMENTAL + (_map 2) + + + ;; *** SIMPLE DATAFLOW **** + (lt 2) ;; a < b + ;; LIFTED SCALAR OPS (add 2) (sub 2) @@ -302,26 +324,6 @@ (log 1) (atan 1) - (cast/n 2) ;; type casting - - (lt 2) ;; a < b - - ;; CONDITIONAL - (if 3) - - ;; AD-HOC EXTENSIONS - (dl-shift 2) ;; shift delay line state vector - (dl-ref 2) ;; read from delay line state vector - - (tag 2) ;; tag node with arbitrary list of pairs dictionary '((k . v) ...) - (debug 1) - - - ;; EXPERIMENTAL - (_map 2) - - - ) (define-syntax (ai-define stx) diff --git a/test/Makefile b/test/Makefile index 3260854..964083b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -48,11 +48,16 @@ ALL := $(ALL_RUN) RAI := .. -all: $(ALL) +all: $(ALL) bait @echo "<$$(readlink -f test.png)>" all_bin: $(ALL_BIN) + +# Reminders / attract attention in test build output. +bait: synth.il + cat synth.il + clean: rm -rf $(ALL) *~ *.elf *.bin *.sp *.o *.sp.o.* *.g.h *.pd_linux *.run *.jack compiled *.dll *.exe *.sp.pd *.il *.pulse