Re: [PD] sigmund list sort

2012-02-26 Thread Frank Barknecht
On Sat, Feb 25, 2012 at 02:45:38PM -0500, Mathieu Bouchard wrote:
> Le 2012-02-25 à 09:34:00, Frank Barknecht a écrit :
>
>> Yes, exactly. I often use data structures, well, as data structures and 
>> almost never use them for scores in a UPIC sense.
>
> What's UPIC ?

I was referring to the UPIC composition tool by Iannis Xenakis (Unité
Polyagogique Informatique du CEMAMu), that was one of the inspirations for the
graphical score capabilities in data structures.

See http://en.wikipedia.org/wiki/UPIC

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-25 Thread Mathieu Bouchard

Le 2012-02-25 à 09:45:00, Frank Barknecht a écrit :

On Sat, Feb 25, 2012 at 09:38:20AM +0100, Frank Barknecht wrote:

On Fri, Feb 24, 2012 at 01:26:54PM -0500, Mathieu Bouchard wrote:
> I don't know any more recent version of list-abs.
To me the home of [list]-abs is the CVS repository, 

Oops, "SVN" of course. At Sourceforge.


Do you mean RCS, or do you mean SCCS ?

 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-25 Thread Mathieu Bouchard

Le 2012-02-25 à 09:34:00, Frank Barknecht a écrit :

Yes, exactly. I often use data structures, well, as data structures and 
almost never use them for scores in a UPIC sense.


What's UPIC ?

 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-25 Thread Frank Barknecht
On Sat, Feb 25, 2012 at 09:38:20AM +0100, Frank Barknecht wrote:
> Hi,
> 
> On Fri, Feb 24, 2012 at 01:26:54PM -0500, Mathieu Bouchard wrote:
> > I have Pd-extended 42.5 that contains Michał Seta's sort, which used to 
> > be cubic (O(n³)) and with even lower sorting limits, until I made you 
> > replace the O(n²) [list-drip] that used O(n) stack, by one that runs in 
> > O(n) and uses O(log n) stack.
> >
> > I don't know any more recent version of list-abs.
> 
> To me the home of [list]-abs is the CVS repository, 

Oops, "SVN" of course. At Sourceforge.

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-25 Thread Frank Barknecht
Hi,

On Fri, Feb 24, 2012 at 01:26:54PM -0500, Mathieu Bouchard wrote:
> I have Pd-extended 42.5 that contains Michał Seta's sort, which used to 
> be cubic (O(n³)) and with even lower sorting limits, until I made you 
> replace the O(n²) [list-drip] that used O(n) stack, by one that runs in 
> O(n) and uses O(log n) stack.
>
> I don't know any more recent version of list-abs.

To me the home of [list]-abs is the CVS repository, but I'm a bad boy who 
practically never does proper "releases". 

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-25 Thread Frank Barknecht
On Fri, Feb 24, 2012 at 10:40:52AM -0800, Jonathan Wilkes wrote:
> - Original Message -
> > From: Mathieu Bouchard 
> > To: Miller Puckette 
> > Cc: pd-list@iem.at
> > Sent: Friday, February 24, 2012 1:16 PM
> > Subject: Re: [PD] sigmund list sort
> > 
> > Le 2012-02-24 à 09:51:00, Miller Puckette a écrit :
> > 
> >> It's odd, but it never occurred to me that one should be able to 
> > specify
> >> which field(s) to sort on -- it's x, then y.  I should fix this...
> > 
> > Nearly all the music I ever composed used a vertical time axis. Lots of 
> > people 
> > are in this situation, though perhaps not many are also into Pd DS.
> 
> Data structures can be used for more than drawing a score with a vertical 
> time 
> axis.  In Frank's case there aren't even any drawing instructions-- the only 
> reason 
> he's using x is because that's the field the canvas "sort" method uses.

Yes, exactly. I often use data structures,  well, as data structures and
almost never use them for scores in a UPIC sense. 

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread labyrinthuscochlearis
hi,

thank you, i will look at it right away!

all the best,
christian

Am Freitag, den 24.02.2012, 18:46 +0100 schrieb Frank Barknecht:
> Hi,
> 
> attached is an approach using data structures to do the sorting of peaks.
> Somehow I forgot how to set the sort field in a data structure and cannot find
> it in the docs. Wasn't there some way to specify a different field than "x" 
> for
> sorting? (Maybe it was simply "sort " which I didn't try in my 
> quick patch.)
> 
> Ciao
> -- 
> Frank
> 
> On Sat, Feb 18, 2012 at 09:58:50AM -0800, Miller Puckette wrote:
> > I believe there's no good way to do this in pd vanilla.  THere should be
> > a 'list sort' but I haven't figured out what would be the best design.
> > (and there's probably already a list sort in Pd extended :)
> > 
> > cheers
> > Miller
> > On Sat, Feb 18, 2012 at 04:19:58PM +0100, labyrinthuscochlearis wrote:
> > > hi all,
> > > 
> > > what would be a good way to transform sigmund~'s peaks output so that I
> > > get a list with peak amplitudes but in the ascending order of the
> > > corresponding frequencies?
> > > 
> > > thanks,
> > > christian
> > > 
> > > 
> > > ___
> > > Pd-list@iem.at mailing list
> > > UNSUBSCRIBE and account-management -> 
> > > http://lists.puredata.info/listinfo/pd-list
> > 
> > ___
> > Pd-list@iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> 
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Jonathan Wilkes
- Original Message -
> From: Mathieu Bouchard 
> To: Miller Puckette 
> Cc: pd-list@iem.at
> Sent: Friday, February 24, 2012 1:16 PM
> Subject: Re: [PD] sigmund list sort
> 
> Le 2012-02-24 à 09:51:00, Miller Puckette a écrit :
> 
>> It's odd, but it never occurred to me that one should be able to 
> specify
>> which field(s) to sort on -- it's x, then y.  I should fix this...
> 
> Nearly all the music I ever composed used a vertical time axis. Lots of 
> people 
> are in this situation, though perhaps not many are also into Pd DS.

Data structures can be used for more than drawing a score with a vertical time 
axis.  In Frank's case there aren't even any drawing instructions-- the only 
reason 
he's using x is because that's the field the canvas "sort" method uses.
 
-Jonathan

> 
> __
> | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
> 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Jonathan Wilkes


- Original Message -
> From: Mathieu Bouchard 
> To: Frank Barknecht 
> Cc: pd-list@iem.at
> Sent: Friday, February 24, 2012 1:26 PM
> Subject: Re: [PD] sigmund list sort
> 
> Le 2012-02-24 à 09:02:00, Frank Barknecht a écrit :
>> On Sat, Feb 18, 2012 at 01:14:22PM -0500, Mathieu Bouchard wrote:
>>> the [list-sort] abstraction uses a high-constant O(n²) algorithm that
>>> breaks once you try to sort more than 125 values.
>> Actually [list-sort] since quite some time uses the "sort" method 
> borrowed from
>> Pd's data-structures for sorting.
> 
> I have Pd-extended 42.5 that contains Michał Seta's sort, which used to be 
> cubic (O(n³)) and with even lower sorting limits, until I made you replace 
> the 
> O(n²) [list-drip] that used O(n) stack, by one that runs in O(n) and uses 
> O(log 
> n) stack.
> 
> I don't know any more recent version of list-abs.
> 
>> The problem here is not so much the sorting algorithm, which is very fast 
> and can sort way more than 125 items.
> 
> Indeed, it's a slow version of mergesort written using linkedlists in C, 
> which is still faster than nearly anything one could possibly come up with in 
> pure Pd.
> 
>> However copying the list to a data structure and back - this currently 
> indeed has a problem with stack-overflows, as I'm now aware. Have to think 
> about a fix ...

Use an iterative loop instead of a recursive one and you will avoid the stack 
overflows.

> 
> Make sure that your algos take less than O(n) stack space... If it's not a 
> 125 element limit, it's 500 or 1000, and it can't get higher without 
> recompiling Pd to be more indulgent.
> 
> __
> | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
> 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Mathieu Bouchard

Le 2012-02-24 à 09:02:00, Frank Barknecht a écrit :

On Sat, Feb 18, 2012 at 01:14:22PM -0500, Mathieu Bouchard wrote:

the [list-sort] abstraction uses a high-constant O(n²) algorithm that
breaks once you try to sort more than 125 values.

Actually [list-sort] since quite some time uses the "sort" method borrowed from
Pd's data-structures for sorting.


I have Pd-extended 42.5 that contains Michał Seta's sort, which used to be 
cubic (O(n³)) and with even lower sorting limits, until I made you replace 
the O(n²) [list-drip] that used O(n) stack, by one that runs in O(n) and 
uses O(log n) stack.


I don't know any more recent version of list-abs.

The problem here is not so much the sorting algorithm, which is very 
fast and can sort way more than 125 items.


Indeed, it's a slow version of mergesort written using linkedlists in C, 
which is still faster than nearly anything one could possibly come up with 
in pure Pd.


However copying the list to a data structure and back - this currently 
indeed has a problem with stack-overflows, as I'm now aware. Have to 
think about a fix ...


Make sure that your algos take less than O(n) stack space... If it's not a 
125 element limit, it's 500 or 1000, and it can't get higher without 
recompiling Pd to be more indulgent.


 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Mathieu Bouchard

Le 2012-02-24 à 09:51:00, Miller Puckette a écrit :


It's odd, but it never occurred to me that one should be able to specify
which field(s) to sort on -- it's x, then y.  I should fix this...


Nearly all the music I ever composed used a vertical time axis. Lots of 
people are in this situation, though perhaps not many are also into Pd DS.


 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Miller Puckette
It's odd, but it never occurred to me that one should be able to specify
which field(s) to sort on -- it's x, then y.  I should fix this...

cheers
Miller

On Fri, Feb 24, 2012 at 06:46:08PM +0100, Frank Barknecht wrote:
> Hi,
> 
> attached is an approach using data structures to do the sorting of peaks.
> Somehow I forgot how to set the sort field in a data structure and cannot find
> it in the docs. Wasn't there some way to specify a different field than "x" 
> for
> sorting? (Maybe it was simply "sort " which I didn't try in my 
> quick patch.)
> 
> Ciao
> -- 
> Frank
> 
> On Sat, Feb 18, 2012 at 09:58:50AM -0800, Miller Puckette wrote:
> > I believe there's no good way to do this in pd vanilla.  THere should be
> > a 'list sort' but I haven't figured out what would be the best design.
> > (and there's probably already a list sort in Pd extended :)
> > 
> > cheers
> > Miller
> > On Sat, Feb 18, 2012 at 04:19:58PM +0100, labyrinthuscochlearis wrote:
> > > hi all,
> > > 
> > > what would be a good way to transform sigmund~'s peaks output so that I
> > > get a list with peak amplitudes but in the ascending order of the
> > > corresponding frequencies?
> > > 
> > > thanks,
> > > christian
> > > 
> > > 
> > > ___
> > > Pd-list@iem.at mailing list
> > > UNSUBSCRIBE and account-management -> 
> > > http://lists.puredata.info/listinfo/pd-list
> > 
> > ___
> > Pd-list@iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> 
> -- 
>  Frank BarknechtDo You RjDj.me?  _ __footils.org__



> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Frank Barknecht
Hi,

attached is an approach using data structures to do the sorting of peaks.
Somehow I forgot how to set the sort field in a data structure and cannot find
it in the docs. Wasn't there some way to specify a different field than "x" for
sorting? (Maybe it was simply "sort " which I didn't try in my quick 
patch.)

Ciao
-- 
Frank

On Sat, Feb 18, 2012 at 09:58:50AM -0800, Miller Puckette wrote:
> I believe there's no good way to do this in pd vanilla.  THere should be
> a 'list sort' but I haven't figured out what would be the best design.
> (and there's probably already a list sort in Pd extended :)
> 
> cheers
> Miller
> On Sat, Feb 18, 2012 at 04:19:58PM +0100, labyrinthuscochlearis wrote:
> > hi all,
> > 
> > what would be a good way to transform sigmund~'s peaks output so that I
> > get a list with peak amplitudes but in the ascending order of the
> > corresponding frequencies?
> > 
> > thanks,
> > christian
> > 
> > 
> > ___
> > Pd-list@iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> 
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list

-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__


peak-sort.pd
Description: application/puredata


set-peak.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-24 Thread Frank Barknecht
On Sat, Feb 18, 2012 at 01:14:22PM -0500, Mathieu Bouchard wrote:
> Le 2012-02-18 à 09:58:00, Miller Puckette a écrit :
>
>> I believe there's no good way to do this in pd vanilla.  THere should 
>> be a 'list sort' but I haven't figured out what would be the best 
>> design. (and there's probably already a list sort in Pd extended :)
>
> the [list-sort] abstraction uses a high-constant O(n²) algorithm that  
> breaks once you try to sort more than 125 values. 

Actually [list-sort] since quite some time uses the "sort" method borrowed from
Pd's data-structures for sorting. The problem here is not so much the sorting
algorithm, which is very fast and can sort way more than 125 items.

However copying the list to a data structure and back - this currently indeed
has a problem with stack-overflows, as I'm now aware. Have to think about a
fix ...

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-19 Thread labyrinthuscochlearis
Thank you! I really have to get into GridFlow.
All the best, c

Am Samstag, den 18.02.2012, 11:28 -0500 schrieb Mathieu Bouchard:
> Le 2012-02-18 à 16:19:00, labyrinthuscochlearis a écrit :
> 
> > what would be a good way to transform sigmund~'s peaks output so that I 
> > get a list with peak amplitudes but in the ascending order of the 
> > corresponding frequencies?
> 
> GridFlow's [#grade] gives you a list of item numbers in the order that you 
> need to pick them so that they be sorted. This can be used for sorting a 
> table with multiple columns according to one column, whereas other sorting 
> tools in Pd might only support sorting individual values.
> 
>http://gridflow.ca/help/%23grade-help.html
> 
> You will need the appropriate conversion from list to grid (a kind of 
> super-list type) and grid to list. Also, [#store] is a great shortcut for 
> reordering elements using the output of [#grade].
> 
> This uses a plugin that you'd download from http://gridflow.ca/
> 
>   __
> | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-18 Thread Mathieu Bouchard

Le 2012-02-18 à 09:58:00, Miller Puckette a écrit :

I believe there's no good way to do this in pd vanilla.  THere should be 
a 'list sort' but I haven't figured out what would be the best design. 
(and there's probably already a list sort in Pd extended :)


the [list-sort] abstraction uses a high-constant O(n²) algorithm that 
breaks once you try to sort more than 125 values. For [sigmund~]'s output 
this is not very relevant, what's relevant is that it can't deal with more 
than one « column », that is, it can't sort pairs of numbers.


That's why I mention [#grade]. Not only it's using a lean O(n log n) 
algorithm that can work on millions of elements, it also gives you the 
ordering instead of applying the sorting. This means that you can fairly 
easily construct a sorter by any kind of key column, including cases 
computed on the fly (e.g. sort according to dbA computed using both 
amplitude and frequencies, where the dbA is not part of the table).


That kind of modular design is something I borrowed from the APL language.

 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-18 Thread Miller Puckette
I believe there's no good way to do this in pd vanilla.  THere should be
a 'list sort' but I haven't figured out what would be the best design.
(and there's probably already a list sort in Pd extended :)

cheers
Miller
On Sat, Feb 18, 2012 at 04:19:58PM +0100, labyrinthuscochlearis wrote:
> hi all,
> 
> what would be a good way to transform sigmund~'s peaks output so that I
> get a list with peak amplitudes but in the ascending order of the
> corresponding frequencies?
> 
> thanks,
> christian
> 
> 
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] sigmund list sort

2012-02-18 Thread Mathieu Bouchard

Le 2012-02-18 à 16:19:00, labyrinthuscochlearis a écrit :

what would be a good way to transform sigmund~'s peaks output so that I 
get a list with peak amplitudes but in the ascending order of the 
corresponding frequencies?


GridFlow's [#grade] gives you a list of item numbers in the order that you 
need to pick them so that they be sorted. This can be used for sorting a 
table with multiple columns according to one column, whereas other sorting 
tools in Pd might only support sorting individual values.


  http://gridflow.ca/help/%23grade-help.html

You will need the appropriate conversion from list to grid (a kind of 
super-list type) and grid to list. Also, [#store] is a great shortcut for 
reordering elements using the output of [#grade].


This uses a plugin that you'd download from http://gridflow.ca/

 __
| Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] sigmund list sort

2012-02-18 Thread labyrinthuscochlearis
hi all,

what would be a good way to transform sigmund~'s peaks output so that I
get a list with peak amplitudes but in the ascending order of the
corresponding frequencies?

thanks,
christian


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list