[Cs-dev] Channel API
Date | 2013-04-16 06:19 |
From | Andres Cabrera |
Subject | [Cs-dev] Channel API |
Hi, I've finished most of the work required for the channel API. I think I'll add a few more things, but it's now ready for testing, so please do. The way it works now is that all buc/channel opcodes like chani, chnget, and invalue/outvalue share the same set of channels. The also interact through the API with a single set of functions. You can define channels within the csd using chn_X opcodes, or they will be automatically defined when calling any of the API channel functions. (Note that you can also use channels internally in the csd without exposing them to the API). I've also updated the API docs: http://csound.sourceforge.net/doc/html/index.html Cheers, Andrés ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cs |
Date | 2013-04-16 13:34 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Great Andres. I see this also includes the updated controlChannelHints structure. I'd be interested in switching to Csound6 for my latest API development, do you think it's safe enough to do so now? Any pointers on what to watch out for or should things just work as they always did? On 16 April 2013 06:19, Andres Cabrera |
Date | 2013-04-16 13:44 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
I was just wondering if controlChannelHints_s and controlChannelInfo couldn't be consolidated into one single structure? Couldn't all the members of the hint structure just be members of the Info struct? ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-04-16 16:03 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Channel API |
Hi, The issue is that the hints are also used in the internal channel database struct, so keeping the hints separate is an easy way to unify. It's also practical to have the hints as a separate struct to pass it to the csoundSetChannelHints struct. Cheers, Andrés On Tue, Apr 16, 2013 at 5:44 AM, Rory Walsh |
Date | 2013-04-16 16:09 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
That's sound. On 16 April 2013 16:03, Andres Cabrera |
Date | 2013-04-19 02:15 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
OK Rory. The channel hints mechanism is ready with a string attribute that can be set using the chn_k opcode: If you put those in the header (instr 0), you need only call csoundCompile or csoundStart and the channel list will be populated with the channels and the attributes. You can then query them using GetChannelList and GetControlChannelHints, to build a GUI before actually starting performance.chn_k "chan2", 3, 2, 0.5, 0, 1, 10, 10, 50, 100, "testattr" Andrés On Tue, Apr 16, 2013 at 8:09 AM, Rory Walsh <rorywalsh@ear.ie> wrote: That's sound. |
Date | 2013-04-19 16:18 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
Thanks Andres, I'll probably start using Csound6 in a few weeks and phase out support for Csound5. If we had a final extra (perhaps optional) argument specifying the type of GUI controls, that might be nice? Then we wouldn't really need to bother with string attributes at all? Frontends would have all the info they needed? I'd favour a string argument here in order to make one's code readable. We could push the attributes string back one it reads like: Or perhaps you're thinking along the lines of simply passing the type of widgets to the string attributes? Of course that would work fine too:chn_k "chan2", 3, 2, 0.5, 0, 1, 10, 10, 50, 100, "slider", "colour(1, 0, 0)" chn_k "chan2", 3, 2, 0.5, 0, 1, 10, 10, 50, 100, "slider awesomeness(1, 1, 1)" On 19 April 2013 02:15, Andres Cabrera <mantaraya36@gmail.com> wrote:
|
Date | 2013-04-19 23:57 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
Hi Rory, The string argument is precisely what is available. It's a single string argument, so maybe we can define a syntax like:Andrés On Fri, Apr 19, 2013 at 8:18 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2013-04-20 00:47 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
sounds good. sent from a mobile device... On 19 Apr 2013 23:58, "Andres Cabrera" <mantaraya36@gmail.com> wrote:
|
Date | 2013-04-21 20:57 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
Sorry, my last post was a little brief, I was travelling at the time. Anyway, this sounds good. I'm going to set up Csound6 this week as my main Csound version and go from there. Thanks again for all your work on this. I'll keep you posted if there are any issues. On 20 April 2013 00:47, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2013-04-23 00:11 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
I think it would be good to standardize some of the text in the attribute string. I think the Cabagge format is good for that, so maybe you can make a summary (maybe on the Csound wiki) that we can all then try to adhere to. Cheers,Andrés On Sun, Apr 21, 2013 at 12:57 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2013-04-23 11:55 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Attachments | WidgetIdentifiers.rtf None None |
Here's a list of basic attributes used in Cabbage. I took out some of the more Cabbage specific ones as it's probably best to make this list as standard as possible? On 23 April 2013 00:11, Andres Cabrera <mantaraya36@gmail.com> wrote:
|
Date | 2013-04-23 17:44 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
Hi Rory, Thanks, this looks great.Cheers, Andrés On Tue, Apr 23, 2013 at 3:55 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2013-04-23 18:21 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Channel API |
Attachments | None None |
Oh yeah, I forgot about those one! They could just be taken out from that list or? Do you think it makes more sense to have them as part of the string? On one hand it would make the code slightly easier to read, but on the other hand it would mean string manipulation if you wanted to do some auto-sizing/positioning? On 23 April 2013 17:44, Andres Cabrera <mantaraya36@gmail.com> wrote:
|