Csound Csound-dev Csound-tekno Search About

[Csnd] ScoreEvent and named instruments

Date2012-05-17 21:12
FromTarmo Johannes
Subject[Csnd] ScoreEvent and named instruments

Hello,

 

if I have name instruments in my csd like

instr sound

endin

 

can I somhow call it by name from c++ api?

 

I understand that in

 

virtual int ScoreEvent(char type, const MYFLT *pFields, long numFields)

 

I can give the instrument only as number in the first member of the pFields array.

 

Is there a way to pass the instrument name as string?

 

greetings,

tarmo


Date2012-05-17 21:35
FromRory Walsh
SubjectRe: [Csnd] ScoreEvent and named instruments
Hi Tarmo. I think if you use csoundInputMessage() it's easier. You can
then just pass the entire score statement as one string.

On 17 May 2012 21:12, Tarmo Johannes  wrote:
> Hello,
>
>
>
> if I have name instruments in my csd like
>
> instr sound
>
> endin
>
>
>
> can I somhow call it by name from c++ api?
>
>
>
> I understand that in
>
>
>
> virtual int ScoreEvent(char type, const MYFLT *pFields, long numFields)
>
>
>
> I can give the instrument only as number in the first member of the pFields
> array.
>
>
>
> Is there a way to pass the instrument name as string?
>
>
>
> greetings,
>
> tarmo

Date2012-05-17 22:19
FromTarmo Johannes
SubjectRe: [Csnd] ScoreEvent and named instruments
Thanks, Rory!

you probably meant

virtual void InputMessage(const char *message)

I will try it out tomorrow, but I guess, that was it.

tarmo


On Thursday 17 May 2012 21:35:19 Rory Walsh wrote:
> Hi Tarmo. I think if you use csoundInputMessage() it's easier. You can
> then just pass the entire score statement as one string.
> 
> On 17 May 2012 21:12, Tarmo Johannes  wrote:
> > Hello,
> > 
> > 
> > 
> > if I have name instruments in my csd like
> > 
> > instr sound
> > 
> > endin
> > 
> > 
> > 
> > can I somhow call it by name from c++ api?
> > 
> > 
> > 
> > I understand that in
> > 
> > 
> > 
> > virtual int ScoreEvent(char type, const MYFLT *pFields, long numFields)
> > 
> > 
> > 
> > I can give the instrument only as number in the first member of the
> > pFields
> > array.
> > 
> > 
> > 
> > Is there a way to pass the instrument name as string?
> > 
> > 
> > 
> > greetings,
> > 
> > tarmo
> 
> 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"

Date2012-05-17 23:19
FromRory Walsh
SubjectRe: [Csnd] ScoreEvent and named instruments
It's csoundInputMessage() in the native C API. I guess you're probably
using one of the other interfaces. Regardless of that it should do the
trick.


On 17 May 2012 22:19, Tarmo Johannes  wrote:
> Thanks, Rory!
>
> you probably meant
>
> virtual void InputMessage(const char *message)
>
> I will try it out tomorrow, but I guess, that was it.
>
> tarmo
>
>
> On Thursday 17 May 2012 21:35:19 Rory Walsh wrote:
>> Hi Tarmo. I think if you use csoundInputMessage() it's easier. You can
>> then just pass the entire score statement as one string.
>>
>> On 17 May 2012 21:12, Tarmo Johannes  wrote:
>> > Hello,
>> >
>> >
>> >
>> > if I have name instruments in my csd like
>> >
>> > instr sound
>> >
>> > endin
>> >
>> >
>> >
>> > can I somhow call it by name from c++ api?
>> >
>> >
>> >
>> > I understand that in
>> >
>> >
>> >
>> > virtual int ScoreEvent(char type, const MYFLT *pFields, long numFields)
>> >
>> >
>> >
>> > I can give the instrument only as number in the first member of the
>> > pFields
>> > array.
>> >
>> >
>> >
>> > Is there a way to pass the instrument name as string?
>> >
>> >
>> >
>> > greetings,
>> >
>> > tarmo
>>
>> 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"
>