Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] pvsdemix in MacCsound (and other plugins)

Date2005-03-27 21:56
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvsdemix in MacCsound (and other plugins)
But plugins use auxalloc(), which afaict is not in the
API proper. Also ftfind() and ftnp2find() are not there.
These are actual opcode API functions, in my view.

Victor

> 
> Csound5's API has much more in it than Csound4's.  As 
Matt
> pointed out, no opcode lib should use anything but the
> API.  CS5 has functions for allocating memory and most
> anything that an opcode would need, and if it doesn't,
> adding new API functions should be discussed and
> considered for addition.
> 
> steven
> 
> 
> On Sun, 27 Mar 2005 21:21:42 +0100, Victor Lazzarini
>  wrote:
> > I think we probably need to define then an opcode
> > development API, granting access to memory 
management
> > stuff, as well as function table access and possibly
> > a few things more.
> > 
> > Victor
> > 
> > 
> > > none.  thats what the API is for!
> > >
> > > On Mar 27, 2005, at 10:25 AM, Anthony Kozar wrote:
> > >
> > > > Which symbols does/should Csound 4 export?  It is
> > > > clearly necessary to export more than just the API
> > > > calls.  (On MacOS 9, to make life easy, I export
> > > > almost every non-static global in Csound -- bad, I
> > > >  know, but it was expedient and I never have linking
> > issues). >
> > >
> > >
> > >
> > >
> ------------------------------------------------------- SF
> > > email is sponsored by - The IT Product Guide Read
> > > honest & candid reviews on hundreds of IT Products
> > > from real users. Discover which products truly live up
> > > to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op= 
click
> > > 
_______________________________________________
> > > Csound-devel mailing list
> > > Csound-devel@lists.sourceforge.net
> > >
> >
> >
> https://lists.sourceforge.net/lists/listinfo/csound-devel 
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide Read
> honest & candid reviews on hundreds of IT Products from
> > real users. Discover which products truly live up to the
> > hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=
click
> > 
_______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products
> from real users. Discover which products truly live up to
> the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=
click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-27 21:59
FromSteven Yi
SubjectRe: [Cs-dev] pvsdemix in MacCsound (and other plugins)
Plugins can probably use these functions for those operations:

/**
   * Returns the length of a function table, or -1 if the table does
   * not exist.
   */
  PUBLIC int csoundTableLength(void *csound, int table);

  /**
   * Returns the value of a slot in a function table.
   */
  PUBLIC MYFLT csoundTableGet(void *csound, int table, int index);

  /**
   * Sets the value of a slot in a function table.
   */
  PUBLIC void csoundTableSet(void *csound, int table, int index, MYFLT value);

/**
   * Allocate nbytes bytes of memory that can be accessed later by calling
   * csoundQueryGlobalVariable() with the specified name; the space is
   * cleared to zero.
   * Returns CSOUND_SUCCESS on success, CSOUND_ERROR in case of invalid
   * parameters (zero nbytes, invalid or already used name), or
   * CSOUND_MEMORY if there is not enough memory.
   */
  PUBLIC int csoundCreateGlobalVariable(void *csound, const char *name,
                                        size_t nbytes);

  /**
   * Get pointer to space allocated with the name "name".
   * Returns NULL if the specified name is not defined.
   */
  PUBLIC void *csoundQueryGlobalVariable(void *csound, const char *name);

  /**
   * This function is the same as csoundQueryGlobalVariable(), except the
   * variable is assumed to exist and no error checking is done.
   * Faster, but may crash or return an invalid pointer if 'name' is
   * not defined.
   */
  PUBLIC void *csoundQueryGlobalVariableNoCheck(void *csound, const char *name);

  /**
   * Free memory allocated for "name" and remove "name" from the database.
   * Return value is CSOUND_SUCCESS on success, or CSOUND_ERROR if the name is
   * not defined.
   */
  PUBLIC int csoundDestroyGlobalVariable(void *csound, const char *name);



On Sun, 27 Mar 2005 21:56:17 +0100, Victor Lazzarini
 wrote:
