Csound Csound-dev Csound-tekno Search About

[Csnd] signal flow graph opcodes

Date2014-02-12 10:40
FromMichael Mossey
Subject[Csnd] signal flow graph opcodes
Is it possible to do the following with signal flow graph nodes?

Say I have two signal generators, G_1, and G_2. I have two effects 
units, E_1 and E_2.

In the score I want to instantiate G_1 and have it connected to E_1. 
Then later I want to instantiate G_1 and have it connected to E_2 instead.

The way the demo csd in the manual is written it gives the impression 
that only one flow graph can exist, and that it can't change with 
different instantiations. Is this wrong?

Mike


Date2014-02-12 10:58
FromMichael Gogins
SubjectRe: [Csnd] signal flow graph opcodes

There is no "disconnect" opcode. But it would not be hard to write one.

What you are trying to do could easily be done with global variables.

There can be as many graphs as you like.

The purpose of these opcodes however is to take all signal flow out of the instruments and score, and put it in the orchestra header. That makes instruments self contained objects that can be plugged into any Orchestra.

You could pre connect your instruments and effects in both graphs using two outlets in each instrument, and switch between outlets during performance. This is the same as you would do with global variables.

On Feb 12, 2014 5:41 AM, "Michael Mossey" <michaelmossey@gmail.com> wrote:
Is it possible to do the following with signal flow graph nodes?

Say I have two signal generators, G_1, and G_2. I have two effects units, E_1 and E_2.

In the score I want to instantiate G_1 and have it connected to E_1. Then later I want to instantiate G_1 and have it connected to E_2 instead.

The way the demo csd in the manual is written it gives the impression that only one flow graph can exist, and that it can't change with different instantiations. Is this wrong?

Mike



Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2014-02-12 20:46
FromMichael Mossey
SubjectRe: [Csnd] signal flow graph opcodes
thanks, Mike
On 2/12/2014 2:58 AM, Michael Gogins wrote:
>
> There is no "disconnect" opcode. But it would not be hard to write one.
>
> What you are trying to do could easily be done with global variables.
>



Date2014-02-12 20:48
FromRory Walsh
SubjectRe: [Csnd] signal flow graph opcodes

Audio channels will serve you well too!

sent from a mobile device...

On 12 Feb 2014 20:46, "Michael Mossey" <michaelmossey@gmail.com> wrote:
thanks, Mike
On 2/12/2014 2:58 AM, Michael Gogins wrote:

There is no "disconnect" opcode. But it would not be hard to write one.

What you are trying to do could easily be done with global variables.





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2014-02-12 21:15
FromMichael Gogins
SubjectRe: [Csnd] signal flow graph opcodes
With audio channels, how would one sum multiple ouputs into one input, or fan out one output to multiple inputs?


-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Wed, Feb 12, 2014 at 3:48 PM, Rory Walsh <rorywalsh@ear.ie> wrote:

Audio channels will serve you well too!

sent from a mobile device...

On 12 Feb 2014 20:46, "Michael Mossey" <michaelmossey@gmail.com> wrote:
thanks, Mike
On 2/12/2014 2:58 AM, Michael Gogins wrote:

There is no "disconnect" opcode. But it would not be hard to write one.

What you are trying to do could easily be done with global variables.





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-02-12 21:49
FromRory Walsh
SubjectRe: [Csnd] signal flow graph opcodes
Im missing something here?

instr 1
(...)
chnset aOutput, "instr1_out"
endin

instr 2
(...)
chnset aOutput, "instr2_out"
endin

(etc)

instr 3
ain1 chnget "instr1_out"
ain2 chnget "instr2_out"
aInput = ain1+ain2+etc...
endin

instr 4
ain1 chnget "instr1_out"
(...)
endin

instr 5
ain chnget "instr1_out"
(...)
endin

On 12 February 2014 21:15, Michael Gogins  wrote:
> With audio channels, how would one sum multiple ouputs into one input, or
> fan out one output to multiple inputs?
>
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Wed, Feb 12, 2014 at 3:48 PM, Rory Walsh  wrote:
>>
>> Audio channels will serve you well too!
>>
>> sent from a mobile device...
>>
>> On 12 Feb 2014 20:46, "Michael Mossey"  wrote:
>>>
>>> thanks, Mike
>>> On 2/12/2014 2:58 AM, Michael Gogins wrote:
>>>>
>>>>
>>>> There is no "disconnect" opcode. But it would not be hard to write one.
>>>>
>>>> What you are trying to do could easily be done with global variables.
>>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug trackers
>>> csound6:
>>>            https://sourceforge.net/p/csound/tickets/
>>> csound5:
>>>            https://sourceforge.net/p/csound/bugs/
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>

Date2014-02-12 21:57
FromMichael Mossey
SubjectRe: [Csnd] signal flow graph opcodes
Essentially what I am doing is choosing the connections at performance 
time (in the score, in the instantiation of the instruments). Would 
channels help me do this?  If they are hard-coded as you write here, I 
don't think so.
Mike

