Csound Csound-dev Csound-tekno Search About

[Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)

Date2014-03-30 13:58
FromRory Walsh
Subject[Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Would it be Ok to add the following lines to compile_orc_i() after the
call is made to fread() so that it will auto-extract an orchestra
section from a .csd file? I would like Cabbage users to be able to
compile instruments from other .csd files on init-time passes.

//check to see if input file is a .CSD
ptr = strstr(orc,"");
if(ptr!=NULL)
    start = ptr+15-orc;
ptr = strstr(orc,"");
if(ptr!=NULL)
   end = ptr-orc;

//if so extract orchestra section from it
if(end-start)
sprintf(orc, "%.*s\n", end - start, &orc[start]);

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 14:24
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Ok, I just sent a pull request. Isn't this one of the reasons we moved
to github :)

On 30 March 2014 13:58, Rory Walsh  wrote:
> Would it be Ok to add the following lines to compile_orc_i() after the
> call is made to fread() so that it will auto-extract an orchestra
> section from a .csd file? I would like Cabbage users to be able to
> compile instruments from other .csd files on init-time passes.
>
> //check to see if input file is a .CSD
> ptr = strstr(orc,"");
> if(ptr!=NULL)
>     start = ptr+15-orc;
> ptr = strstr(orc,"");
> if(ptr!=NULL)
>    end = ptr-orc;
>
> //if so extract orchestra section from it
> if(end-start)
> sprintf(orc, "%.*s\n", end - start, &orc[start]);

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 15:22
FromAndres Cabrera
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
AttachmentsNone  None  
I've just commented there :). I think the parsing would be better done in csound prior to passing the text. What is the meaning of the rest of the csd, how is it handled. Maybe users might expect that the score be run too, and be baffled when it isn't. Also what happens if your non-csd code contains the text <CsInstruments> and </CsInstruments> inside strings because it generates csds itself? (I know, unlikely, but we will get a message in a year or two about this...)

Cheers,
Andrés


On Sun, Mar 30, 2014 at 6:24 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
Ok, I just sent a pull request. Isn't this one of the reasons we moved
to github :)

On 30 March 2014 13:58, Rory Walsh <rorywalsh@ear.ie> wrote:
> Would it be Ok to add the following lines to compile_orc_i() after the
> call is made to fread() so that it will auto-extract an orchestra
> section from a .csd file? I would like Cabbage users to be able to
> compile instruments from other .csd files on init-time passes.
>
> //check to see if input file is a .CSD
> ptr = strstr(orc,"<CsInstruments>");
> if(ptr!=NULL)
>     start = ptr+15-orc;
> ptr = strstr(orc,"</CsInstruments>");
> if(ptr!=NULL)
>    end = ptr-orc;
>
> //if so extract orchestra section from it
> if(end-start)
> sprintf(orc, "%.*s\n", end - start, &orc[start]);

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-03-30 15:25
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Indeed. A few of those ideas came to me after I wrote that code! There
also seems to be an issue with it when calling it from a front-end.
Probably best to ignore that particular pull request then ;)


On 30 March 2014 15:22, Andres Cabrera  wrote:
> I've just commented there :). I think the parsing would be better done in
> csound prior to passing the text. What is the meaning of the rest of the
> csd, how is it handled. Maybe users might expect that the score be run too,
> and be baffled when it isn't. Also what happens if your non-csd code
> contains the text  and  inside strings
> because it generates csds itself? (I know, unlikely, but we will get a
> message in a year or two about this...)
>
> Cheers,
> Andrés
>
>
> On Sun, Mar 30, 2014 at 6:24 AM, Rory Walsh  wrote:
>>
>> Ok, I just sent a pull request. Isn't this one of the reasons we moved
>> to github :)
>>
>> On 30 March 2014 13:58, Rory Walsh  wrote:
>> > Would it be Ok to add the following lines to compile_orc_i() after the
>> > call is made to fread() so that it will auto-extract an orchestra
>> > section from a .csd file? I would like Cabbage users to be able to
>> > compile instruments from other .csd files on init-time passes.
>> >
>> > //check to see if input file is a .CSD
>> > ptr = strstr(orc,"");
>> > if(ptr!=NULL)
>> >     start = ptr+15-orc;
>> > ptr = strstr(orc,"");
>> > if(ptr!=NULL)
>> >    end = ptr-orc;
>> >
>> > //if so extract orchestra section from it
>> > if(end-start)
>> > sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 16:59
FromSteven Yi
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Hi Rory,

You can always revise the pull request with further commits.  Also, we
could add you to the Developer team for push access.

steven

On Sun, Mar 30, 2014 at 7:25 AM, Rory Walsh  wrote:
> Indeed. A few of those ideas came to me after I wrote that code! There
> also seems to be an issue with it when calling it from a front-end.
> Probably best to ignore that particular pull request then ;)
>
>
> On 30 March 2014 15:22, Andres Cabrera  wrote:
>> I've just commented there :). I think the parsing would be better done in
>> csound prior to passing the text. What is the meaning of the rest of the
>> csd, how is it handled. Maybe users might expect that the score be run too,
>> and be baffled when it isn't. Also what happens if your non-csd code
>> contains the text  and  inside strings
>> because it generates csds itself? (I know, unlikely, but we will get a
>> message in a year or two about this...)
>>
>> Cheers,
>> Andrés
>>
>>
>> On Sun, Mar 30, 2014 at 6:24 AM, Rory Walsh  wrote:
>>>
>>> Ok, I just sent a pull request. Isn't this one of the reasons we moved
>>> to github :)
>>>
>>> On 30 March 2014 13:58, Rory Walsh  wrote:
>>> > Would it be Ok to add the following lines to compile_orc_i() after the
>>> > call is made to fread() so that it will auto-extract an orchestra
>>> > section from a .csd file? I would like Cabbage users to be able to
>>> > compile instruments from other .csd files on init-time passes.
>>> >
>>> > //check to see if input file is a .CSD
>>> > ptr = strstr(orc,"");
>>> > if(ptr!=NULL)
>>> >     start = ptr+15-orc;
>>> > ptr = strstr(orc,"");
>>> > if(ptr!=NULL)
>>> >    end = ptr-orc;
>>> >
>>> > //if so extract orchestra section from it
>>> > if(end-start)
>>> > sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 17:01
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
That's good to know. I don't think I'll look for push access just yet
;) Still far too much to learn about the inner workings of Csound!

On 30 March 2014 16:59, Steven Yi  wrote:
> Hi Rory,
>
> You can always revise the pull request with further commits.  Also, we
> could add you to the Developer team for push access.
>
> steven
>
> On Sun, Mar 30, 2014 at 7:25 AM, Rory Walsh  wrote:
>> Indeed. A few of those ideas came to me after I wrote that code! There
>> also seems to be an issue with it when calling it from a front-end.
>> Probably best to ignore that particular pull request then ;)
>>
>>
>> On 30 March 2014 15:22, Andres Cabrera  wrote:
>>> I've just commented there :). I think the parsing would be better done in
>>> csound prior to passing the text. What is the meaning of the rest of the
>>> csd, how is it handled. Maybe users might expect that the score be run too,
>>> and be baffled when it isn't. Also what happens if your non-csd code
>>> contains the text  and  inside strings
>>> because it generates csds itself? (I know, unlikely, but we will get a
>>> message in a year or two about this...)
>>>
>>> Cheers,
>>> Andrés
>>>
>>>
>>> On Sun, Mar 30, 2014 at 6:24 AM, Rory Walsh  wrote:
>>>>
>>>> Ok, I just sent a pull request. Isn't this one of the reasons we moved
>>>> to github :)
>>>>
>>>> On 30 March 2014 13:58, Rory Walsh  wrote:
>>>> > Would it be Ok to add the following lines to compile_orc_i() after the
>>>> > call is made to fread() so that it will auto-extract an orchestra
>>>> > section from a .csd file? I would like Cabbage users to be able to
>>>> > compile instruments from other .csd files on init-time passes.
>>>> >
>>>> > //check to see if input file is a .CSD
>>>> > ptr = strstr(orc,"");
>>>> > if(ptr!=NULL)
>>>> >     start = ptr+15-orc;
>>>> > ptr = strstr(orc,"");
>>>> > if(ptr!=NULL)
>>>> >    end = ptr-orc;
>>>> >
>>>> > //if so extract orchestra section from it
>>>> > if(end-start)
>>>> > sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 17:07
FromSteven Yi
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
This bring up something interesting (to me at least :) ):

I had started some developer documentation about Csound a while back
after the Csound Conference.  So far it's mostly just an outline, but
it's in the doc/csound_system_documentation folder.  It exists mostly
as an outline as I hadn't gotten around to filling it in.

If you have any particular question about Csound's internals, feel
free to ask away. It might be a good motivator to start filling in
parts of the document.  Also, anyone should feel free to edit the
document. Another note, there is an inbox.txt file in that folder that
has some snippets from emails I had received here or offlist with
information that should probably go into the document.  Please feel
free to add to that as well.

On Sun, Mar 30, 2014 at 9:01 AM, Rory Walsh  wrote:
> That's good to know. I don't think I'll look for push access just yet
> ;) Still far too much to learn about the inner workings of Csound!
>
> On 30 March 2014 16:59, Steven Yi  wrote:
>> Hi Rory,
>>
>> You can always revise the pull request with further commits.  Also, we
>> could add you to the Developer team for push access.
>>
>> steven
>>
>> On Sun, Mar 30, 2014 at 7:25 AM, Rory Walsh  wrote:
>>> Indeed. A few of those ideas came to me after I wrote that code! There
>>> also seems to be an issue with it when calling it from a front-end.
>>> Probably best to ignore that particular pull request then ;)
>>>
>>>
>>> On 30 March 2014 15:22, Andres Cabrera  wrote:
>>>> I've just commented there :). I think the parsing would be better done in
>>>> csound prior to passing the text. What is the meaning of the rest of the
>>>> csd, how is it handled. Maybe users might expect that the score be run too,
>>>> and be baffled when it isn't. Also what happens if your non-csd code
>>>> contains the text  and  inside strings
>>>> because it generates csds itself? (I know, unlikely, but we will get a
>>>> message in a year or two about this...)
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>>
>>>> On Sun, Mar 30, 2014 at 6:24 AM, Rory Walsh  wrote:
>>>>>
>>>>> Ok, I just sent a pull request. Isn't this one of the reasons we moved
>>>>> to github :)
>>>>>
>>>>> On 30 March 2014 13:58, Rory Walsh  wrote:
>>>>> > Would it be Ok to add the following lines to compile_orc_i() after the
>>>>> > call is made to fread() so that it will auto-extract an orchestra
>>>>> > section from a .csd file? I would like Cabbage users to be able to
>>>>> > compile instruments from other .csd files on init-time passes.
>>>>> >
>>>>> > //check to see if input file is a .CSD
>>>>> > ptr = strstr(orc,"");
>>>>> > if(ptr!=NULL)
>>>>> >     start = ptr+15-orc;
>>>>> > ptr = strstr(orc,"");
>>>>> > if(ptr!=NULL)
>>>>> >    end = ptr-orc;
>>>>> >
>>>>> > //if so extract orchestra section from it
>>>>> > if(end-start)
>>>>> > sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 18:43
FromVictor Lazzarini
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
There’s an opcode and function for compiling a CSD already. Would that not the job you want?

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 30 Mar 2014, at 13:58, Rory Walsh  wrote:

> Would it be Ok to add the following lines to compile_orc_i() after the
> call is made to fread() so that it will auto-extract an orchestra
> section from a .csd file? I would like Cabbage users to be able to
> compile instruments from other .csd files on init-time passes.
> 
> //check to see if input file is a .CSD
> ptr = strstr(orc,"");
> if(ptr!=NULL)
>    start = ptr+15-orc;
> ptr = strstr(orc,"");
> if(ptr!=NULL)
>   end = ptr-orc;
> 
> //if so extract orchestra section from it
> if(end-start)
> sprintf(orc, "%.*s\n", end - start, &orc[start]);
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 18:53
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Which opcode? Also, is it Ok to call csoundCompile() and then straight
after call csound->CompileOrc() and csound->ReadScore("i1...") a few
times to add more instruments into the mix?

On 30 March 2014 18:43, Victor Lazzarini  wrote:
> There's an opcode and function for compiling a CSD already. Would that not the job you want?
>
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
>
>
>
>
> On 30 Mar 2014, at 13:58, Rory Walsh  wrote:
>
>> Would it be Ok to add the following lines to compile_orc_i() after the
>> call is made to fread() so that it will auto-extract an orchestra
>> section from a .csd file? I would like Cabbage users to be able to
>> compile instruments from other .csd files on init-time passes.
>>
>> //check to see if input file is a .CSD
>> ptr = strstr(orc,"");
>> if(ptr!=NULL)
>>    start = ptr+15-orc;
>> ptr = strstr(orc,"");
>> if(ptr!=NULL)
>>   end = ptr-orc;
>>
>> //if so extract orchestra section from it
>> if(end-start)
>> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 19:00
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Ah, I mean sending a score with csoundInputMessage(). Yup, all works
very well. Which opcode were you referring to?

On 30 March 2014 18:53, Rory Walsh  wrote:
> Which opcode? Also, is it Ok to call csoundCompile() and then straight
> after call csound->CompileOrc() and csound->ReadScore("i1...") a few
> times to add more instruments into the mix?
>
> On 30 March 2014 18:43, Victor Lazzarini  wrote:
>> There's an opcode and function for compiling a CSD already. Would that not the job you want?
>>
>> ========================
>> Dr Victor Lazzarini
>> Senior Lecturer
>> NUI Maynooth, Ireland
>> victor dot lazzarini at nuim dot ie
>>
>>
>>
>>
>> On 30 Mar 2014, at 13:58, Rory Walsh  wrote:
>>
>>> Would it be Ok to add the following lines to compile_orc_i() after the
>>> call is made to fread() so that it will auto-extract an orchestra
>>> section from a .csd file? I would like Cabbage users to be able to
>>> compile instruments from other .csd files on init-time passes.
>>>
>>> //check to see if input file is a .CSD
>>> ptr = strstr(orc,"");
>>> if(ptr!=NULL)
>>>    start = ptr+15-orc;
>>> ptr = strstr(orc,"");
>>> if(ptr!=NULL)
>>>   end = ptr-orc;
>>>
>>> //if so extract orchestra section from it
>>> if(end-start)
>>> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 19:00
FromMichael Gogins
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
AttachmentsNone  None  
Yes. The second call to CompileOrc does not again compile the orc header, but it does compile any numbered or named instrs and opcodes that are in the new code, replacing similarly named or numbered entities. Instrs and opcodes that are already playing, that have been replaced, will continue their performance using the old code.

Similarly for ReadScore, new events are scheduled without affecting existing events.

The Csound performance in this use case will continue until the user ends it.

Hope this helps,
Mike


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


On Sun, Mar 30, 2014 at 1:53 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
Which opcode? Also, is it Ok to call csoundCompile() and then straight
after call csound->CompileOrc() and csound->ReadScore("i1...") a few
times to add more instruments into the mix?

On 30 March 2014 18:43, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> There's an opcode and function for compiling a CSD already. Would that not the job you want?
>
> ========================
> Dr Victor Lazzarini
> Senior Lecturer
> NUI Maynooth, Ireland
> victor dot lazzarini at nuim dot ie
>
>
>
>
> On 30 Mar 2014, at 13:58, Rory Walsh <rorywalsh@ear.ie> wrote:
>
>> Would it be Ok to add the following lines to compile_orc_i() after the
>> call is made to fread() so that it will auto-extract an orchestra
>> section from a .csd file? I would like Cabbage users to be able to
>> compile instruments from other .csd files on init-time passes.
>>
>> //check to see if input file is a .CSD
>> ptr = strstr(orc,"<CsInstruments>");
>> if(ptr!=NULL)
>>    start = ptr+15-orc;
>> ptr = strstr(orc,"</CsInstruments>");
>> if(ptr!=NULL)
>>   end = ptr-orc;
>>
>> //if so extract orchestra section from it
>> if(end-start)
>> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-03-30 19:09
FromRory Walsh
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
Great. I have it now. No need to mess with the API, everything that is
needed is already there.

On 30 March 2014 19:00, Michael Gogins  wrote:
> Yes. The second call to CompileOrc does not again compile the orc header,
> but it does compile any numbered or named instrs and opcodes that are in the
> new code, replacing similarly named or numbered entities. Instrs and opcodes
> that are already playing, that have been replaced, will continue their
> performance using the old code.
>
> Similarly for ReadScore, new events are scheduled without affecting existing
> events.
>
> The Csound performance in this use case will continue until the user ends
> it.
>
> Hope this helps,
> Mike
>
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Sun, Mar 30, 2014 at 1:53 PM, Rory Walsh  wrote:
>>
>> Which opcode? Also, is it Ok to call csoundCompile() and then straight
>> after call csound->CompileOrc() and csound->ReadScore("i1...") a few
>> times to add more instruments into the mix?
>>
>> On 30 March 2014 18:43, Victor Lazzarini  wrote:
>> > There's an opcode and function for compiling a CSD already. Would that
>> > not the job you want?
>> >
>> > ========================
>> > Dr Victor Lazzarini
>> > Senior Lecturer
>> > NUI Maynooth, Ireland
>> > victor dot lazzarini at nuim dot ie
>> >
>> >
>> >
>> >
>> > On 30 Mar 2014, at 13:58, Rory Walsh  wrote:
>> >
>> >> Would it be Ok to add the following lines to compile_orc_i() after the
>> >> call is made to fread() so that it will auto-extract an orchestra
>> >> section from a .csd file? I would like Cabbage users to be able to
>> >> compile instruments from other .csd files on init-time passes.
>> >>
>> >> //check to see if input file is a .CSD
>> >> ptr = strstr(orc,"");
>> >> if(ptr!=NULL)
>> >>    start = ptr+15-orc;
>> >> ptr = strstr(orc,"");
>> >> if(ptr!=NULL)
>> >>   end = ptr-orc;
>> >>
>> >> //if so extract orchestra section from it
>> >> if(end-start)
>> >> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 19:14
FromVictor Lazzarini
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
compilecsd.

