Csound Csound-dev Csound-tekno Search About

RE: [Cs-dev] Csound5 CVS changes

Date2005-02-10 14:45
From"gogins@pipeline.com"
SubjectRE: [Cs-dev] Csound5 CVS changes
Istvan, are the configuration variables specific to a single instance of
Csound, or are they global across instances? 

For this use they MUST be specific to a single instance.

Obviously this doesn't mean anything NOW, and equally obviously the OPARMS
instance is currently global -- but I am assuming that OPARMS will become
specific to a single instance in the future.

We should all be trying to work towards a situation where Csound can be
instantiated multiple times within a single process, and run several
performances in parallel. The main use for this will be in host
applications, such as sequencers that would like to assign one instance of
Csound to each of several tracks. Another use would be hierarchical
performances, where one instance of Csound runs other instances of Csound
as "children".

Before you became a canonical Csound developer, I had suggested to John
ffitch that the best way to do this is for the current ENVIRON structure to
become a proper C++ Csound class, all the current variables used in Csound
performances would become member variables, and all the current Csound
functions called during a performance would become member functions. If
this is done, then most of the changes required to get this to work, aside
from changing the ENVIRON struct into a class and adding members, would be
prepend Csound:: to all the current Csound functions, e.g. kperf would
become Csound::kperf.

Original Message:
-----------------
From: Istvan Varga istvan@csounds.com
Date: Thu, 10 Feb 2005 15:05:42 +0100
To: csound-devel@lists.sourceforge.net
Subject: [Cs-dev] Csound5 CVS changes


2005-02-10      Istvan Varga    
         * InOut/rtjack:
           Implemented JACK real time audio plugin (experimental).
         * InOut/libsnd.c:
           Do not call audrecv() after opening sound input in sfopenin().
         * Engine/musmon.c:
           Print correct maxamp info in cleanup(), even if performance is
           terminated (e.g. by ^C) rather than finished normally.
         * SConstruct:
           Added new options noDebug (do not add -g and -gstabs to CCFLAGS),
           gcc3opt (add optimisation flags for gcc 3.3.x and later), and
           useGprof (compile and link with -pg). All are disabled by
default.
           Changes to allow compilng JACK plugin.
         * Top/main.c:
           Terminate (call longjmp()) if initialisation of modules has
           failed for some reason.
         * Top/csound.c:
           playopen_dummy() and recopen_dummy() now fail if --sched is used,
           to avoid locking up the machine.
           Expanded tabs to spaces.
         * Engine/oload.c:
         * H/csoundCore.h:
         * InOut/libsnd.c:
         * Top/argdecode.c:
         * Top/csound.c:
           Use csoundGlobalVariable and csoundConfigurationVariable system
           for new sound file ID tag options added by Michael Gogins, rather
           than changing OPARMS, oload.c, argdecode.c, etc.
           The options are now:
             -+id_title
             -+id_copyright
             -+id_software
             -+id_artist
             -+id_comment
             -+id_date
           argdecode.c: expanded tabs to spaces


-------------------------------------------------------
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

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .




-------------------------------------------------------
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_ide95&alloc_id396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-10 14:54
FromIstvan Varga
SubjectRe: [Cs-dev] Csound5 CVS changes
gogins@pipeline.com wrote:

> Istvan, are the configuration variables specific to a single instance of
> Csound, or are they global across instances? 

Both types of use are supported by the system, however, this time
I used variables specific to a single instance. In fact, currently there
are only instance specific configuration variables in Csound5.

> For this use they MUST be specific to a single instance.

That's good news as I did exactly that.

> We should all be trying to work towards a situation where Csound can be
> instantiated multiple times within a single process, and run several
> performances in parallel.
 > [...]

I understand that, and made changes with multiple instances in mind.
It should be obvious if you look at the code (notice the presence
of 'csound' pointers):

static  const   char    *id_option_table[][3] = {
       { "::SF::id_title", "id_title",
         "Title tag in output soundfile (no spaces)" },
       { "::SF::id_copyright", "id_copyright",
         "Copyright tag in output soundfile (no spaces)" },
       { "::SF::id_software", "id_software",
         "Software tag in output soundfile (no spaces)" },
       { "::SF::id_artist", "id_artist",
         "Artist tag in output soundfile (no spaces)" },
       { "::SF::id_comment", "id_comment",
         "Comment tag in output soundfile (no spaces)" },
       { "::SF::id_date", "id_date",
         "Date tag in output soundfile (no spaces)" },
       { NULL, NULL, NULL }
   };

[...]

   /* sound file tag options */
   max_len = 201;
   i = -1;
   while (id_option_table[++i][0] != NULL) {
     csoundCreateGlobalVariable(csound, id_option_table[i][0],
                                        (size_t) max_len);
     csoundCreateConfigurationVariable(
                   csound, id_option_table[i][1],
                   csoundQueryGlobalVariable(csound, id_option_table[i][0]),
                   CSOUNDCFG_STRING, 0, NULL, &max_len,
                   id_option_table[i][2], NULL);
   }


-------------------------------------------------------
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