Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to route proxies to each other? #143

Open
kflak opened this issue Aug 15, 2024 · 3 comments
Open

How to route proxies to each other? #143

kflak opened this issue Aug 15, 2024 · 3 comments

Comments

@kflak
Copy link

kflak commented Aug 15, 2024

Hi,

My (currently) favorite way of creating an effect chain in sclang goes a bit like this:

Ndef(\test, Pdef(\test)).play;
Ndef(\test).filter(1, {|in|
		(in * 30.dbamp).tanh;
                 // ... more signal processing...
});

... where Pdef(\test) is some pattern generating sound.

Is this possible to replicate in cl-collider?

@defaultxr
Copy link
Contributor

defaultxr commented Aug 16, 2024

With standard cl-collider and cl-patterns, I would do that like this:

(defvar *bus* (bus-audio :chanls 2))

(pb :test
  ;; your pattern code here
  :out *bus*)

(proxy :process
       (let* ((sig (in.ar *bus* 2))
              (sig (tanh (* 30 sig))))
         sig))
       :pos :head)

(Note that the synthdef you use in :test will need to have an out parameter that controls the bus it writes to)

proxy is the closest analog cl-collider has to Ndef currently, but it doesn't manage audio buses for you.

I wrote a macro that wraps proxy which does manage buses, so you could do something like this instead, but I haven't gotten around to cleaning it up and publishing it yet. Need to do that...

(pb :test
  ;; your pattern code here
  :out (dn :process))

(dn :process (:fx)
  :sig (tanh (* 30 sig))
  :out (b2 sig))

@kflak
Copy link
Author

kflak commented Aug 16, 2024

Good to know :-) So for now I'll go for the old-school way of doing things, and wait with excitement for your dn macro!

@kflak
Copy link
Author

kflak commented Dec 7, 2024

Did some work on this #154... @defaultxr how close is this to what you've been working on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants