[Csnd] Alwayson and Changing Parameters
| Date | 2026-03-17 17:23 |
| From | Brandon Hale |
| Subject | [Csnd] Alwayson and Changing Parameters |
|
Hello all,
Michael Gogins introduced me to the connect opcodes (fantastic for creating effects busses) and I was wondering what is the best way to then change p-fields of an alwayson instrument. I got around this recently by using a global variable and then changing the variable with another instrument, but I think it would be cool to do so in the score without such hacks. Thank you for your help, Brandon Hale |
| Date | 2026-03-17 17:34 |
| From | "Jeanette C." <000015cdd0ffa6cd-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] Alwayson and Changing Parameters |
Hi Brandon,
depending on your situation, you might go well with the chn opcodes. They open
software busses or channels. One example:
instr Alice
kCutoff = chnget:k("Alice.Cutoff")
; do stuff with it
endin
instr Bob
chn_k("Alice.Cutoff", 3) ; send and receive
; Get the value kInput from MIDI, constant, etc.
chnset(kInput,"Alice.Cutoff")
endin
There is also chnmix which potentially mixes multiple source from all over
your orchestra. With that: always remember to chnclear the respective channel
at the end of your receiver instrument.
I chose Alice.Cutoff arbitrarily, just something to keep your code clear and
clean. :)
If you want to use your score to change things, why not:
instr Manipulator
; Get the parameter input
SchannelName init p4
iValue init p5
chnset(iValue, SchannelName)
endin
I didn't test that code exactly, but that's the idea. Of course, you might use
MIDI, OSC, a websocket or something directly to control your alwayson
instrument.
HTH.
Best wishes,
Jeanette
Brandon Hale, Mar 17 2026:
> Hello all,
> Michael Gogins introduced me to the connect opcodes (fantastic for creating effects busses) and I was wondering what is the best way to then change p-fields of an alwayson instrument.
>
> I got around this recently by using a global variable and then changing the variable with another instrument, but I think it would be cool to do so in the score without such hacks.
>
> Thank you for your help,
> Brandon Hale
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
--
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
* GitHub: https://github.com/jeanette-c
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2026-03-17 19:16 |
| From | Brandon Hale |
| Subject | Re: [Csnd] Alwayson and Changing Parameters |
Thanks Jeanette, this looks like the solution to my problem. I kinda
wish there could be like a chnset score symbol that just does that, but
maybe I can do that by making an instrument just for manipulating these
chnsets....it will definitely require experimentation and fun sound making!
Brandon Hale
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |