Csound Csound-dev Csound-tekno Search About

[Cs-dev] Calling csoundCompileOrc in opcodes

Date2015-08-17 11:01
FromEd Costello
Subject[Cs-dev] Calling csoundCompileOrc in opcodes
AttachmentsNone  None  
Hi, 
I don't seems to be able to call csoundCompileOrc in a custom opcode that I am writing. In csound.h there is an include guard for if CSOUND_CSDL_H is defined, commenting this out means that I can then call csoundCompileOrc but I'm wondering if this is a good idea. It seems to work alright, just wondering if there are any bad consequences to this.
Ed
--
Edward Costello

Date2015-08-17 11:10
Fromjpff
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
Surely you should be calling csound->CompileOrc ?


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

Date2015-08-17 11:18
FromEd Costello
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
AttachmentsNone  None  
I can't find that function pointer in the header files.
Ed

On Mon, 17 Aug 2015 at 12:11 jpff <jpff@codemist.co.uk> wrote:
Surely you should be calling csound->CompileOrc ?


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

Date2015-08-17 11:47
FromVictor Lazzarini
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
That guard is there for a reason, and it should stay there. Plugin opcodes should only use functions
exported in CSOUND. A solution is to make your opcode an internal one, which can use csoundCompileOrc.
I am not sure exporting this function for general plugin opcode use is a good idea.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 17 Aug 2015, at 11:01, Ed Costello  wrote:
> 
> Hi, 
> I don't seems to be able to call csoundCompileOrc in a custom opcode that I am writing. In csound.h there is an include guard for if CSOUND_CSDL_H is defined, commenting this out means that I can then call csoundCompileOrc but I'm wondering if this is a good idea. It seems to work alright, just wondering if there are any bad consequences to this.
> Ed
> -- 
> Edward Costello
> ------------------------------------------------------------------------------
> _______________________________________________
> 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

Date2015-08-17 12:09
FromEd Costello
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
AttachmentsNone  None  
Oh ok, well thats fair enough. 
The reason I ask is because I wrote a Mac only opcode to watch .orc files and recompile them automatically when they are changed. This is useful for live coding. I'm not sure though if this would make a good internal Csound opcode as there is no real cross platform api to watch files. Mac OS X has kqueue, Linux has inotify and Windows has.. whatever it has. I think this would be a great feature to have built in, but it might be tricky to get working on all platforms.
Ed

On Mon, 17 Aug 2015 at 12:47 Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That guard is there for a reason, and it should stay there. Plugin opcodes should only use functions
exported in CSOUND. A solution is to make your opcode an internal one, which can use csoundCompileOrc.
I am not sure exporting this function for general plugin opcode use is a good idea.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 17 Aug 2015, at 11:01, Ed Costello <phasereset@gmail.com> wrote:
>
> Hi,
> I don't seems to be able to call csoundCompileOrc in a custom opcode that I am writing. In csound.h there is an include guard for if CSOUND_CSDL_H is defined, commenting this out means that I can then call csoundCompileOrc but I'm wondering if this is a good idea. It seems to work alright, just wondering if there are any bad consequences to this.
> Ed
> --
> Edward Costello
> ------------------------------------------------------------------------------
> _______________________________________________
> 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
--
Edward Costello

Date2015-08-17 12:25
FromVictor Lazzarini
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
Don’t the compilestr, compileorc, or compilecsd opcodes do what you need if you just add a “filewatch” opcode?
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 17 Aug 2015, at 12:09, Ed Costello  wrote:
> 
> Oh ok, well thats fair enough. 
> The reason I ask is because I wrote a Mac only opcode to watch .orc files and recompile them automatically when they are changed. This is useful for live coding. I'm not sure though if this would make a good internal Csound opcode as there is no real cross platform api to watch files. Mac OS X has kqueue, Linux has inotify and Windows has.. whatever it has. I think this would be a great feature to have built in, but it might be tricky to get working on all platforms.
> Ed
> 
> On Mon, 17 Aug 2015 at 12:47 Victor Lazzarini  wrote:
> That guard is there for a reason, and it should stay there. Plugin opcodes should only use functions
> exported in CSOUND. A solution is to make your opcode an internal one, which can use csoundCompileOrc.
> I am not sure exporting this function for general plugin opcode use is a good idea.
> 
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
> 
> > On 17 Aug 2015, at 11:01, Ed Costello  wrote:
> >
> > Hi,
> > I don't seems to be able to call csoundCompileOrc in a custom opcode that I am writing. In csound.h there is an include guard for if CSOUND_CSDL_H is defined, commenting this out means that I can then call csoundCompileOrc but I'm wondering if this is a good idea. It seems to work alright, just wondering if there are any bad consequences to this.
> > Ed
> > --
> > Edward Costello
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > 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
> -- 
> Edward Costello
> ------------------------------------------------------------------------------
> _______________________________________________
> 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

Date2015-08-17 12:37
FromEd Costello
SubjectRe: [Cs-dev] Calling csoundCompileOrc in opcodes
AttachmentsNone  None  
Yes that would work alright,
Ed

On Mon, 17 Aug 2015 at 13:26 Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Don’t the compilestr, compileorc, or compilecsd opcodes do what you need if you just add a “filewatch” opcode?
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 17 Aug 2015, at 12:09, Ed Costello <phasereset@gmail.com> wrote:
>
> Oh ok, well thats fair enough.
> The reason I ask is because I wrote a Mac only opcode to watch .orc files and recompile them automatically when they are changed. This is useful for live coding. I'm not sure though if this would make a good internal Csound opcode as there is no real cross platform api to watch files. Mac OS X has kqueue, Linux has inotify and Windows has.. whatever it has. I think this would be a great feature to have built in, but it might be tricky to get working on all platforms.
> Ed
>
> On Mon, 17 Aug 2015 at 12:47 Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
> That guard is there for a reason, and it should stay there. Plugin opcodes should only use functions
> exported in CSOUND. A solution is to make your opcode an internal one, which can use csoundCompileOrc.
> I am not sure exporting this function for general plugin opcode use is a good idea.
>
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
> > On 17 Aug 2015, at 11:01, Ed Costello <phasereset@gmail.com> wrote:
> >
> > Hi,
> > I don't seems to be able to call csoundCompileOrc in a custom opcode that I am writing. In csound.h there is an include guard for if CSOUND_CSDL_H is defined, commenting this out means that I can then call csoundCompileOrc but I'm wondering if this is a good idea. It seems to work alright, just wondering if there are any bad consequences to this.
> > Ed
> > --
> > Edward Costello
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > 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
> --
> Edward Costello
> ------------------------------------------------------------------------------
> _______________________________________________
> 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
--
Edward Costello