Re: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] New API - updates
Steven Yi <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <CANtcCs5m+oQ+BDP=YKBhQFOhssdJP_5gosJEDWin4rrWFhH_bQ@mail.gmail.com> |
FYI: I paired up with Hlodver today and we went through and updated the newapi branch for WASM. Unit tests passed and I tested with my live.csound.com site and it's working for me there for live coding. (We did some examining of the build and are going to continue to look at modernizing the wasm and browser code.) Regarding the build artifacts, I think we'll need a PR opened up for the branch before any workflows will run. On Fri, Aug 9, 2024 at 1:43 PM Rory Walsh <[email protected]> wrote: > > Hi Blake. If you go to the github page you can find binaries under the Actions tabs. Just scroll down until you find a successful *csound_builds* workflow. Click into it and you'll find binaries for a variety of different platforms. > > On Fri, 9 Aug 2024 at 16:19, Blake Mitchell <[email protected]> wrote: >> >> I'm having trouble building Csound at the moment. Is there any way for someone that has the builds working or an automated system to provide DLLs for: (1) 64-bit Windows, (2) 64-bit Ubuntu, (3) Apple silicon macOS, (4) Raspberry Pi 4? >> >> Would it be helpful to have a Docker process(es), if there aren't already, build an export of the DLLs? Maybe I could help with that upon guidance (not on Docker but on Csound build processes)? >> >> >> On Fri, Aug 9, 2024 at 7:44 AM Victor Lazzarini <[email protected]> wrote: >>> >>> Here’s a couple of examples showing how to access array channels >>> >>> 1) Directly using a channel data pointer >>> >>> CSOUND *csound; >>> ARRAYDAT *adat; >>> int n; >>> >>> const char *code = R"ORC( >>> instr 1 >>> kArr[] fillarray 1,2,3,4 >>> chnset kArr, "test" >>> kArr2[] chnget "test" >>> printk2 kArr2[3] >>> endin >>> )ORC"; >>> >>> csound = csoundCreate(NULL, NULL); >>> csoundSetOption(csound,"-n"); >>> csoundCompileOrc(csound, code, 0); >>> csoundEventString(csound, "i1 0 1", 0); >>> csoundStart(csound); >>> csoundPerformKsmps(csound); >>> >>> // access channel directly >>> csoundGetChannelPtr(csound, (void **) &adat, "test", CSOUND_ARRAY_CHANNEL >>> | CSOUND_INPUT_CHANNEL); >>> >>> for(n = 0; n < adat->sizes[0]; n++) >>> printf("[%d]: %f \n", n, adat->data[n]); >>> >>> csoundDestroy(csound); >>> >>> >>> 2) Using an externally allocated array data, copying from channel (same orc code as above) >>> >>> // 1-D array size >>> sizes[0] = 4; >>> // create array data >>> adat = csoundCreateArrayData(csound, 'k', 1, sizes); >>> >>> csoundStart(csound); >>> csoundPerformKsmps(csound); >>> >>> // copy data from array channel >>> csoundGetArrayChannel(csound, "test", adat); >>> >>> for(n = 0; n < adat->sizes[0]; n++) >>> printf("[%d]: %f \n", n, adat->data[n]); >>> >>> // dispose of array data >>> csoundDeleteArrayData(csound, adat) >>> >>> >>> ======================== >>> Prof. Victor Lazzarini >>> Maynooth University >>> Ireland >>> >>> > On 8 Aug 2024, at 14:52, Victor Lazzarini <[email protected]> wrote: >>> > >>> > Great. I have not tested it myself but will post a simple example soon. >>> > >>> > >>> > Prof. Victor Lazzarini >>> > Maynooth University >>> > Ireland >>> > >>> >> On 8 Aug 2024, at 13:48, Pierre Clisson <[email protected]> wrote: >>> >> >>> >> Thank you Victor and François for implenting the array type for channels. Just what I needed :) Will test this as soon as I get a chance >>> >> >>> >> Pierre. >>> >> >>> >> Francois PINOT wrote on 08/08/2024 14:04: >>> >>> Just committed these updates for ctcsound.py. >>> >>> >>> >>> François >>> >>> >>> >>> Le mer. 7 août 2024 à 18:31, Victor Lazzarini <[email protected]> a écrit : >>> >>> Just a few updates on the new API branch (feature/newapi) >>> >>> >>> >>> - Implemented array type for channels >>> >>> - overhauled the PVS channels >>> >>> - added the relevant API functions >>> >>> - protected spout by making the csoundGetSpout function return const MYFLT * >>> >>> >>> >>> I think I am pretty much done with the API revision. >>> >>> ======================== >>> >>> Prof. Victor Lazzarini >>> >>> Maynooth University >>> >>> Ireland >>> >> >>>