Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
zwizwa committed Feb 16, 2015
1 parent 50c1314 commit ade5c32
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 21 deletions.
53 changes: 53 additions & 0 deletions doc/rai.txt
Expand Up @@ -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.



42 changes: 22 additions & 20 deletions stream-syntax.rkt
Expand Up @@ -254,6 +254,7 @@

(declare-prims ai-impl make-ai

;; *** CONTROL / SPECIAL PURPOSE ****

;; SPACE/TIME OPERATIONS
(feedback/n 4) ;; output feedback / unit time delay
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion test/Makefile
Expand Up @@ -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

Expand Down

0 comments on commit ade5c32

Please sign in to comment.