Csound Csound-dev Csound-tekno Search About

[Csnd] PMAX-question

Date2009-08-21 18:35
FromSchumacher Marlon
Subject[Csnd] PMAX-question
Hello,

I had the pleasure to meet Victor Lazzarini at ICMC'09 in Montreal and  
have been told that there is probably going to be a new csound release  
soon.
So I wanted to take the occasion to ask, whether it would be possible  
(for this new release) to set the PMAX variable to a higher value than  
1000?

Best,
Marlon


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-08-21 19:02
FromMichael Gogins
Subject[Csnd] Re: PMAX-question
What value do you need?

Regards,
Mike

On 8/21/09, Schumacher Marlon  wrote:
> Hello,
>
> I had the pleasure to meet Victor Lazzarini at ICMC'09 in Montreal and
> have been told that there is probably going to be a new csound release
> soon.
> So I wanted to take the occasion to ask, whether it would be possible
> (for this new release) to set the PMAX variable to a higher value than
> 1000?
>
> Best,
> Marlon
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>

Date2009-08-21 19:44
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: PMAX-question
AttachmentsNone  None  

Date2009-08-21 20:05
FromMichael Gogins
Subject[Csnd] Re: Re: Re: PMAX-question
Of course they should be dynamically allocated. All arrays in Csound
(or any other software that takes on varying loads) should be
dynamically allocated.

It would so simple if it was

std::vector p(INITIAL_PMAX);

and then if necessary

p.resize(new_size);

Question: is p in this case per instance of Csound, per instrument
template, or per instrument instance? If it's not per instrument
instance, there is no reason not to make it pretty big.

Regards,
Mike

