Quantcast

[Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

rorywalsh
Is this something that can be done already? Also, the docs state that csoundGetChannelPtr() is not thread safe, I thought Victor addressed this some time ago? 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

Victor Lazzarini
getting the pointer is not threadsafe because it is impossible to tell what you will do with the pointer. The setter/getter functions are threadsafe, though.

There is no channel support for arrays at the moment, but I can't see any impediment to adding it besides getting someone to do it.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Apr 2017, at 20:06, Rory Walsh <[hidden email]> wrote:
>
> Is this something that can be done already? Also, the docs state that csoundGetChannelPtr() is not thread safe, I thought Victor addressed this some time ago?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

rorywalsh
Ah yes, that's it. I might take a look at passing arrays but I think we would need to also pass the size of the array, which would mean either updating the chnget Opcodes or writing a new one. An extra parameter could be passed after the channel name I guess. 

On 8 Apr 2017 8:23 pm, "Victor Lazzarini" <[hidden email]> wrote:
getting the pointer is not threadsafe because it is impossible to tell what you will do with the pointer. The setter/getter functions are threadsafe, though.

There is no channel support for arrays at the moment, but I can't see any impediment to adding it besides getting someone to do it.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Apr 2017, at 20:06, Rory Walsh <[hidden email]> wrote:
>
> Is this something that can be done already? Also, the docs state that csoundGetChannelPtr() is not thread safe, I thought Victor addressed this some time ago?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

Victor Lazzarini
Arrays hold their own size and can be dynamic, so I don't think we need a different set of parameters, just an overload. The channel system that is underlying will
need to be extended too, but I see no roadblocks, since strings are there and essentially arrays might follow them
closely.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 8 Apr 2017, at 21:23, Rory Walsh <[hidden email]> wrote:

Ah yes, that's it. I might take a look at passing arrays but I think we would need to also pass the size of the array, which would mean either updating the chnget Opcodes or writing a new one. An extra parameter could be passed after the channel name I guess. 

On 8 Apr 2017 8:23 pm, "Victor Lazzarini" <[hidden email]> wrote:
getting the pointer is not threadsafe because it is impossible to tell what you will do with the pointer. The setter/getter functions are threadsafe, though.

There is no channel support for arrays at the moment, but I can't see any impediment to adding it besides getting someone to do it.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 8 Apr 2017, at 20:06, Rory Walsh <[hidden email]> wrote:
>
> Is this something that can be done already? Also, the docs state that csoundGetChannelPtr() is not thread safe, I thought Victor addressed this some time ago?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

Steven Yi
I had done some work on this for issue #444
(https://github.com/csound/csound/issues/444) but haven't gotten back
to it. Issue #691 is related
(https://github.com/csound/csound/issues/691). I thinking having
access to Visual Studio now makes this all a bit simpler for me to
develop, but I am not sure when I'll have time to look at it myself.
(If someone has time, feel free to take it over.)  I'd recommend at
this point we work on releasing 6.09 first as I think these API
changes might benefit from a longer period of testing to make sure
they will be stable and also work for CS7 changes.

On Sat, Apr 8, 2017 at 4:33 PM, Victor Lazzarini
<[hidden email]> wrote:

> Arrays hold their own size and can be dynamic, so I don't think we need a
> different set of parameters, just an overload. The channel system that is
> underlying will
> need to be extended too, but I see no roadblocks, since strings are there
> and essentially arrays might follow them
> closely.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 8 Apr 2017, at 21:23, Rory Walsh <[hidden email]> wrote:
>
> Ah yes, that's it. I might take a look at passing arrays but I think we
> would need to also pass the size of the array, which would mean either
> updating the chnget Opcodes or writing a new one. An extra parameter could
> be passed after the channel name I guess.
>
> On 8 Apr 2017 8:23 pm, "Victor Lazzarini" <[hidden email]> wrote:
>>
>> getting the pointer is not threadsafe because it is impossible to tell
>> what you will do with the pointer. The setter/getter functions are
>> threadsafe, though.
>>
>> There is no channel support for arrays at the moment, but I can't see any
>> impediment to adding it besides getting someone to do it.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> > On 8 Apr 2017, at 20:06, Rory Walsh <[hidden email]> wrote:
>> >
>> > Is this something that can be done already? Also, the docs state that
>> > csoundGetChannelPtr() is not thread safe, I thought Victor addressed this
>> > some time ago?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] passing arrays from host to Csound with csoundSetChannelPtr()

rorywalsh
Agreed. 

On 10 Apr 2017 03:03, "Steven Yi" <[hidden email]> wrote:
I had done some work on this for issue #444
(https://github.com/csound/csound/issues/444) but haven't gotten back
to it. Issue #691 is related
(https://github.com/csound/csound/issues/691). I thinking having
access to Visual Studio now makes this all a bit simpler for me to
develop, but I am not sure when I'll have time to look at it myself.
(If someone has time, feel free to take it over.)  I'd recommend at
this point we work on releasing 6.09 first as I think these API
changes might benefit from a longer period of testing to make sure
they will be stable and also work for CS7 changes.

On Sat, Apr 8, 2017 at 4:33 PM, Victor Lazzarini
<[hidden email]> wrote:
> Arrays hold their own size and can be dynamic, so I don't think we need a
> different set of parameters, just an overload. The channel system that is
> underlying will
> need to be extended too, but I see no roadblocks, since strings are there
> and essentially arrays might follow them
> closely.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 8 Apr 2017, at 21:23, Rory Walsh <[hidden email]> wrote:
>
> Ah yes, that's it. I might take a look at passing arrays but I think we
> would need to also pass the size of the array, which would mean either
> updating the chnget Opcodes or writing a new one. An extra parameter could
> be passed after the channel name I guess.
>
> On 8 Apr 2017 8:23 pm, "Victor Lazzarini" <[hidden email]> wrote:
>>
>> getting the pointer is not threadsafe because it is impossible to tell
>> what you will do with the pointer. The setter/getter functions are
>> threadsafe, though.
>>
>> There is no channel support for arrays at the moment, but I can't see any
>> impediment to adding it besides getting someone to do it.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> > On 8 Apr 2017, at 20:06, Rory Walsh <[hidden email]> wrote:
>> >
>> > Is this something that can be done already? Also, the docs state that
>> > csoundGetChannelPtr() is not thread safe, I thought Victor addressed this
>> > some time ago?
Loading...