> But plugins use auxalloc(), which afaict is not in the
> API proper. Also ftfind() and ftnp2find() are not there.
> These are actual opcode API functions, in my view.
> 
> Victor
> 
> >
> > Csound5's API has much more in it than Csound4's.  As
> Matt
> > pointed out, no opcode lib should use anything but the
> > API.  CS5 has functions for allocating memory and most
> > anything that an opcode would need, and if it doesn't,
> > adding new API functions should be discussed and
> > considered for addition.
> >
> > steven
> >
> >
> > On Sun, 27 Mar 2005 21:21:42 +0100, Victor Lazzarini
> >  wrote:
> > > I think we probably need to define then an opcode
> > > development API, granting access to memory
> management
> > > stuff, as well as function table access and possibly
> > > a few things more.
> > >
> > > Victor
> > >
> > >
> > > > none.  thats what the API is for!
> > > >
> > > > On Mar 27, 2005, at 10:25 AM, Anthony Kozar wrote:
> > > >
> > > > > Which symbols does/should Csound 4 export?  It is
> > > > > clearly necessary to export more than just the API
> > > > > calls.  (On MacOS 9, to make life easy, I export
> > > > > almost every non-static global in Csound -- bad, I
> > > > >  know, but it was expedient and I never have linking
> > > issues). >
> > > >
> > > >
> > > >
> > > >
> > ------------------------------------------------------- SF
> > > > email is sponsored by - The IT Product Guide Read
> > > > honest & candid reviews on hundreds of IT Products
> > > > from real users. Discover which products truly live up
> > > > to the hype. Start reading now.
> > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=
> click
> > > >
> _______________________________________________
> > > > Csound-devel mailing list
> > > > Csound-devel@lists.sourceforge.net
> > > >
> > >
> > >
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> > > -------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide Read
> > honest & candid reviews on hundreds of IT Products from
> > > real users. Discover which products truly live up to the
> > > hype. Start reading now.
> > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=
> click
> > >
> _______________________________________________
> > > Csound-devel mailing list
> > > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> > >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products
> > from real users. Discover which products truly live up to
> > the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=
> click
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-27 22:14
FromIstvan Varga
SubjectRe: [Cs-dev] pvsdemix in MacCsound (and other plugins)
These still not include auxalloc which is frequently used for things
like delay lines etc. The csound5 API does include auxalloc (actually,
with the name auxalloc_, but I assume these ugly underscored names
are only for compatibility with the - even uglier - macros, and thus
may eventually be replaced).
It is interesting that the table functions do not include one that
returns a MYFLT* pointer to the table data.

Steven Yi wrote:

> Plugins can probably use these functions for those operations:
> 
> /**
>    * Returns the length of a function table, or -1 if the table does
>    * not exist.
>    */
>   PUBLIC int csoundTableLength(void *csound, int table);
> 
>   /**
>    * Returns the value of a slot in a function table.
>    */
>   PUBLIC MYFLT csoundTableGet(void *csound, int table, int index);
> 
>   /**
>    * Sets the value of a slot in a function table.
>    */
>   PUBLIC void csoundTableSet(void *csound, int table, int index, MYFLT value);
> 
> /**
>    * Allocate nbytes bytes of memory that can be accessed later by calling
>    * csoundQueryGlobalVariable() with the specified name; the space is
>    * cleared to zero.
>    * Returns CSOUND_SUCCESS on success, CSOUND_ERROR in case of invalid
>    * parameters (zero nbytes, invalid or already used name), or
>    * CSOUND_MEMORY if there is not enough memory.
>    */
>   PUBLIC int csoundCreateGlobalVariable(void *csound, const char *name,
>                                         size_t nbytes);
> 
>   /**
>    * Get pointer to space allocated with the name "name".
>    * Returns NULL if the specified name is not defined.
>    */
>   PUBLIC void *csoundQueryGlobalVariable(void *csound, const char *name);
> 
>   /**
>    * This function is the same as csoundQueryGlobalVariable(), except the
>    * variable is assumed to exist and no error checking is done.
>    * Faster, but may crash or return an invalid pointer if 'name' is
>    * not defined.
>    */
>   PUBLIC void *csoundQueryGlobalVariableNoCheck(void *csound, const char *name);
> 
>   /**
>    * Free memory allocated for "name" and remove "name" from the database.
>    * Return value is CSOUND_SUCCESS on success, or CSOUND_ERROR if the name is
>    * not defined.
>    */
>   PUBLIC int csoundDestroyGlobalVariable(void *csound, const char *name);


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net