On 8/21/09, Victor.Lazzarini@nuim.ie  wrote:
> I see PMAX is used in$ grep PMAX */*.hH/csoundCore.h:#define PMAX
> (1000)H/csoundCore.h:    MYFLT   p[PMAX + 1];H/oload.h:        MYFLT
> *sets[PMAX];H/schedule.h:        MYFLT  *args[PMAX+1];InOut/widgets.h://
> MYFLT   *kout, *args[PMAX+1];InOut/widgets.h:    MYFLT   *iwidth, *iheight,
> *ix, *iy, *args[PMAX];InOut/widgets.h:    MYFLT   *itype, *inumx, *inumy,
> *iwidth, *iheight, *ix, *iy, *args[PMAX];InOut/widgets.h:    MYFLT
> *iwidth, *iheight, *ix, *iy, *args[PMAX];I am just wondering if a  large
> value will cause some heap overflow and we shouldreally make these arrays
> dynamically allocated.Victor----- Original Message -----From: Michael Gogins
> Date: Friday, August 21, 2009 3:02 pmSubject:
> [Csnd] Re: PMAX-questionTo: csound@lists.bath.ac.uk> What value do you
> need?> > Regards,> Mike> > On 8/21/09, Schumacher Marlon >
>  wrote:> > Hello,> >> > I had the
> pleasure to meet Victor Lazzarini at ICMC'09 in > Montreal and> > have been
> told that there is probably going to be a new csound > release> soon.> > So
> I wanted to take the occasion to ask, whether it would be > possible> (for
> this new release) to set the PMAX variable to a > higher value than> >
> 1000?> >> > Best,> > Marlon> >> >> > Send bugs reports to this list.> > To
> unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe>
> csound"> >> > > -- > Michael Gogins> Irreducible Productions>
> http://www.michael-gogins.com> Michael dot Gogins at gmail dot com> > > Send
> bugs reports to this list.> To unsubscribe, send email
> sympa@lists.bath.ac.uk with body > "unsubscribe csound"Dr Victor Lazzarini,
> Senior Lecturer, Dept. of Music,National University of Ireland, Maynooth
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-08-21 20:12
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: Re: Re: PMAX-question
AttachmentsNone  None  

Date2009-08-21 20:47
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Re: PMAX-question
Yup.

Next question: is there one score event in memory for each statement
in the .sco file, or for each statement in each section of the .sco
file, or for each statement that currently is driving an instrument
instance?

If it's the last case, we can still make it big, or at least set it at
the start of the run. Otherwise, too risky.

Regards,
Mike

On 8/21/09, Victor.Lazzarini@nuim.ie  wrote:
> I suppose this answers your question: /**   * This struct holds the data for
> one score event.   */  typedef struct event {   ...    MYFLT   p[PMAX + 1];
> } EVTBLK;----- Original Message -----From: Michael Gogins
> Date: Friday, August 21, 2009 4:06 pmSubject:
> [Csnd] Re: Re: Re: PMAX-questionTo: csound@lists.bath.ac.uk> Of course they
> should be dynamically allocated. All arrays in Csound> (or any other
> software that takes on varying loads) should be> dynamically allocated.> >
> It would so simple if it was> > std::vector p(INITIAL_PMAX);> > and
> then if necessary> > p.resize(new_size);> > Question: is p in this case per
> instance of Csound, per instrument> template, or per instrument instance? If
> it's not per instrument> instance, there is no reason not to make it pretty
> big.> > Regards,> Mike> > On 8/21/09, Victor.Lazzarini@nuim.ie >
>  wrote:> > I see PMAX is used in$ grep PMAX
> */*.hH/csoundCore.h:#define PMAX> > (1000)H/csoundCore.h:    MYFLT   p[PMAX
> + 1];H/oload.h:        MYFLT> > *sets[PMAX];H/schedule.h:        MYFLT  >
> *args[PMAX+1];InOut/widgets.h://> MYFLT   *kout, >
> *args[PMAX+1];InOut/widgets.h:    MYFLT   *iwidth, *iheight,> > *ix, *iy,
> *args[PMAX];InOut/widgets.h:    MYFLT   *itype, > *inumx, *inumy,> >
> *iwidth, *iheight, *ix, *iy, *args[PMAX];InOut/widgets.h:    MYFLT> >
> *iwidth, *iheight, *ix, *iy, *args[PMAX];I am just wondering > if a  large>
>> value will cause some heap overflow and we shouldreally make > these
> arrays> > dynamically allocated.Victor----- Original Message -----From: >
> Michael Gogins> > Date: Friday, August 21, 2009 >
> 3:02 pmSubject:> > [Csnd] Re: PMAX-questionTo: csound@lists.bath.ac.uk> What
>> value do you> > need?> > Regards,> Mike> > On 8/21/09, Schumacher Marlon
>>> >  wrote:> > Hello,> >> > > I had the>
>> pleasure to meet Victor Lazzarini at ICMC'09 in > Montreal > and> > have
> been> > told that there is probably going to be a new csound > > release>
> soon.> > So> > I wanted to take the occasion to ask, whether it would be > >
> possible> (for> > this new release) to set the PMAX variable to a > higher
> value > than> >> > 1000?> >> > Best,> > Marlon> >> >> > Send bugs reports to
> this > list.> > To> > unsubscribe, send email sympa@lists.bath.ac.uk with
> body > > "unsubscribe>> csound"> >> > > -- > Michael Gogins> Irreducible >
> Productions>> http://www.michael-gogins.com> Michael dot Gogins > at gmail
> dot com> > > Send> > bugs reports to this list.> To unsubscribe, send email>
>> sympa@lists.bath.ac.uk with body > "unsubscribe csound"Dr > Victor
> Lazzarini,> > Senior Lecturer, Dept. of Music,National University of >
> Ireland, Maynooth> >> > Send bugs reports to this list.> > To unsubscribe,
> send email sympa@lists.bath.ac.uk with body > "unsubscribe> csound"> > > --
>> Michael Gogins> Irreducible Productions> http://www.michael-gogins.com>
> Michael dot Gogins at gmail dot com> > > Send bugs reports to this list.> To
> unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe
> csound"Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,National
> University of Ireland, Maynooth
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-08-22 12:24
FromMark Van Peteghem
Subject[Csnd] Re: Re: Re: Re: PMAX-question
It could also affect the cache. Now it needs about 4 KB (or 8 KB with 
doubles) for every instrument invocation. With level 1 cache being 
typically 32 KB, that makes 8 simultaneous instrument invocations before 
level 1 cache runs out (which would make processing slower). So if PMAX 
is increased, it may slow down CSound.

Dynamic allocation seems best to me, perhaps with INITIAL_PMAX less than 
1000. Most pieces I've seen have no more than 50.

By the way, wasn't this requested for tables? Perhaps making PMAX 
different for tables and instrument invocations would solve the problem, 
for more p-fields in instrument invocations there is no demand, I think.

Mark

Michael Gogins wrote:
> Of course they should be dynamically allocated. All arrays in Csound
> (or any other software that takes on varying loads) should be
> dynamically allocated.
>
> It would so simple if it was
>
> std::vector p(INITIAL_PMAX);
>
> and then if necessary
>
> p.resize(new_size);
>
> Question: is p in this case per instance of Csound, per instrument
> template, or per instrument instance? If it's not per instrument
> instance, there is no reason not to make it pretty big.
>
> Regards,
> Mike
>
> On 8/21/09, Victor.Lazzarini@nuim.ie  wrote:
>   
>> I see PMAX is used in$ grep PMAX */*.hH/csoundCore.h:#define PMAX
>> (1000)H/csoundCore.h:    MYFLT   p[PMAX + 1];H/oload.h:        MYFLT
>> *sets[PMAX];H/schedule.h:        MYFLT  *args[PMAX+1];InOut/widgets.h://
>> MYFLT   *kout, *args[PMAX+1];InOut/widgets.h:    MYFLT   *iwidth, *iheight,
>> *ix, *iy, *args[PMAX];InOut/widgets.h:    MYFLT   *itype, *inumx, *inumy,
>> *iwidth, *iheight, *ix, *iy, *args[PMAX];InOut/widgets.h:    MYFLT
>> *iwidth, *iheight, *ix, *iy, *args[PMAX];I am just wondering if a  large
>> value will cause some heap overflow and we shouldreally make these arrays
>> dynamically allocated.Victor----- Original Message -----From: Michael Gogins
>> Date: Friday, August 21, 2009 3:02 pmSubject:
>> [Csnd] Re: PMAX-questionTo: csound@lists.bath.ac.uk> What value do you
>> need?> > Regards,> Mike> > On 8/21/09, Schumacher Marlon >
>>  wrote:> > Hello,> >> > I had the
>> pleasure to meet Victor Lazzarini at ICMC'09 in > Montreal and> > have been
>> told that there is probably going to be a new csound > release> soon.> > So
>> I wanted to take the occasion to ask, whether it would be > possible> (for
>> this new release) to set the PMAX variable to a > higher value than> >
>> 1000?> >> > Best,> > Marlon> >> >> > Send bugs reports to this list.> > To
>> unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe>
>> csound"> >> > > -- > Michael Gogins> Irreducible Productions>
>> http://www.michael-gogins.com> Michael dot Gogins at gmail dot com> > > Send
>> bugs reports to this list.> To unsubscribe, send email
>> sympa@lists.bath.ac.uk with body > "unsubscribe csound"Dr Victor Lazzarini,
>> Senior Lecturer, Dept. of Music,National University of Ireland, Maynooth
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>     
>
>
>   



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-08-22 12:32
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: PMAX-question
Interesting; is it really only for f tables?  If so there may be a quick
patch while we work out how to do it correctly!