There is an api function too.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 30 Mar 2014, at 19:00, Rory Walsh  wrote:

> Ah, I mean sending a score with csoundInputMessage(). Yup, all works
> very well. Which opcode were you referring to?
> 
> On 30 March 2014 18:53, Rory Walsh  wrote:
>> Which opcode? Also, is it Ok to call csoundCompile() and then straight
>> after call csound->CompileOrc() and csound->ReadScore("i1...") a few
>> times to add more instruments into the mix?
>> 
>> On 30 March 2014 18:43, Victor Lazzarini  wrote:
>>> There's an opcode and function for compiling a CSD already. Would that not the job you want?
>>> 
>>> ========================
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> NUI Maynooth, Ireland
>>> victor dot lazzarini at nuim dot ie
>>> 
>>> 
>>> 
>>> 
>>> On 30 Mar 2014, at 13:58, Rory Walsh  wrote:
>>> 
>>>> Would it be Ok to add the following lines to compile_orc_i() after the
>>>> call is made to fread() so that it will auto-extract an orchestra
>>>> section from a .csd file? I would like Cabbage users to be able to
>>>> compile instruments from other .csd files on init-time passes.
>>>> 
>>>> //check to see if input file is a .CSD
>>>> ptr = strstr(orc,"");
>>>> if(ptr!=NULL)
>>>>   start = ptr+15-orc;
>>>> ptr = strstr(orc,"");
>>>> if(ptr!=NULL)
>>>>  end = ptr-orc;
>>>> 
>>>> //if so extract orchestra section from it
>>>> if(end-start)
>>>> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-03-30 22:55
FromMichael Gogins
SubjectRe: [Cs-dev] int compile_orc_i(CSOUND *csound, COMPILE *p)
AttachmentsNone  None  
csoundInputMessage only accepts a limited amount of text. csoundReadScore accepts any amount of text.

Regards,
Mike


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


On Sun, Mar 30, 2014 at 2:14 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
compilecsd.

There is an api function too.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 30 Mar 2014, at 19:00, Rory Walsh <rorywalsh@ear.ie> wrote:

> Ah, I mean sending a score with csoundInputMessage(). Yup, all works
> very well. Which opcode were you referring to?
>
> On 30 March 2014 18:53, Rory Walsh <rorywalsh@ear.ie> wrote:
>> Which opcode? Also, is it Ok to call csoundCompile() and then straight
>> after call csound->CompileOrc() and csound->ReadScore("i1...") a few
>> times to add more instruments into the mix?
>>
>> On 30 March 2014 18:43, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
>>> There's an opcode and function for compiling a CSD already. Would that not the job you want?
>>>
>>> ========================
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> NUI Maynooth, Ireland
>>> victor dot lazzarini at nuim dot ie
>>>
>>>
>>>
>>>
>>> On 30 Mar 2014, at 13:58, Rory Walsh <rorywalsh@ear.ie> wrote:
>>>
>>>> Would it be Ok to add the following lines to compile_orc_i() after the
>>>> call is made to fread() so that it will auto-extract an orchestra
>>>> section from a .csd file? I would like Cabbage users to be able to
>>>> compile instruments from other .csd files on init-time passes.
>>>>
>>>> //check to see if input file is a .CSD
>>>> ptr = strstr(orc,"<CsInstruments>");
>>>> if(ptr!=NULL)
>>>>   start = ptr+15-orc;
>>>> ptr = strstr(orc,"</CsInstruments>");
>>>> if(ptr!=NULL)
>>>>  end = ptr-orc;
>>>>
>>>> //if so extract orchestra section from it
>>>> if(end-start)
>>>> sprintf(orc, "%.*s\n", end - start, &orc[start]);
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel