Csound Csound-dev Csound-tekno Search About

[Cs-dev] plugins opcode question

Date2008-04-16 23:44
FromRory Walsh
Subject[Cs-dev] plugins opcode question
I've started writing a simple serial opcode and I need to close the port 
when Csound finishes. The OENTRY structure lets one specify an 
initialisation function and a processing function, but where can I 
specify some kind of reset function to make sure the port closes when 
Csound finishes? Cheers.

Rory.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 11:00
FromVictor Lazzarini
SubjectRe: [Cs-dev] plugins opcode question
You can register a callback:

int callback(CSOUND *csound, void *p);

CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata, 
int(*)(CSOUND *, VOID *)callback);

Victor

At 23:44 16/04/2008, you wrote:
>I've started writing a simple serial opcode and I need to close the port
>when Csound finishes. The OENTRY structure lets one specify an
>initialisation function and a processing function, but where can I
>specify some kind of reset function to make sure the port closes when
>Csound finishes? Cheers.
>
>Rory.
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>Don't miss this year's exciting event. There's still time to save $100.
>Use priority code J8TL2D2.
>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 11:06
FromRory Walsh
SubjectRe: [Cs-dev] plugins opcode question
Thanks Victor, where do I register the callback, my init function perhaps?

Victor Lazzarini wrote:
> You can register a callback:
> 
> int callback(CSOUND *csound, void *p);
> 
> CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata, 
> int(*)(CSOUND *, VOID *)callback);
> 
> Victor
> 
> At 23:44 16/04/2008, you wrote:
>> I've started writing a simple serial opcode and I need to close the port
>> when Csound finishes. The OENTRY structure lets one specify an
>> initialisation function and a processing function, but where can I
>> specify some kind of reset function to make sure the port closes when
>> Csound finishes? Cheers.
>>
>> Rory.
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>> Don't miss this year's exciting event. There's still time to save $100.
>> Use priority code J8TL2D2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 12:05
FromVictor Lazzarini
SubjectRe: [Cs-dev] plugins opcode question
yes. Take a look at, for instance, pvsbasic.c.

At 11:06 17/04/2008, you wrote:
>Thanks Victor, where do I register the callback, my init function perhaps?
>
>Victor Lazzarini wrote:
> > You can register a callback:
> >
> > int callback(CSOUND *csound, void *p);
> >
> > CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata,
> > int(*)(CSOUND *, VOID *)callback);
> >
> > Victor
> >
> > At 23:44 16/04/2008, you wrote:
> >> I've started writing a simple serial opcode and I need to close the port
> >> when Csound finishes. The OENTRY structure lets one specify an
> >> initialisation function and a processing function, but where can I
> >> specify some kind of reset function to make sure the port closes when
> >> Csound finishes? Cheers.
> >>
> >> Rory.
> >>
> >> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >> Don't miss this year's exciting event. There's still time to save $100.
> >> Use priority code J8TL2D2.
> >> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> > Victor Lazzarini
> > Music Technology Laboratory
> > Music Department
> > National University of Ireland, Maynooth
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> > 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>Don't miss this year's exciting event. There's still time to save $100.
>Use priority code J8TL2D2.
>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 12:55
FromRory Walsh
SubjectRe: [Cs-dev] plugins opcode question
Thanks Victor, that's helped.

Victor Lazzarini wrote:
> yes. Take a look at, for instance, pvsbasic.c.
> 
> At 11:06 17/04/2008, you wrote:
>> Thanks Victor, where do I register the callback, my init function perhaps?
>>
>> Victor Lazzarini wrote:
>>> You can register a callback:
>>>
>>> int callback(CSOUND *csound, void *p);
>>>
>>> CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata,
>>> int(*)(CSOUND *, VOID *)callback);
>>>
>>> Victor
>>>
>>> At 23:44 16/04/2008, you wrote:
>>>> I've started writing a simple serial opcode and I need to close the port
>>>> when Csound finishes. The OENTRY structure lets one specify an
>>>> initialisation function and a processing function, but where can I
>>>> specify some kind of reset function to make sure the port closes when
>>>> Csound finishes? Cheers.
>>>>
>>>> Rory.
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>> Don't miss this year's exciting event. There's still time to save $100.
>>>> Use priority code J8TL2D2.
>>>>
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> Victor Lazzarini
>>> Music Technology Laboratory
>>> Music Department
>>> National University of Ireland, Maynooth
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>> Don't miss this year's exciting event. There's still time to save $100.
>>> Use priority code J8TL2D2.
>>>
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>> Don't miss this year's exciting event. There's still time to save $100.
>> Use priority code J8TL2D2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 13:23
FromRory Walsh
SubjectRe: [Cs-dev] plugins opcode question
Would I be correct in assuming that it's not a good idea to call 
QueryGlobalVariable() within ones processing loop or does it make much 
of a difference?

Rory.


Rory Walsh wrote:
> Thanks Victor, that's helped.
> 
> Victor Lazzarini wrote:
>> yes. Take a look at, for instance, pvsbasic.c.
>>
>> At 11:06 17/04/2008, you wrote:
>>> Thanks Victor, where do I register the callback, my init function perhaps?
>>>
>>> Victor Lazzarini wrote:
>>>> You can register a callback:
>>>>
>>>> int callback(CSOUND *csound, void *p);
>>>>
>>>> CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata,
>>>> int(*)(CSOUND *, VOID *)callback);
>>>>
>>>> Victor
>>>>
>>>> At 23:44 16/04/2008, you wrote:
>>>>> I've started writing a simple serial opcode and I need to close the port
>>>>> when Csound finishes. The OENTRY structure lets one specify an
>>>>> initialisation function and a processing function, but where can I
>>>>> specify some kind of reset function to make sure the port closes when
>>>>> Csound finishes? Cheers.
>>>>>
>>>>> Rory.
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>>> Don't miss this year's exciting event. There's still time to save $100.
>>>>> Use priority code J8TL2D2.
>>>>>
>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> Victor Lazzarini
>>>> Music Technology Laboratory
>>>> Music Department
>>>> National University of Ireland, Maynooth
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>> Don't miss this year's exciting event. There's still time to save $100.
>>>> Use priority code J8TL2D2.
>>>>
>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>> Don't miss this year's exciting event. There's still time to save $100.
>>> Use priority code J8TL2D2.
>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> Victor Lazzarini
>> Music Technology Laboratory
>> Music Department
>> National University of Ireland, Maynooth
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save $100. 
>> Use priority code J8TL2D2. 
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 14:42
FromVictor Lazzarini
SubjectRe: [Cs-dev] plugins opcode question
why would you want to do that?

At 13:23 17/04/2008, you wrote:
>Would I be correct in assuming that it's not a good idea to call
>QueryGlobalVariable() within ones processing loop or does it make much
>of a difference?
>
>Rory.
>
>
>Rory Walsh wrote:
> > Thanks Victor, that's helped.
> >
> > Victor Lazzarini wrote:
> >> yes. Take a look at, for instance, pvsbasic.c.
> >>
> >> At 11:06 17/04/2008, you wrote:
> >>> Thanks Victor, where do I register the callback, my init function 
> perhaps?
> >>>
> >>> Victor Lazzarini wrote:
> >>>> You can register a callback:
> >>>>
> >>>> int callback(CSOUND *csound, void *p);
> >>>>
> >>>> CSOUND::RegisterDeinitCallback(CSOUND *csound, void *callbackdata,
> >>>> int(*)(CSOUND *, VOID *)callback);
> >>>>
> >>>> Victor
> >>>>
> >>>> At 23:44 16/04/2008, you wrote:
> >>>>> I've started writing a simple serial opcode and I need to close the 
> port
> >>>>> when Csound finishes. The OENTRY structure lets one specify an
> >>>>> initialisation function and a processing function, but where can I
> >>>>> specify some kind of reset function to make sure the port closes when
> >>>>> Csound finishes? Cheers.
> >>>>>
> >>>>> Rory.
> >>>>>
> >>>>> 
> -------------------------------------------------------------------------
> >>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >>>>> Don't miss this year's exciting event. There's still time to save $100.
> >>>>> Use priority code J8TL2D2.
> >>>>>
> >>> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >>>>> _______________________________________________
> >>>>> Csound-devel mailing list
> >>>>> Csound-devel@lists.sourceforge.net
> >>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>>> Victor Lazzarini
> >>>> Music Technology Laboratory
> >>>> Music Department
> >>>> National University of Ireland, Maynooth
> >>>>
> >>>>
> >>>> 
> -------------------------------------------------------------------------
> >>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >>>> Don't miss this year's exciting event. There's still time to save $100.
> >>>> Use priority code J8TL2D2.
> >>>>
> >>> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >>>> _______________________________________________
> >>>> Csound-devel mailing list
> >>>> Csound-devel@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>>>
> >>> -------------------------------------------------------------------------
> >>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >>> Don't miss this year's exciting event. There's still time to save $100.
> >>> Use priority code J8TL2D2.
> >>> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >>> _______________________________________________
> >>> Csound-devel mailing list
> >>> Csound-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >> Victor Lazzarini
> >> Music Technology Laboratory
> >> Music Department
> >> National University of Ireland, Maynooth
> >>
> >>
> >> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >> Don't miss this year's exciting event. There's still time to save $100.
> >> Use priority code J8TL2D2.
> >> 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> > 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>Don't miss this year's exciting event. There's still time to save $100.
>Use priority code J8TL2D2.
>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-04-17 15:03
FromRory Walsh
SubjectRe: [Cs-dev] plugins opcode question
No reason... less said about it the better!

Victor Lazzarini wrote:
> why would you want to do that?
> 
> At 13:23 17/04/2008, you wrote:
>> Would I be correct in assuming that it's not a good idea to call
>> QueryGlobalVariable() within ones processing loop or does it make much
>> of a difference?
>>
>> Rory.
>>
>>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net