[Cs-dev] Calling csoundCompileOrc in opcodes
Date | 2015-08-17 11:01 |
From | Ed Costello |
Subject | [Cs-dev] Calling csoundCompileOrc in opcodes |
Attachments | None 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
|
Date | 2015-08-17 11:10 |
From | jpff |
Subject | Re: [Cs-dev] Calling csoundCompileOrc in opcodes |
Surely you should be calling csound->CompileOrc ? ------------------------------------------------------------------------------ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2015-08-17 11:18 |
From | Ed Costello |
Subject | Re: [Cs-dev] Calling csoundCompileOrc in opcodes |
Attachments | None 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 ? -- Edward Costello
|
Date | 2015-08-17 11:47 |
From | Victor Lazzarini |
Subject | Re: [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 |
Date | 2015-08-17 12:09 |
From | Ed Costello |
Subject | Re: [Cs-dev] Calling csoundCompileOrc in opcodes |
Attachments | None 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 -- Edward Costello
|
Date | 2015-08-17 12:25 |
From | Victor Lazzarini |
Subject | Re: [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 |
Date | 2015-08-17 12:37 |
From | Ed Costello |
Subject | Re: [Cs-dev] Calling csoundCompileOrc in opcodes |
Attachments | None 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? -- Edward Costello
|