On 2/12/2014 1:49 PM, Rory Walsh wrote:
> Im missing something here?
>
> instr 1
> (...)
> chnset aOutput, "instr1_out"
> endin
>
> instr 2
> (...)
> chnset aOutput, "instr2_out"
> endin
>
> (etc)
>
> instr 3
> ain1 chnget "instr1_out"
> ain2 chnget "instr2_out"
> aInput = ain1+ain2+etc...
> endin
>
> instr 4
> ain1 chnget "instr1_out"
> (...)
> endin
>
> instr 5
> ain chnget "instr1_out"
> (...)
> endin



Date2014-02-12 22:10
FromOeyvind Brandtsegg
SubjectRe: [Csnd] signal flow graph opcodes

Just a quick idea.  Rory's instrument 3 could be called with string p-fields to mix two arbitrary channels to one. 

12. feb. 2014 21:46 skrev "Michael Mossey" <michaelmossey@gmail.com> følgende:
thanks, Mike
On 2/12/2014 2:58 AM, Michael Gogins wrote:

There is no "disconnect" opcode. But it would not be hard to write one.

What you are trying to do could easily be done with global variables.





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2014-02-12 22:13
FromRory Walsh
SubjectRe: [Csnd] signal flow graph opcodes
This is the simplest way I can think of?

CsoundSynthesizer>

-+rtaudio=jack -odac


sr = 44100
ksmps = 64
nchnls = 2
0dbfs=1

;signal generator..
instr 1
a1 oscil 1, 200, -1
chnset a1*p4, "aux1"
chnset a1*p5, "aux2"
chnset a1*p6, "aux3"
chnset a1*p7, "aux4"
endin

;signal modifier 1
instr 3
a1 oscili .7, 1, -1
ain chnget "aux1"
outs a1*ain

endin

;signal modifier 1
instr 4
a1 oscili 1, 20, -1
ain chnget "aux2"
outs a1*ain
endin

instr 1000
chnclear "aux1"
chnclear "aux2"
chnclear "aux3"
chnclear "aux4"
endin


i3 0 1000;always on..
i4 0 1000;always on..
i1000 0 1000
    ;sends 1  2  3  4
i1 0 5     1  0  0  0
i1 7 5     0  1  0  0



On 12 February 2014 22:10, Oeyvind Brandtsegg  wrote:
> Just a quick idea.  Rory's instrument 3 could be called with string p-fields
> to mix two arbitrary channels to one.
>
> 12. feb. 2014 21:46 skrev "Michael Mossey" 
> følgende:
>
>> thanks, Mike
>> On 2/12/2014 2:58 AM, Michael Gogins wrote:
>>>
>>>
>>> There is no "disconnect" opcode. But it would not be hard to write one.
>>>
>>> What you are trying to do could easily be done with global variables.
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug trackers
>> csound6:
>>            https://sourceforge.net/p/csound/tickets/
>> csound5:
>>            https://sourceforge.net/p/csound/bugs/
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>


Date2014-02-12 22:19
Frommskala@ansuz.sooke.bc.ca
SubjectRe: [Csnd] signal flow graph opcodes
On Wed, 12 Feb 2014, Michael Mossey wrote:
> Essentially what I am doing is choosing the connections at performance time
> (in the score, in the instantiation of the instruments). Would channels help
> me do this?  If they are hard-coded as you write here, I don't think so.

I would build an instrument that functions as a switch.  Instead of
instrument A deciding at performance time whether to connect to instrument
B or C, instrument A always connects to the switch, the switch always
connects to both B and C, and then the switch decides at performance time
which output it will write to.  This is preferable to making A connect
directly to both B and C and write to only one output, or B and C both
connect to A and take turns listening or not, because a separate switch
keeps the routing logic apart from the instruments themselves.

-- 
Matthew Skala
mskala@ansuz.sooke.bc.ca                 People before principles.
http://ansuz.sooke.bc.ca/

Date2014-02-12 22:44
FromMichael Gogins
SubjectRe: [Csnd] signal flow graph opcodes
mskala's solution is good for the signal flow opcodes.

Regards,
Mike


-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Wed, Feb 12, 2014 at 5:19 PM, <mskala@ansuz.sooke.bc.ca> wrote:
On Wed, 12 Feb 2014, Michael Mossey wrote:
> Essentially what I am doing is choosing the connections at performance time
> (in the score, in the instantiation of the instruments). Would channels help
> me do this?  If they are hard-coded as you write here, I don't think so.

I would build an instrument that functions as a switch.  Instead of
instrument A deciding at performance time whether to connect to instrument
B or C, instrument A always connects to the switch, the switch always
connects to both B and C, and then the switch decides at performance time
which output it will write to.  This is preferable to making A connect
directly to both B and C and write to only one output, or B and C both
connect to A and take turns listening or not, because a separate switch
keeps the routing logic apart from the instruments themselves.

--
Matthew Skala
mskala@ansuz.sooke.bc.ca                 People before principles.
http://ansuz.sooke.bc.ca/


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-02-13 07:36
Fromzappfinger
Subject[Csnd] Re: signal flow graph opcodes
I've been looking at this too. It would be very nice if the signal flow
opcodes could be made to allow changes at runtime. The sugggestions so far
suggest using extra instruments to allow this flexibility...

Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/signal-flow-graph-opcodes-tp5732546p5732574.html
Sent from the Csound - General mailing list archive at Nabble.com.