Csound Csound-dev Csound-tekno Search About

[Csnd] csound6~ in pure data

Date2019-09-25 19:18
FromForrest Curo
Subject[Csnd] csound6~ in pure data
If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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

Date2019-09-27 13:33
FromVictor Lazzarini
SubjectRe: [Csnd] csound6~ in pure data
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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

Date2019-09-27 14:45
FromForrest Curo
SubjectRe: [Csnd] csound6~ in pure data
I tried -o dac and got a refusal-to-compile error.

The easiest way to avoid complications (for me at least) seems to be to run csound separately
with (say) --port=3456 
and run pd with

[connect localhost 3456 (
|
|disconnect (
|   
|      |receive toout |
|    /                            
|  |send scoreline_i "i 2 0 1 $1 $2 " (
| /
|netsend -u |

(while sending pairs of numbers to 'toout' via messages from other pd patches.)     

But I'm still groping out which opcode I can use this way to send channel messages.


On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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
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
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

Date2019-09-27 14:50
FromVictor Lazzarini
SubjectRe: [Csnd] csound6~ in pure data
so it doesn't work. Yes the UDP server can be used, if you're not interfacing the audio with the rest of Pd.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Sep 2019, at 15:45, Forrest Curo <treegestalt@gmail.com> wrote:

I tried -o dac and got a refusal-to-compile error.

The easiest way to avoid complications (for me at least) seems to be to run csound separately
with (say) --port=3456 
and run pd with

[connect localhost 3456 (
|
|disconnect (
|   
|      |receive toout |
|    /                            
|  |send scoreline_i "i 2 0 1 $1 $2 " (
| /
|netsend -u |

(while sending pairs of numbers to 'toout' via messages from other pd patches.)     

But I'm still groping out which opcode I can use this way to send channel messages.


On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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
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
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

Date2019-09-27 14:57
FromForrest Curo
SubjectRe: [Csnd] csound6~ in pure data
just sending notes at pd's equivalent of k-rate. But pd likes to break up messages at commas, which limits the opcodes I can send this way.

On Fri, Sep 27, 2019 at 6:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
so it doesn't work. Yes the UDP server can be used, if you're not interfacing the audio with the rest of Pd.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Sep 2019, at 15:45, Forrest Curo <treegestalt@gmail.com> wrote:

I tried -o dac and got a refusal-to-compile error.

The easiest way to avoid complications (for me at least) seems to be to run csound separately
with (say) --port=3456 
and run pd with

[connect localhost 3456 (
|
|disconnect (
|   
|      |receive toout |
|    /                            
|  |send scoreline_i "i 2 0 1 $1 $2 " (
| /
|netsend -u |

(while sending pairs of numbers to 'toout' via messages from other pd patches.)     

But I'm still groping out which opcode I can use this way to send channel messages.


On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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
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
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
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
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

Date2019-10-21 16:16
FromJosh Moore
SubjectRe: [Csnd] csound6~ in pure data
To send MIDI notes this is what your csd needs to be like

<CsOptions>
-+rtmidi=linux -M0 --realtime --logfile=null
</CsOptions>
<CsoundSynthesizer>
<CsInstruments>
sr      =  44100
ksmps   =  8
nchnls  =  16
0dbfs = 1

instr 1
iFreq     cpsmidi   
iAmp      ampmidi   .
iAttack   ctrl7     1, 1, 0.01, 1  
iDecay    ctrl7     1, 2, 0, 1
iSustain  ctrl7     1, 3, 0, 1
iRelease  ctrl7     1, 4, 0, 1
iPulsew   ctrl7     1, 5, 0, 1
kEnv  madsr     iAttack, iDecay,  iSustain,  iRelease
aTone1    vco2      iAmp*kEnv, iFreq, 2, iPulsew 
outch 1, aTone1 ;This is mono output just connect both sides to dac~ - PD's gain staging using simple *~ and / 127 objects are really amazing and quick for building MIDI compliant software mixers in that automatically scale from 0 to 1.
endin

;Do this for the rest of your instruments and configure your score to represent this for up to 16 channels/instruments. PD will match these as ins and outs to pass audio in and out of Csound.

</CsInstruments>
<CsScore>
f 0 36000
e
</CsScore>
</CsoundSynthesizer>

Then create a "notein 1" object

and then create a message box with this: 

midi 144 $1 $2

and then create ctlin boxes "ctlin 1, 1" which gives us CC channel 1, "ctlin 2, 1" which gives us CC2 channel 2, etc. 

Then match with message boxes containing

midi 176 1 $1 
midi 176 2 $1
etc 

Then route all of those objects to the first inlet in Csound. 

This will send MIDI messages to channel 1 where your instrument is.. Where 144 is the note channel byte, and the two inlets are pitch and velocity bytes respectively for notes -- and 176 is the CC channel byte plus controller number and value. . 

For each additional channel just add one number. See this page for a table of what your messages should be.


If you don't want to use MIDI notes just replace cpsmidi with invalues and labels, ie 

iFreq invalue "frequency"

then your pd messages simply say control frequency $1

However, using this method you have to send another message that says set frequency (and other controls you may have set) before it will be passed.

The cool thing that I've tested is you CAN run multiple instances of Csound~ within PD as well so I have an effects orchestra and a instrument orchestra where the effects orchestra has delay and reverb.
I then have a 16 channel mixer patch within PD that has sends and returns to these effects. 

Then all I need is a MIDI sequencer and I don't have to mess about with scores, front ends, coding GUI or any of that mess. PD might just be the best "front end" for Csound once you have everything configured because of it's strengths in GUI objects and routing whereas Csound has far better signal processing and synthesis capability. 

On Fri, Sep 27, 2019 at 6:57 AM Forrest Curo <treegestalt@gmail.com> wrote:
just sending notes at pd's equivalent of k-rate. But pd likes to break up messages at commas, which limits the opcodes I can send this way.

On Fri, Sep 27, 2019 at 6:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
so it doesn't work. Yes the UDP server can be used, if you're not interfacing the audio with the rest of Pd.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Sep 2019, at 15:45, Forrest Curo <treegestalt@gmail.com> wrote:

I tried -o dac and got a refusal-to-compile error.

The easiest way to avoid complications (for me at least) seems to be to run csound separately
with (say) --port=3456 
and run pd with

[connect localhost 3456 (
|
|disconnect (
|   
|      |receive toout |
|    /                            
|  |send scoreline_i "i 2 0 1 $1 $2 " (
| /
|netsend -u |

(while sending pairs of numbers to 'toout' via messages from other pd patches.)     

But I'm still groping out which opcode I can use this way to send channel messages.


On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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
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
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
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
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
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

Date2019-10-24 14:25
FromTarek Wayne
SubjectRe: [Csnd] csound6~ in pure data
Sorry, nothing useful in this message..

I would just like to concur that PD is a great front end for Csound. 

Especially if one is thinking of doing installation type work etc. 

Great combo, especially as has been said, Csound is far superior in synth capability etc. 

On Mon, 21 Oct 2019, 17:26 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
To send MIDI notes this is what your csd needs to be like

<CsOptions>
-+rtmidi=linux -M0 --realtime --logfile=null
</CsOptions>
<CsoundSynthesizer>
<CsInstruments>
sr      =  44100
ksmps   =  8
nchnls  =  16
0dbfs = 1

instr 1
iFreq     cpsmidi   
iAmp      ampmidi   .
iAttack   ctrl7     1, 1, 0.01, 1  
iDecay    ctrl7     1, 2, 0, 1
iSustain  ctrl7     1, 3, 0, 1
iRelease  ctrl7     1, 4, 0, 1
iPulsew   ctrl7     1, 5, 0, 1
kEnv  madsr     iAttack, iDecay,  iSustain,  iRelease
aTone1    vco2      iAmp*kEnv, iFreq, 2, iPulsew 
outch 1, aTone1 ;This is mono output just connect both sides to dac~ - PD's gain staging using simple *~ and / 127 objects are really amazing and quick for building MIDI compliant software mixers in that automatically scale from 0 to 1.
endin

;Do this for the rest of your instruments and configure your score to represent this for up to 16 channels/instruments. PD will match these as ins and outs to pass audio in and out of Csound.

</CsInstruments>
<CsScore>
f 0 36000
e
</CsScore>
</CsoundSynthesizer>

Then create a "notein 1" object

and then create a message box with this: 

midi 144 $1 $2

and then create ctlin boxes "ctlin 1, 1" which gives us CC channel 1, "ctlin 2, 1" which gives us CC2 channel 2, etc. 

Then match with message boxes containing

midi 176 1 $1 
midi 176 2 $1
etc 

Then route all of those objects to the first inlet in Csound. 

This will send MIDI messages to channel 1 where your instrument is.. Where 144 is the note channel byte, and the two inlets are pitch and velocity bytes respectively for notes -- and 176 is the CC channel byte plus controller number and value. . 

For each additional channel just add one number. See this page for a table of what your messages should be.


If you don't want to use MIDI notes just replace cpsmidi with invalues and labels, ie 

iFreq invalue "frequency"

then your pd messages simply say control frequency $1

However, using this method you have to send another message that says set frequency (and other controls you may have set) before it will be passed.

The cool thing that I've tested is you CAN run multiple instances of Csound~ within PD as well so I have an effects orchestra and a instrument orchestra where the effects orchestra has delay and reverb.
I then have a 16 channel mixer patch within PD that has sends and returns to these effects. 

Then all I need is a MIDI sequencer and I don't have to mess about with scores, front ends, coding GUI or any of that mess. PD might just be the best "front end" for Csound once you have everything configured because of it's strengths in GUI objects and routing whereas Csound has far better signal processing and synthesis capability. 

On Fri, Sep 27, 2019 at 6:57 AM Forrest Curo <treegestalt@gmail.com> wrote:
just sending notes at pd's equivalent of k-rate. But pd likes to break up messages at commas, which limits the opcodes I can send this way.

On Fri, Sep 27, 2019 at 6:50 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
so it doesn't work. Yes the UDP server can be used, if you're not interfacing the audio with the rest of Pd.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Sep 2019, at 15:45, Forrest Curo <treegestalt@gmail.com> wrote:

I tried -o dac and got a refusal-to-compile error.

The easiest way to avoid complications (for me at least) seems to be to run csound separately
with (say) --port=3456 
and run pd with

[connect localhost 3456 (
|
|disconnect (
|   
|      |receive toout |
|    /                            
|  |send scoreline_i "i 2 0 1 $1 $2 " (
| /
|netsend -u |

(while sending pairs of numbers to 'toout' via messages from other pd patches.)     

But I'm still groping out which opcode I can use this way to send channel messages.


On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Audio to dac is disabled internally I think. I can't remember if you can re-enable it with -odac, need to look at the code.

MIDI input has to come from Pd as well, since Csound sets its midi callbacks to pick midi from there (instead of a midi device). 
MIDI files with -f should work.

You can output MIDI files, have to check about MIDI out. Audio files with fout also
work as normal.


Prof. Victor Lazzarini
Maynooth University
Ireland
On 27 Sep 2019, at 12:55, Forrest Curo <treegestalt@gmail.com> wrote:

If I understand this right, when you run a csd in Pure Data via [csound~] you're running a full instance of csound, but with pd providing inputs and outputs.

Can this instance accept other inputs and send other outputs more directly.

An rt midi message direct to an instrument in the running instance?

Sound directly to speakers rather than to [dac~] ? (Any advantages or disadvantages if you can?)

Output midi and audio files?

Forrest Curo
San Diego
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
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
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
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
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
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
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

Date2019-10-24 16:01
Fromjoachim heintz
SubjectRe: [Csnd] csound6~ in pure data
yes, i totally agree.  victor's csound6~ external is working so perfect; 
and i never understood why this combination between pd and csound seems 
to be used so rarely.

	joachim



On 24/10/19 15:25, Tarek Wayne wrote:
> Sorry, nothing useful in this message..
>
> I would just like to concur that PD is a great front end for Csound.
>
> Especially if one is thinking of doing installation type work etc.
>
> Great combo, especially as has been said, Csound is far superior in
> synth capability etc.
>
> On Mon, 21 Oct 2019, 17:26 Josh Moore,  > wrote:
>
>     To send MIDI notes this is what your csd needs to be like
>
>     
>     -+rtmidi=linux -M0 --realtime --logfile=null
>     
>     
>     
>     sr      =  44100
>     ksmps   =  8
>     nchnls  =  16
>     0dbfs = 1
>
>     instr 1
>     iFreq     cpsmidi
>     iAmp      ampmidi   .
>     iAttack   ctrl7     1, 1, 0.01, 1
>     iDecay    ctrl7     1, 2, 0, 1
>     iSustain  ctrl7     1, 3, 0, 1
>     iRelease  ctrl7     1, 4, 0, 1
>     iPulsew   ctrl7     1, 5, 0, 1
>     kEnv  madsr     iAttack, iDecay,  iSustain,  iRelease
>     aTone1    vco2      iAmp*kEnv, iFreq, 2, iPulsew
>     outch 1, aTone1 ;This is mono output just connect both sides to dac~
>     - PD's gain staging using simple *~ and / 127 objects are really
>     amazing and quick for building MIDI compliant software mixers in
>     that automatically scale from 0 to 1.
>     endin
>
>     ;Do this for the rest of your instruments and configure your score
>     to represent this for up to 16 channels/instruments. PD will match
>     these as ins and outs to pass audio in and out of Csound.
>
>     
>     
>     f 0 36000
>     e
>     
>     
>
>     Then create a "notein 1" object
>
>     and then create a message box with this:
>
>     midi 144 $1 $2
>
>     and then create ctlin boxes "ctlin 1, 1" which gives us CC channel
>     1, "ctlin 2, 1" which gives us CC2 channel 2, etc.
>
>     Then match with message boxes containing
>
>     midi 176 1 $1
>     midi 176 2 $1
>     etc
>
>     Then route all of those objects to the first inlet in Csound.
>
>     This will send MIDI messages to channel 1 where your instrument is..
>     Where 144 is the note channel byte, and the two inlets are pitch and
>     velocity bytes respectively for notes -- and 176 is the CC channel
>     byte plus controller number and value. .
>
>     For each additional channel just add one number. See this page for a
>     table of what your messages should be.
>
>     http://fmslogo.sourceforge.net/manual/midi-table.html
>
>     If you don't want to use MIDI notes just replace cpsmidi with
>     invalues and labels, ie
>
>     iFreq invalue "frequency"
>
>     then your pd messages simply say control frequency $1
>
>     However, using this method you have to send another message that
>     says set frequency (and other controls you may have set) before it
>     will be passed.
>
>     The cool thing that I've tested is you CAN run multiple instances of
>     Csound~ within PD as well so I have an effects orchestra and a
>     instrument orchestra where the effects orchestra has delay and reverb.
>     I then have a 16 channel mixer patch within PD that has sends and
>     returns to these effects.
>
>     Then all I need is a MIDI sequencer and I don't have to mess about
>     with scores, front ends, coding GUI or any of that mess. PD might
>     just be the best "front end" for Csound once you have everything
>     configured because of it's strengths in GUI objects and routing
>     whereas Csound has far better signal processing and synthesis
>     capability.
>
>     On Fri, Sep 27, 2019 at 6:57 AM Forrest Curo      > wrote:
>
>         just sending notes at pd's equivalent of k-rate. But pd likes to
>         break up messages at commas, which limits the opcodes I can send
>         this way.
>
>         On Fri, Sep 27, 2019 at 6:50 AM Victor Lazzarini
>         > wrote:
>
>             so it doesn't work. Yes the UDP server can be used, if
>             you're not interfacing the audio with the rest of Pd.
>
>             Prof. Victor Lazzarini
>             Maynooth University
>             Ireland
>
>             On 27 Sep 2019, at 15:45, Forrest Curo
>             > wrote:
>
>>             I tried -o dac and got a refusal-to-compile error.
>>
>>             The easiest way to avoid complications (for me at least)
>>             seems to be to run csound separately
>>             with (say) --port=3456
>>             and run pd with
>>
>>             [connect localhost 3456 (
>>             |
>>             |disconnect (
>>             |
>>             |      |receive toout |
>>             |    /
>>             |  |send scoreline_i "i 2 0 1 $1 $2 " (
>>             | /
>>             |netsend -u |
>>
>>             (while sending pairs of numbers to 'toout' via messages
>>             from other pd patches.)
>>
>>             But I'm still groping out which opcode I can use this way
>>             to send channel messages.
>>
>>
>>             On Fri, Sep 27, 2019 at 5:33 AM Victor Lazzarini
>>             >
>>             wrote:
>>
>>                 Audio to dac is disabled internally I think. I can't
>>                 remember if you can re-enable it with -odac, need to
>>                 look at the code.
>>
>>                 MIDI input has to come from Pd as well, since Csound
>>                 sets its midi callbacks to pick midi from there
>>                 (instead of a midi device).
>>                 MIDI files with -f should work.
>>
>>                 You can output MIDI files, have to check about MIDI
>>                 out. Audio files with fout also
>>                 work as normal.
>>
>>
>>                 Prof. Victor Lazzarini
>>                 Maynooth University
>>                 Ireland
>>                 On 27 Sep 2019, at 12:55, Forrest Curo
>>                 >
>>                 wrote:
>>
>>>                 If I understand this right, when you run a csd in
>>>                 Pure Data via [csound~] you're running a full
>>>                 instance of csound, but with pd providing inputs and
>>>                 outputs.
>>>
>>>                 Can this instance accept other inputs and send other
>>>                 outputs more directly.
>>>
>>>                 An rt midi message direct to an instrument in the
>>>                 running instance?
>>>
>>>                 Sound directly to speakers rather than to [dac~] ?
>>>                 (Any advantages or disadvantages if you can?)
>>>
>>>                 Output midi and audio files?
>>>
>>>                 Forrest Curo
>>>                 San Diego
>>>                 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
>>                 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
>>
>>             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
>             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
>
>         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
>
>     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
>
> 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

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