Re: [Csnd-dev] New API progress report

Francois PINOT <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <CAKXOhL=kUKtx_VFQaQASJBzct+XBnn_CoFT2ekEnA8fjh88=5A@mail.gmail.com>
There are different ways to interface Python with c libraries:
- the hard way, using the Python C-API
- FFI, using ctypes,
- Cython, there's a project recently discussed on the list for this
- SWIG, the way you did it before.

I used the ct prefix to highlight the fact that it was based on ctypes,
which gives us a pure python unit without any need for extra tools. Well,
there's still the numpy dependency, to give easy access to the huge set of
scientific computing libraries around Python.

And in a way, I like the association with the city: Csound in the city, vs
Csound on the beach, vs Csound in the countryside, etc ;) (just kidding)

François


Le ven. 26 juil. 2024 à 12:06, vlz <[email protected]> a écrit :

> yes, I think it is a good idea on both counts.
>
> Also I am wondering whether we should call it csound.py instead of
> ctcsound.py? Would it make more sense since it's wrapping csound.h?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> On 26 Jul 2024, at 10:50, Francois PINOT <[email protected]> wrote:
>
> 
> I realized that when I wrote ctcsound.py I used camelCase to name the
> functions. The norm in Python is to use underscore to separate the
> components of a function name: for example, csound_create instead of
> csoundCreate. Do you think it's worth it to do so writing the new python
> wrapper for the API?  This way, we would follow the Python rules and it
> could be an easy way to differentiate the new API wrapper from the old one.
>
> François
>
> Le ven. 26 juil. 2024 à 11:31, Francois PINOT <[email protected]> a
> écrit :
>
>> I just built Csound from the feature/newapi branch. I'm using it  to sync
>> the Python wrapper. I'll let you know when it's ready.
>>
>> François
>>
>> Le jeu. 25 juil. 2024 à 17:27, Victor Lazzarini <
>> [email protected]> a écrit :
>>
>>>
>>> Just another progress report for the feature/newapi branch
>>>
>>> - I have now mainlined the new API in csound.h
>>> - Updated the csound.hpp wrapper
>>> - Updated the csPerformanceThread code
>>> - Modified frontends to use it
>>> - Modified the C++ test suite
>>>
>>> It is all working, I guess frontend developers can take a look and see
>>> what they
>>> think.
>>>
>>> François: could you take a look at the Python wrapper? It is out of sync
>>> now.
>>>
>>> Victor
>>>
>>>
>>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.