Csound Csound-dev Csound-tekno Search About

[Csnd] use channels for more than one instrument

Date2013-01-17 13:39
FromMartin Huenniger
Subject[Csnd] use channels for more than one instrument
Hi list,

I'm trying right now to do the signal graph with the help of channels. The setting is that I have something like the following:

chn_a "OUT", 3 ; read/write on "OUT"

instr player
	asig diskin2 p4, 1, 0, 1
	chnset asig, "OUT"
endin

instr out
	ain chnget "OUT"
	outs ain, ain
endin

alwayson out

now I want to have serveral instances of player running that i want to switch off later on, so my scorefile looks kinda like this:

i player.1 0 -1 "somefile.aiff"
i player.2 5 -1 "otherfile.aiff"
i -player.1 10 -1
i -player.2 15 -1

But player.2 is inaudible, since (i think) the channel may only be written by one instrument via chnset at once. If I replace the chnset in "player" by chnmix, both instruments are audible, but an annoying feedback starts to get louder and louder until the sound is shut off. With 'connect' this will not happen, but I can' use it, and I also want to have several instances of the same instrument. How can I achieve the functionality i desire?

Best Martin

_________________________
Martin Hünniger
a_s_tarantoga@yahoo.de
a-s-tarantoga.tumblr.com
soundcloud.com/a_s_tarantoga






Date2013-01-17 13:51
FromSigurd Saue
SubjectRE: [Csnd] use channels for more than one instrument
You should use chnmix instead of chnset, but remember to zero out the channel after you've read it. Like this:

instr out
	ain chnget "OUT"
	outs ain, ain
	azero = 0
	chnset azero, "OUT"
endin

Sigurd

-----Original Message-----
From: Martin Huenniger [mailto:a_s_tarantoga@yahoo.de] 
Sent: Thursday, January 17, 2013 2:39 PM
To: csound@lists.bath.ac.uk
Subject: [Csnd] use channels for more than one instrument

Hi list,

I'm trying right now to do the signal graph with the help of channels. The setting is that I have something like the following:

chn_a "OUT", 3 ; read/write on "OUT"

instr player
	asig diskin2 p4, 1, 0, 1
	chnset asig, "OUT"
endin

instr out
	ain chnget "OUT"
	outs ain, ain
endin

alwayson out

now I want to have serveral instances of player running that i want to switch off later on, so my scorefile looks kinda like this:

i player.1 0 -1 "somefile.aiff"
i player.2 5 -1 "otherfile.aiff"
i -player.1 10 -1
i -player.2 15 -1

But player.2 is inaudible, since (i think) the channel may only be written by one instrument via chnset at once. If I replace the chnset in "player" by chnmix, both instruments are audible, but an annoying feedback starts to get louder and louder until the sound is shut off. With 'connect' this will not happen, but I can' use it, and I also want to have several instances of the same instrument. How can I achieve the functionality i desire?

Best Martin

_________________________
Martin Hünniger
a_s_tarantoga@yahoo.de
a-s-tarantoga.tumblr.com
soundcloud.com/a_s_tarantoga






Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-01-17 14:05
FromMartin Huenniger
SubjectRe: [Csnd] use channels for more than one instrument
Hi Sigurd,

thanks a lot! It works.

Martin

Am 17.01.2013 um 14:51 schrieb Sigurd Saue:

> You should use chnmix instead of chnset, but remember to zero out the channel after you've read it. Like this:
> 
> instr out
> 	ain chnget "OUT"
> 	outs ain, ain
> 	azero = 0
> 	chnset azero, "OUT"
> endin
> 
> Sigurd
> 
> -----Original Message-----
> From: Martin Huenniger [mailto:a_s_tarantoga@yahoo.de] 
> Sent: Thursday, January 17, 2013 2:39 PM
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] use channels for more than one instrument
> 
> Hi list,
> 
> I'm trying right now to do the signal graph with the help of channels. The setting is that I have something like the following:
> 
> chn_a "OUT", 3 ; read/write on "OUT"
> 
> instr player
> 	asig diskin2 p4, 1, 0, 1
> 	chnset asig, "OUT"
> endin
> 
> instr out
> 	ain chnget "OUT"
> 	outs ain, ain
> endin
> 
> alwayson out
> 
> now I want to have serveral instances of player running that i want to switch off later on, so my scorefile looks kinda like this:
> 
> i player.1 0 -1 "somefile.aiff"
> i player.2 5 -1 "otherfile.aiff"
> i -player.1 10 -1
> i -player.2 15 -1
> 
> But player.2 is inaudible, since (i think) the channel may only be written by one instrument via chnset at once. If I replace the chnset in "player" by chnmix, both instruments are audible, but an annoying feedback starts to get louder and louder until the sound is shut off. With 'connect' this will not happen, but I can' use it, and I also want to have several instances of the same instrument. How can I achieve the functionality i desire?
> 
> Best Martin
> 
> _________________________
> Martin Hünniger
> a_s_tarantoga@yahoo.de
> a-s-tarantoga.tumblr.com
> soundcloud.com/a_s_tarantoga
> 
> 
> 
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 

_________________________
Martin Hünniger
a_s_tarantoga@yahoo.de
a-s-tarantoga.tumblr.com
soundcloud.com/a_s_tarantoga