History

more siren words

Paul Batchelor committed 5 years ago

Commit 87789ea1 parent c822e731 file · +17 −5Browse files

Unified · Split

doc/siren.org+17−5
@@ -1,12 +1,13 @@
11 #+TITLE: The "Siren" Patch
22 * Overview
33 This document provides a rosetta stone for a =siren= patch.
4−It's not exactly the most interseting patch, but it is
4+It's not exactly the most interesting patch, but it
55 succinctly shows how to work with a stack-based
66 modular environment.
77
88 I originally wrote this patch as a bridge to show the
9−relationship between runt code and C + patchwerk code.
9+relationship between runt code and C + patchwerk code
10+(included amongst the examples).
1011 Now, I have adapated a version of it that works in sndkit!
1112 * Patch Description
1213 The siren patch can be generally described in the following
@@ -60,6 +61,11 @@ computes 10 · 47 unmodified lines
6061 This implementation shows the siren written in C using
6162 the sndkit @!(ref "core" "core API")!@. The core
6263 patch construction can be seen in the =patch= function.
64+What's really cool is how closely it matches the LIL code.
65+If you take away the syntactic sugar in LIL, the underlying
66+sndkit calls are essentially 1:1. This patch was written by
67+hand looking at the LIL code above. It was a surprisingly
68+trivial process!
6369
6470 #+NAME: siren.c
6571 #+BEGIN_SRC c :tangle siren.c
@@ -160,7 +166,10 @@ int main(int argc, char *argv[]) · 94 unmodified lines
160166 * Implementation 3: Monolith and Runt
161167 =Monolith= is a realtime computer music environment I wrote
162168 for myself as a precursor to sndkit. =runt= is a quirky
163−stack based language used to notate patches.
169+homemade stack based language used to notate patches.
170+
171+Even though sndkit uses TCL and C syntax, the thought
172+process and structure I use is still in stacks.
164173
165174 #+NAME: siren.rnt
166175 #+BEGIN_SRC runt :tangle siren.rnt
@@ -186,9 +195,12 @@ add · 19 unmodified lines
186195 sr 10 * _compute rep
187196 #+END_SRC
188197 * Implementation 4: Monolith and Scheme
189−=monolith= is primarily controlled via a Scheme REPL spawned
198+=monolith= is usually controlled via a Scheme REPL spawned
190199 inside of Emacs, the flavor of scheme being a fork of s9
191−scheme.
200+scheme. Runt code is then executed in scheme as inline code.
201+The scheme language is used as a kind of macro language,
202+making it possible to build more complex structures and
203+abstractions.
192204
193205 The scheme =ugens= are wrappers around runt code, so it is
194206 structurally identical to the runt and monolith code.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t