hello,
thanks for your code, I did not try the external.
in attachment, an other version : it need few externals and have no weight, but it's faster and is not limited to 5 points.
Cyrille
Le 24/12/2016 à 17:07, Charles Z Henry a écrit :
An audio rate weighted median filter is possible to do with fexpr~ but cumbersome and cpu-hungry. I've attached some previous work for your reference: an abstraction wmed5~.pd and test patch, and an external (from 2006) which needs to be fixed. You'll see the external I wrote has int and float types everywhere (fine for 32-bit but it needs to be updated). There's no guarantee the external will work as it is now, but I'll help with updating if you want to use it or part of it
Chuck
On Fri, Dec 23, 2016 at 4:52 PM, cyrille henry ch@chnry.net wrote:
thanks, sort is indeed lost faster than an abstraction. but still to slow for an audio rate median filter. I guess it's worth writing an external for this task (that would benefit from the fact that most input list are identical)
cheers c
Le 23/12/2016 à 23:31, Christof Ressi a écrit :
Hmmm. If doesn't have to be a vanilla solution, I would use zexy/sort and then get the middle element. It won't get much faster then that i guess.
Gesendet: Freitag, 23. Dezember 2016 um 23:17 Uhr Von: "cyrille henry" ch@chnry.net An: pd-list@lists.iem.at Betreff: Re: [PD] array quantile problem
Hhanks for the explanation.
I think the "so for instance, the 0.5 quantile is the median of the array." sentence of the documentation is confusion.
anyway, is there a fast way to get the median of a list? (faster than ordering the list with an abstraction and getting the middle value)
thanks Cyrille
Le 23/12/2016 à 22:58, Christof Ressi a écrit :
The array doesn't represent a list of values but rather a distribution of values where each y represents the weight of its x value. Changing your list to 1 2 3 4 5 6 7 8 9 will make it more clear to understand because the actual values are then: 0 1 1 2 2 2 3 3 3 3 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8. Therefore 6 is the correct median.
Christof
Gesendet: Freitag, 23. Dezember 2016 um 21:55 Uhr Von: "cyrille henry" ch@chnry.net An: "pd-list@lists.iem.at" pd-list@lists.iem.at Betreff: [PD] array quantile problem
Hello,
I'm trying to use the [array quantile] object, but it is not doing what I understand from the documentation. the help file specify that the 0.5 quantile is the median. I'm using the wikipedia definition of the median : https://en.wikipedia.org/wiki/Median
So the list (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9) admit 0.5 as median.
[array quantile] return 6.
In attachment, a patch that demonstrate this behaviours, and other list that return value that I did not expect.
I'm using pd 47.1. Did I made something wrong, or is that just a bug in [array quantile]?
cheers C _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list