[Csnd] API and csound~ (max) question
Date | 2021-06-09 18:26 |
From | Iain Duncan |
Subject | [Csnd] API and csound~ (max) question |
Hi folks, while I wait for my copy of the big new csound book to make its way across the Atlantic, I'm hoping someone could give me a broad-strokes overview of the practicality of doing something, and how one would go about it.
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
I want to have the csound~ object in Max (and later Pd) triggering Max event messages based on kr activity in csound instruments. I'd like to be able to, for example, specify an instrument to be an lfo and at some k-rate trigger a C function in the host code that is hosting CSound through the API. Though sending a generic Max message would probably do too. I'm not sure whether this will necessitate some kind of opcode development or is already in the API? (Or perhaps is even in the csound~ object already and I haven't found it).. Any thoughts would be most appreciated! iain |
Date | 2021-06-09 18:43 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] API and csound~ (max) question |
I don't think it needs anything extra. These opcodes
and invalue
should take care of control in and out. I think it sends a message with two items, the channel name followed by the control rate value.
The named channel bus (e.g. chnget/chnset) should also work in the same way.
I'm guessing here based on how it works in Pd.
Rick Boulanger would know better since he used csound~ extensively.
Prof. Victor Lazzarini
Maynooth University
Ireland
On Jun 9, 2021, at 6:27 PM, Iain Duncan <iainduncanlists@gmail.com> wrote:
|
Date | 2021-06-09 21:49 |
From | Iain Duncan |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] API and csound~ (max) question |
Thanks Victor, I'll muck around with that and see how I do. I was thinking of taking advantage of csound's polyphony model, so that a scheme process (in the algorithmic composition sense) could trigger an instrument instance for some period of time, having it callback with ramp values. In which case I think I want more than just a chan identifier. Perhaps I'll need to cook up an opcode that can send back a pair somehow of value, plus pfield it received. At any rate, I'm looking forward to the book and figuring out how to do this, and to doing it in Pd too. So far the experiments combining Max, Scheme for Max, Csound, and modular have been really promising, and the Pd port is coming along pretty smoothly. iain On Wed, Jun 9, 2021 at 10:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2021-06-09 21:56 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] API and csound~ (max) question |
You don’t need an opcode (unless you are thinking of an UDO), you can concatenate strings and numbers with sprintf to make individual channel names on the fly. That’s the most common way of doing it. You can use fractional p1 and use that in the channel names. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 9 Jun 2021, at 21:49, Iain Duncan |
Date | 2021-06-09 22:21 |
From | Iain Duncan |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] API and csound~ (max) question |
Ah great to know, thanks! iain On Wed, Jun 9, 2021 at 1:56 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: You don’t need an opcode (unless you are thinking of an UDO), you can concatenate strings and numbers with sprintf |