> It could also affect the cache. Now it needs about 4 KB (or 8 KB with
> doubles) for every instrument invocation. With level 1 cache being
> typically 32 KB, that makes 8 simultaneous instrument invocations before
> level 1 cache runs out (which would make processing slower). So if PMAX
> is increased, it may slow down CSound.

>
> By the way, wasn't this requested for tables? Perhaps making PMAX
> different for tables and instrument invocations would solve the problem,
> for more p-fields in instrument invocations there is no demand, I think.
>
> Mark

==John ff



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-08-22 12:43
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: Re: Re: Re: Re: PMAX-question
AttachmentsNone  None  

Date2009-08-22 21:12
Frommarleynoe
Subject[Csnd] Re: Re: Re: Re: Re: Re: PMAX-question
Thank you all very much for considering my question! 

Yes, I was indeed only thinking of f tables... and a value for PMAX of say
100000 or 1000000?

Best,
Marlon


Victor.Lazzarini wrote:
> 
> yes, I think the request was table related----- Original Message
> -----From: jpff@cs.bath.ac.ukDate: Saturday, August 22, 2009 8:32
> amSubject: [Csnd] Re: Re: Re: Re: Re: PMAX-questionTo:
> csound@lists.bath.ac.uk> Interesting; is it really only for f tables?  If
> so there > may be a quick> patch while we work out how to do it
> correctly!> > > It could also affect the cache. Now it needs about 4 KB
> (or 8 > KB with> > doubles) for every instrument invocation. With level 1
> cache being> > typically 32 KB, that makes 8 simultaneous instrument >
> invocations before> > level 1 cache runs out (which would make processing
> slower). > So if PMAX> > is increased, it may slow down CSound.> > >> > By
> the way, wasn't this requested for tables? Perhaps making PMAX> >
> different for tables and instrument invocations would solve > the
> problem,> > for more p-fields in instrument invocations there is no >
> demand, I think.> >> > Mark> > ==John ff> > > > Send bugs reports to this
> list.> To unsubscribe, send email sympa@lists.bath.ac.uk with body >
> "unsubscribe csound"Dr Victor Lazzarini, Senior Lecturer, Dept. of
> Music,National University of Ireland, Maynooth
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 

-- 
View this message in context: http://www.nabble.com/PMAX-question-tp25084247p25097342.html
Sent from the Csound - General mailing list archive at Nabble.com.



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"