Is there a way to dynamically rename signals?
| Date | 2017-04-04 20:04 |
| From | chronopolis |
| Subject | Is there a way to dynamically rename signals? |
I have this in a goto loop
a1, a2 diskgrain Sfilename, kenv, kfreq, kpitch, kgrsize, kstr, 1, iolaps
Is there a way to dynamically change a1 and a2 per pass? Like a(index),
a(index+1)
--
View this message in context: http://csound.1045644.n5.nabble.com/Is-there-a-way-to-dynamically-rename-signals-tp5755489.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 | 2017-04-04 20:23 |
| From | Rory Walsh |
| Subject | Re: Is there a way to dynamically rename signals? |
You could just use an array? Or? On 4 April 2017 at 20:04, chronopolis <micah.frank@gmail.com> wrote: I have this in a goto loop |
| Date | 2017-04-05 19:56 |
| From | chronopolis |
| Subject | Re: Is there a way to dynamically rename signals? |
Thanks Rory,
I figured out a workaround.
One other question: Is it possible to control 2 instruments with a single
MIDI channel? I tried Massign but it seems it can only be mapped to a single
destination. Basically, I have a synth and then an effect in another
instrument and I want them both to be polyphonic on the same MIDI channel.
Thanks.
--
View this message in context: http://csound.1045644.n5.nabble.com/Is-there-a-way-to-dynamically-rename-signals-tp5755489p5755521.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 | 2017-04-05 20:50 |
| From | Rory Walsh |
| Subject | Re: Is there a way to dynamically rename signals? |
Good question. I've never figured this out myself. Maybe someone with a little more MIDI experience can help out. On 5 April 2017 at 19:56, chronopolis <micah.frank@gmail.com> wrote: Thanks Rory, |
| Date | 2017-04-05 21:15 |
| From | Bernt Isak Wærstad |
| Subject | Re: Is there a way to dynamically rename signals? |
You need to use one instrument to receive notes on the wanted channel and then trigger (you can use the event opcode) all the synths you want from that instrument sending midi nn and amp to the instruments using p-fields. It has annoyed me before that I couldn't just write massign 1,3 massign 1,4 massign 1,10 etc. I vaguely remember there being a good reason for this, though I cannot recall what it was On 5 April 2017 at 21:50, Rory Walsh <rorywalsh@ear.ie> wrote:
Mvh.
Bernt Isak Wærstad |
| Date | 2017-04-05 21:42 |
| From | Iain McCurdy |
| Subject | Re: Is there a way to dynamically rename signals? |
|
Or you can use subinstr. Sub-instruments will mirror the on and off behaviour of the instrument triggered by MIDI.
instr 1 icps cpsmidi a1 poscil 0.2, icps a3,a4 subinstr 2, icps outs a1+a3,a1+a4 endin
instr 2 a1 poscil 0.2,p4*1.5 outs a1,a1 endin
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Bernt Isak Wærstad <berntisak@GMAIL.COM>
Sent: 05 April 2017 20:15 To: CSOUND@LISTSERV.HEANET.IE Subject: Re: [Csnd] Is there a way to dynamically rename signals? You need to use one instrument to receive notes on the wanted channel and then trigger (you can use the event opcode) all the synths you want from that instrument sending midi nn and amp to the instruments using p-fields.
It has annoyed me before that I couldn't just write
massign 1,3
massign 1,4
massign 1,10
etc.
I vaguely remember there being a good reason for this, though I cannot recall what it was
On 5 April 2017 at 21:50, Rory Walsh <rorywalsh@ear.ie> wrote:
Mvh.
Bernt Isak Wærstad |
| Date | 2017-04-05 21:59 |
| From | Rory Walsh |
| Subject | Re: Is there a way to dynamically rename signals? |
subinstr, that's the one. In this way you don't have to worry about turning off a note. On 5 April 2017 at 21:42, Iain McCurdy <i_mccurdy@hotmail.com> wrote:
|
| Date | 2017-04-06 17:16 |
| From | Bernt Isak Wærstad |
| Subject | Re: Is there a way to dynamically rename signals? |
Oh yes! That's a much neater way :) On 5 April 2017 at 22:59, Rory Walsh <rorywalsh@ear.ie> wrote:
Mvh.
Bernt Isak Wærstad |
| Date | 2017-04-06 21:11 |
| From | chronopolis |
| Subject | Re: Is there a way to dynamically rename signals? |
Thanks guys.
Still having some trouble with this method though. When I combine the
instruments into a single instrument I get the result I want but I want to
keep things modular. I deleted the irrelevant code below (variables and
such). Each new note cuts out the previous sound processing through the
instrument 2 delay. I want it to be polyphonic. Perhaps because I'm using
channel sends? Each time a new note is triggered it creates a new
gSchannelName to send to instrument 2.
instr 1
iNoteNum notnum
;; deleted all of the diskgrain params for the example
a1, a2 diskgrain Sfilename, kenv, kfreq, kpitch, kgrsize, kstr, 1, iolaps
gSchannelName1 = "" ;;;reset global channel name
gSchannelName2 = ""
gSchannelName1 strcat Sfilename, "_l"
gSchannelName2 strcat Sfilename, "_r"
chnset a1, gSchannelName1
chnset a2, gSchannelName2
aDelayL, aDelayR subinstr "pitchDelay"
outs aDelayL, aDelayR
endin
instr pitchDelay, 2
ain1 chnget gSchannelName1
ain2 chnget gSchannelName2
;;;Deleted a bunch of vars here for example's sake.
delayw ain1 + (atapL * kfeedback)
delayw ain2 + (atapR * kfeedback)
outs atapL, atapR
endin
instr 100; clear
chnclear gSchannelName1
chnclear gSchannelName2
endin
--
View this message in context: http://csound.1045644.n5.nabble.com/Is-there-a-way-to-dynamically-rename-signals-tp5755489p5755538.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 | 2017-04-06 21:45 |
| From | Steven Yi |
| Subject | Re: Is there a way to dynamically rename signals? |
Try using chnmix instead of chnset. (http://csound.github.io/docs/manual/chnmix.html) On Thu, Apr 6, 2017 at 4:11 PM, chronopolis |
| Date | 2017-04-09 22:26 |
| From | chronopolis |
| Subject | Re: Is there a way to dynamically rename signals? |
Thanks Steven - that did the trick!
--
View this message in context: http://csound.1045644.n5.nabble.com/Is-there-a-way-to-dynamically-rename-signals-tp5755489p5755581.html
Sent from the Csound - General mailing list archive at Nabble.com.
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 |