[Cs-dev] Build custom opcode
Date | 2014-02-21 12:20 |
From | Oeyvind Brandtsegg |
Subject | [Cs-dev] Build custom opcode |
How do I add my own opcode to the makefile now? I used to know how to do it with the old Scons, but haven't tried it with cmake yet. I figure there is something I should do in cmake-gui perhaps? Assume I have the c file in /Opcodes -- Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://flyndresang.no/ http://www.partikkelaudio.com/ http://soundcloud.com/brandtsegg http://soundcloud.com/t-emp ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-02-21 13:36 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Build custom opcode |
Attachments | None None |
There is a CMakeLists.txt in the Opcodes directory. That is where you would add it. But if it is a plugin, you don't need a build system at all, a batch file will do, or a simple SCons build system using the Csound library to link with. Hope this helps, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Fri, Feb 21, 2014 at 7:20 AM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: How do I add my own opcode to the makefile now? |
Date | 2014-02-21 13:41 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Build custom opcode |
Note that a plugin does not need to link with anything (unless it has dependencies of its own). So gcc -shared myfile.c -o myplug. |
Date | 2014-02-24 09:20 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] Build custom opcode |
Excellent, thanks. Now, can I find any guidelines as to what is different when writing opcodes for csound6, compared to writing for csound5? I've poked around a bit and can guess some things, but I would feel more confident with some kind of instructions. all best Oeyvind 2014-02-21 14:41 GMT+01:00 Victor Lazzarini |
Date | 2014-02-24 10:21 |
From | jpff |
Subject | Re: [Cs-dev] Build custom opcode |
The information was in the release notes for 6.00 An extract.... The template for arate perf-pass opcodes is: int perf_myopcode(CSOUND *csound, MYOPCODE *p) { uint32_t offset = p->h.insdshead->ksmps_offset; uint32_t early = p->h.insdshead->ksmps_no_end; uint32_t nsmps = CS_KSMPS; ... if (UNLIKELY(offset)) memset(p->res, '\0', offset*sizeof(MYFLT)); if (UNLIKELY(early)) { nsmps -= early; memset(&p->res[nsmps], '\0', early*sizeof(MYFLT)); } for (n=offset; n |
Date | 2014-02-24 15:30 |
From | Steven Yi |
Subject | Re: [Cs-dev] Build custom opcode |
Just brainstorming, we had discussed a little bit about updating the plugin SDK. This made me think of a couple of things that might be nice for the SDK: * by default, install into the same default locations for OPCODE6DIR64 as the main build does * have test CSD's that are pre-configured to run the plugin from the build dir with --sample-accurate, without it, maybe other configurations On Mon, Feb 24, 2014 at 5:21 AM, jpff |