Csound Csound-dev Csound-tekno Search About

[Csnd] Time consuming score sort

Date2010-01-22 18:22
FromTobiah
Subject[Csnd] Time consuming score sort
I have a score with 460,000 lines in it.  I'm writing this email
while csound is sorting it into score.srt.  I don't want to wait
through that again, just because the orchestra changes.

I'm in a directory with a dozen or so orchestra and score pairs.
I build everything and mix at the end using a Makefile.   If I use
--keep-sorted-score then it seems that I am bound to the name
score.srt, which would get overwritten as I build other files.

If I had the ability to specify a different output name for the
score.srt, then I could weave the sorted score into the time
dependent Make system.  I thought about moving it out of
the way, then renaming the file just before csound runs, but
then it would always appear newer then the score from which
it was made.

Can someone just say 'boo' to this so I know I'm not a ghost?
I don't seem to be getting any response to my messages, which
is fine, as long as there is not some reason that people can not
see them.

Thanks,

Tobiah

P.S.  Still sorting!


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

Date2010-01-22 18:32
FromRory Walsh
Subject[Csnd] Re: Time consuming score sort
Boo! You're not a ghost. I can't really help with your problem though..

2010/1/22 Tobiah :
> I have a score with 460,000 lines in it.  I'm writing this email
> while csound is sorting it into score.srt.  I don't want to wait
> through that again, just because the orchestra changes.
>
> I'm in a directory with a dozen or so orchestra and score pairs.
> I build everything and mix at the end using a Makefile.   If I use
> --keep-sorted-score then it seems that I am bound to the name
> score.srt, which would get overwritten as I build other files.
>
> If I had the ability to specify a different output name for the
> score.srt, then I could weave the sorted score into the time
> dependent Make system.  I thought about moving it out of
> the way, then renaming the file just before csound runs, but
> then it would always appear newer then the score from which
> it was made.
>
> Can someone just say 'boo' to this so I know I'm not a ghost?
> I don't seem to be getting any response to my messages, which
> is fine, as long as there is not some reason that people can not
> see them.
>
> Thanks,
>
> Tobiah
>
> P.S.  Still sorting!
>
>
> 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"

Date2010-01-22 20:08
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Time consuming score sort
The score sorting uses a simple algorithm, based on the assumption that
the scoe is short.  I will look into using qsort instead of what I
remember as a n^2 sort, but qsort is not at its best in nearly ordered
data....

I would use score.srt and a sript to copy it before rendering, but I am a
commandline peron.

==John ff

> Boo! You're not a ghost. I can't really help with your problem though..
>
> 2010/1/22 Tobiah :
>> I have a score with 460,000 lines in it.  I'm writing this email
>> while csound is sorting it into score.srt.  I don't want to wait
>> through that again, just because the orchestra changes.
>>
>> I'm in a directory with a dozen or so orchestra and score pairs.
>> I build everything and mix at the end using a Makefile.   If I use
>> --keep-sorted-score then it seems that I am bound to the name
>> score.srt, which would get overwritten as I build other files.
>>
>> If I had the ability to specify a different output name for the
>> score.srt, then I could weave the sorted score into the time
>> dependent Make system.  I thought about moving it out of
>> the way, then renaming the file just before csound runs, but
>> then it would always appear newer then the score from which
>> it was made.
>>
>> Can someone just say 'boo' to this so I know I'm not a ghost?
>> I don't seem to be getting any response to my messages, which
>> is fine, as long as there is not some reason that people can not
>> see them.
>>
>> Thanks,
>>
>> Tobiah
>>
>> P.S.  Still sorting!
>>
>>
>> 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"
>
>




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

Date2010-01-23 06:53
Fromforrest cahoon
Subject[Csnd] Re: Re: Re: Time consuming score sort
On Fri, Jan 22, 2010 at 2:08 PM,   wrote:
> The score sorting uses a simple algorithm, based on the assumption that
> the scoe is short.  I will look into using qsort instead of what I
> remember as a n^2 sort, but qsort is not at its best in nearly ordered
> data....

This is an interesting problem ... I did a bit of googling and found
that there are some in-place sorting algorithms with O(n log n)
worst-case performance, yet perform much faster with nearly-sorted
data.  The best description I found of such an algorithm was
Dijkstra's smoothsort algorithm:

http://en.wikipedia.org/wiki/Smoothsort

Although Wikipedia's Heapsort page notes "Due to its complexity,
smoothsort is rarely used" perhaps it is called for here, because the
score data will almost always be nearly sorted.

Forrest


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

Date2010-01-23 15:20
Fromsaturnin@fastmail.fm
Subject[Csnd] Re: Re: Re: Re: Time consuming score sort
Rather than reengineering the sorting, wouldn't it be a lot easier to
implement the original poster's suggestion to allow the specification
of alternate input/output names for the sorted score file?

-Toby

On Sat, Jan 23, 2010 at 1:53 AM, forrest cahoon
 wrote:
> On Fri, Jan 22, 2010 at 2:08 PM,   wrote:
>> The score sorting uses a simple algorithm, based on the assumption that
>> the scoe is short.  I will look into using qsort instead of what I
>> remember as a n^2 sort, but qsort is not at its best in nearly ordered
>> data....
>
> This is an interesting problem ... I did a bit of googling and found
> that there are some in-place sorting algorithms with O(n log n)
> worst-case performance, yet perform much faster with nearly-sorted
> data.  The best description I found of such an algorithm was
> Dijkstra's smoothsort algorithm:
>
> http://en.wikipedia.org/wiki/Smoothsort
>
> Although Wikipedia's Heapsort page notes "Due to its complexity,
> smoothsort is rarely used" perhaps it is called for here, because the
> score data will almost always be nearly sorted.
>
> Forrest
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



-- 
'What are the roots that clutch, what branches grow
Out of this stony rubbish?' - T.S. Eliot


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

Date2010-01-23 15:32
FromStéphane Rollandin
Subject[Csnd] Re: Re: Re: Re: Re: Time consuming score sort
> implement the original poster's suggestion to allow the specification
> of alternate input/output names for the sorted score file?

+1

of course having both would be even better

Stef




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