Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
jellyfish
Commits
22e9bdce
Commit
22e9bdce
authored
Feb 28, 2015
by
Dave Griffiths
Browse files
added aljazari synths
parent
546919b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
experiments/flz/lz.scm
View file @
22e9bdce
; lz/nz
(
synth-init
5
0
2205
0
)
(
synth-init
2
0
4410
0
)
(
define
(
make-lz
md
d
stk
w
h
mem
)
(
vector
md
d
stk
w
h
mem
))
...
...
@@ -145,7 +145,7 @@
(
define
(
t
)
(
ntp-time
))
(
define
(
build-nz
lz
sz
tk
)
(
make-nz
lz
'
(
4
0
)
0
sz
(
ntp-time-add
(
t
)
5
)
tk
1.0
))
(
make-nz
lz
'
(
2
0
)
0
sz
(
ntp-time-add
(
t
)
5
)
tk
1.0
))
(
define
(
nz-pop!
nz
)
(
let
((
tmp
(
car
(
nz-vals
nz
))))
...
...
@@ -188,22 +188,6 @@
; --
(
define
l
(
build-lz
9
8
4
))
;(lz-prog l 0 "cCBca-aa")
;(lz-prog l 1 "c-d-c<.d")
;(lz-prog l 2 "b++b+ACd")
;(lz-prog l 0 "aB")
;(lz-prog l 1 "-d>-AC-A")
;(lz-prog l 2 "b+b--bAB")
(
lz-prog
l
0
"a "
)
(
lz-prog
l
1
" "
)
(
lz-prog
l
2
" "
)
(
lz-prog
l
3
" "
)
(
define
ss
(
list
...
...
@@ -259,8 +243,58 @@
)
)
(
define
(
sample
n
)
(
mul
(
adsr
0.4
0.2
0
0
)
(
sine
n
)))
(
define
(
get-sample
n
samples
)
(
note
n
))
(
define
samples
0
)
(
define
voices
(
list
(
list
(
lambda
(
n
)
(
mul
1
(
sample
(
get-sample
n
samples
)
440
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0
0
)
(
moogbp
(
add
(
saw
(
note
n
))
(
saw
(
*
0.333333
(
note
n
))))
(
adsr
0
0.1
0
0
)
0.3
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0
0
)
(
mooglp
(
squ
(
*
0.25
(
note
n
)))
(
adsr
0.1
0
0
0
)
0.4
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0.05
1
)
(
sine
(
add
(
mul
100
(
sine
(
*
0.3333
(
note
n
))))
(
note
n
))))))
(
list
(
lambda
(
n
)
(
mul
1
(
sample
(
get-sample
n
samples
)
440
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0
0
)
(
mul
(
saw
(
note
n
))
(
sine
(
mul
(
mul
0.1
(
adsr
0.4
0.3
0
0
))
(
note
n
))))))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0.05
1
)
(
sine
(
add
(
mul
(
mul
1000
(
adsr
0
0.1
0.3
1
))
(
sine
(
*
0.3333
(
note
n
))))
(
note
n
)))))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0.05
1
)
(
moogbp
(
add
(
saw
(
note
n
))
(
saw
(
*
0.333333
(
note
n
))))
(
*
0.1
(
random
10
))
0.48
))))
(
list
(
lambda
(
n
)
(
mul
1
(
sample
(
get-sample
n
samples
)
440
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0.1
1
)
(
crush
(
sine
(
add
(
mul
100
(
sine
0.3
))
(
note
n
)))
5
0.6
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0
0
)
(
moogbp
(
add
(
saw
(
note
n
))
(
saw
(
*
0.333333
(
note
n
))))
(
*
0.1
(
random
10
))
0.48
)))
(
lambda
(
n
)
(
mul
(
adsr
0
0.1
0.05
1
)
(
sine
(
add
(
mul
1000
(
sine
(
*
0.3333
(
note
n
))))
(
note
n
))))))))
(
define
l
(
build-lz
9
8
4
))
(
lz-prog
l
0
"B++B--BB"
)
(
lz-prog
l
1
"C+D--C-D"
)
(
lz-prog
l
2
"a+b--c+d"
)
(
lz-prog
l
3
"c++b--"
)
;(lz-prog l 0 "a ")
;(lz-prog l 1 " ")
;(lz-prog l 2 " ")
;,(lz-prog l 3 " ")
;(define z (build-nz (vector 9 5 '((4 2) (4 1) (6 0) (3 2) (4 1) (6 0)) 8 3 (list->vector (string->list "BaaadBdcd--C+++ --Aba+dd "))) ss 0.2))
(
define
z
(
build-nz
l
ss
0.2
))
(
define
z
(
build-nz
l
voices
0.2
))
(
set-scale
'
(
2
2
2
2
1
1
1
))
(
every-frame
(
nz-tick
z
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment