Csound Csound-dev Csound-tekno Search About

[Csnd] Score Sorting Behavior

Date2010-06-17 21:32
FromJacob Joaquin
Subject[Csnd] Score Sorting Behavior
Dear List,

I discovered a behavior with score sorting this morning that seems a
bit odd, and I wanted to run this past the members of the list to see
what you all think. In a nutshell, sorting seems to rearrange the
order of events of instruments of the same number with identical start
times if a higher numbered instrument is placed before them.  For
example:




instr 1
    print p4
endin

instr 2
endin


i 2 0 1
i 1 0 1 1
i 1 0 1 2
i 1 0 1 3
i 1 0 1 4
i 1 0 1 5




produces this score.srt:


w 0 60
i 1 0.000000 0.000000 1.000000 1.000000 2
i 1 0.000000 0.000000 1.000000 1.000000 1
i 1 0.000000 0.000000 1.000000 1.000000 4
i 1 0.000000 0.000000 1.000000 1.000000 3
i 1 0.000000 0.000000 1.000000 1.000000 5
i 2 0.000000 0.000000 1.000000 1.000000


The 4th pfield column in the csd contains ordered numbers 1 through 5,
though if you look at the sorted score, the numbers are now out of
order.  If the line "i 2 0 1" is commented out, or placed below the "i
1" events, then the order of the instrument 1 events stay in order
when score.srt is generated.

I'm running "Csound version 5.12 (float samples) Jun  4 2010" on OS X 10.6.

Best,
Jake

Date2010-06-22 19:04
FromJacob Joaquin
Subject[Csnd] Re: Score Sorting Behavior
I never received a reply, though I continued digging, and think I
discovered a bug with the new sort. I'm hoping to confirm whether it
is or isn't before reporting it to the bug tracker.

I ran the same CSD as before through Csound 5.11, which I believe is
using the older score sort algorithm. It produces this scort.srt,
which i believe to be the correct expected behavoir:

w 0 60
i 1 0.000000 0.000000 1.000000 1.000000 1
i 1 0.000000 0.000000 1.000000 1.000000 2
i 1 0.000000 0.000000 1.000000 1.000000 3
i 1 0.000000 0.000000 1.000000 1.000000 4
i 1 0.000000 0.000000 1.000000 1.000000 5
i 2 0.000000 0.000000 1.000000 1.000000

Is 5.12 incorrectly sorting i-events? If not, what is the discrepancy?

Best,
Jake
--
The Csound Blog - http://csoundblog.com/
Slipmat - http://slipmat.noisepages.com/


P.S.  Here's the original email in case you missed it:


On Thu, Jun 17, 2010 at 1:32 PM, Jacob Joaquin  wrote:
> Dear List,
>
> I discovered a behavior with score sorting this morning that seems a
> bit odd, and I wanted to run this past the members of the list to see
> what you all think. In a nutshell, sorting seems to rearrange the
> order of events of instruments of the same number with identical start
> times if a higher numbered instrument is placed before them.  For
> example:
>
>
> 
> 
> instr 1
>    print p4
> endin
>
> instr 2
> endin
> 
> 
> i 2 0 1
> i 1 0 1 1
> i 1 0 1 2
> i 1 0 1 3
> i 1 0 1 4
> i 1 0 1 5
> 
> 
>
>
> produces this score.srt:
>
>
> w 0 60
> i 1 0.000000 0.000000 1.000000 1.000000 2
> i 1 0.000000 0.000000 1.000000 1.000000 1
> i 1 0.000000 0.000000 1.000000 1.000000 4
> i 1 0.000000 0.000000 1.000000 1.000000 3
> i 1 0.000000 0.000000 1.000000 1.000000 5
> i 2 0.000000 0.000000 1.000000 1.000000
>
>
> The 4th pfield column in the csd contains ordered numbers 1 through 5,
> though if you look at the sorted score, the numbers are now out of
> order.  If the line "i 2 0 1" is commented out, or placed below the "i
> 1" events, then the order of the instrument 1 events stay in order
> when score.srt is generated.
>
> I'm running "Csound version 5.12 (float samples) Jun  4 2010" on OS X 10.6.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"