Questions about fx

15 views
Skip to first unread message

joa...@verona.se

unread,
Feb 8, 2024, 6:57:45 PM2/8/24
to over...@googlegroups.com
Hello,

I like the fx effects, but theres a thing i dont really understand

This creates an instrument, and adds an effect. You can hear the
effect immediately, all is well:

(def d (industrial2))
(inst-fx! industrial2 fx-chorus)

Looking at the fx-chorus definition it seems it has parameters:

(defsynth fx-chorus
[bus 0 rate 0.002 depth 0.01]
(let [src (in bus)
dub-depth (* 2 depth)
rates [rate (+ rate 0.001)]
osc (+ dub-depth (* dub-depth (sin-osc:kr rates)))
dly-a (delay-l src 0.3 osc)
sig (apply + src dly-a)]
(replace-out bus (* 0.3 sig))))

... but there doesnt seem to be any way to control the parameters.
This doesnt work:
(ctl fx-chorus :depth 1)

this kinda ... does something:
(def ch (fx-chorus :bus 0 :rate 0.02 :depth 0.1))
(inst-fx! industrial2 ch)
(ctl ch :depth 1)

but not always?

I'm kind of confused.

Regards
/Joakim

--
Joakim Verona
joa...@verona.se

Diego Villaseñor

unread,
Feb 9, 2024, 10:50:20 AM2/9/24
to over...@googlegroups.com
By looking at the code (I don’t use this part of overtone), it seems like `inst-fx!` returns the ids (which I think are actually nodes).

```
(defmethod inst-fx! :stereo
[inst fx]
(ensure-node-active! inst)
(let [fx-group (:fx-group inst)
bus-l (to-sc-id (:bus inst))
bus-r (inc bus-l)
fx-ids [(fx [:tail fx-group] :bus bus-l)
(fx [:tail fx-group] :bus bus-r)]]
fx-ids))
```

Best,
Diego

You may be able to pass them to ctl.
> --
> You received this message because you are subscribed to the Google Groups "Overtone" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to overtone+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/overtone/86il2y1pdi.fsf%40chopper.

joa...@verona.se

unread,
Feb 9, 2024, 4:40:35 PM2/9/24
to Diego Villaseñor, over...@googlegroups.com
Diego Villaseñor <diego....@gmail.com> writes:

> By looking at the code (I don’t use this part of overtone), it seems like `inst-fx!` returns the ids (which I think are actually nodes).
>
> ```
> (defmethod inst-fx! :stereo
> [inst fx]
> (ensure-node-active! inst)
> (let [fx-group (:fx-group inst)
> bus-l (to-sc-id (:bus inst))
> bus-r (inc bus-l)
> fx-ids [(fx [:tail fx-group] :bus bus-l)
> (fx [:tail fx-group] :bus bus-r)]]
> fx-ids))
> ```
>
> Best,
> Diego
>
> You may be able to pass them to ctl.

This worked! Wonderful!

Thanks
/Joakim
--
Joakim Verona
joa...@verona.se
Reply all
Reply to author
Forward
0 new messages