Some questions?

ok - I’ve been posting my thoughts on lines :slight_smile: but here might be a better place to ask.

I think I’m getting a bit hung up on a mental model for this - I’ve figured out sequencing etc. what I want are instruments that are parameterised and evolve over time. To take a super simple example:

given a simple rhythm pattern

[1 1 0 1 1 0 1 0] cyc  1 0.25 1 imps iseq 0.4 decay 0.2 pink * play

what I’d like is to be able to say manipulate the envelope. Would I generate a stream of params ? or could I make a form that essentially made a random envelope each time it triggered. (this is the ‘mental model’ thing I guess )

Question 2 - I can’t see a way of manipulating the sound as it plays - I have to set up everything and let it play? I can’t switch things in and out? and as part of that - is there a technique for syncing totally independent parts? (where I’m going with this is live coding territory I guess)

Question 1: I do use stream of params. You can create variable trigs out of 1 0.25 1 imps, and use it to both trigger the envelope and fetch new value for envelope params. Combined with pdiv you can control how often new value is generated for the envelope.

Question 2: MIDI works very well - you can receive control messages and use received value as parameter:

midiStart
356092455 0 midiConnectInput
0 1 0 0.1 0.9 mctl = q
400 0 sinosc 400 q rlpf 0.3 *

But I’m also looking if it’s possible to manipulate sound that already plays. Maybe Ref and ZRef can help with it.

1 Like

Actually, found it in sapf-examples.txt:

R:

[1/1 5/4 3/2 5/4] R = r
r rcyc .2 1 steps 256 * 0 sinosc ^5 .2 * play

[10/9 4/3 5/3 4/3] r set

[1/1 5/4 3/2 5/4] r set

[10/9 4/3 5/3 4/3] r set

ZP:

;; ZP example

.2 2X pink ZP = x play
[400 401] 0 sinosc .2 * x set
[300 301] 0 saw 4k lpf .2 * x set
[200 201] 0 saw 4k lpf .2 * x set

P:

;; P example
48 72 irands P = a nnhz .2 1 steps 0 sinosc .2 * play
[60 64 67 72] cyc a set
72 84 irands a set

So you can start sound and manipulate parameters of it.

2 Likes

thank you!!!

(I know this is RTFM but there is a LOT of information - helpful to have pointers :slight_smile: )

1 Like

The only thing I haven’t figured out is how to update single real value.
IE:

440 R = freq
freq 0 sinosc .1 * play
300 freq set ;; does nothing

;; or
440 R = freq
freq get 0 sinosc .1 * play
300 freq set ; does nothing
1 Like

enjoy the syntax of sapf but yea it would be awesome to do realtime manipulation like in proxyspace…

2 Likes