Re: [PD] Shuffling arrays

2010-10-05 Thread Andrew Faraday
Yeah, urn looks like the simplest way to achieve what I want to do. Cheers, guys Date: Tue, 5 Oct 2010 08:58:51 +0200 From: f...@footils.org To: pd-list@iem.at Subject: Re: [PD] Shuffling arrays Hi, On Mon, Oct 04, 2010 at 03:07:52PM +0200, Lorenzo wrote: I guess if you only need

Re: [PD] Shuffling arrays

2010-10-05 Thread Claude Heiland-Allen
On 04/10/10 16:06, martin.pe...@sympatico.ca wrote: That's a bad way to shuffle, The same way that it's a really bad way to sort - maybe it could be classed as a bogobubblesort. I chose to do it that way for aesthetic purposes (a jumbled sequence gradually returns to order) rather than

Re: [PD] Shuffling arrays

2010-10-05 Thread Mathieu Bouchard
On Tue, 5 Oct 2010, Claude Heiland-Allen wrote: The same way that it's a really bad way to sort - maybe it could be classed as a bogobubblesort. That sort is still just O(n²) in time, isn't it ? And it can finish faster than the bubble sort. Does it often do ? If you want a really slow

Re: [PD] Shuffling arrays

2010-10-05 Thread Mathieu Bouchard
On Tue, 5 Oct 2010, Mathieu Bouchard wrote: It makes a strawman example about sorting with a random key bit being attached to each element. No-one would use a random key. erratum: no-one would use a single bit as a random key.

Re: [PD] Shuffling arrays

2010-10-04 Thread Lorenzo
tim vets wrote: William Brent's tabletool ? http://williambrent.conflations.com/pages/research.html gr, Tim 2010/10/4 Andrew Faraday jbtur...@hotmail.com mailto:jbtur...@hotmail.com Hey Guys I've recently come across the .shuffle method in Ruby which randomly re-orders the

Re: [PD] Shuffling arrays

2010-10-04 Thread Mathieu Bouchard
On Sun, 3 Oct 2010, Andrew Faraday wrote: I've recently come across the .shuffle method in Ruby which randomly re-orders the content of an array. Does anyone know of a way to do this in Pd, that is, either change the order of notes within an array or output them in a random order (without

Re: [PD] Shuffling arrays

2010-10-04 Thread Claude Heiland-Allen
On 03/10/10 23:21, Andrew Faraday wrote: Hey Guys I've recently come across the .shuffle method in Ruby which randomly re-orders the content of an array. Does anyone know of a way to do this in Pd, that is, either change the order of notes within an array or output them in a random order

Re: [PD] Shuffling arrays

2010-10-04 Thread martin.peach
That's a bad way to shuffle, as it can swap things back again and generally reduce the randomness, the way someone who is good at shufflng cards can put them all back the way they started while appearing to mix them up. A better way is to start at the beginning of the array, swap the first

Re: [PD] Shuffling arrays

2010-10-04 Thread Mathieu Bouchard
On Mon, 4 Oct 2010, martin.pe...@sympatico.ca wrote: That's a bad way to shuffle, as it can swap things back again and generally reduce the randomness, the way someone who is good at shufflng cards can put them all back the way they started while appearing to mix them up. But the programme

[PD] Shuffling arrays

2010-10-03 Thread Andrew Faraday
Hey Guys I've recently come across the .shuffle method in Ruby which randomly re-orders the content of an array. Does anyone know of a way to do this in Pd, that is, either change the order of notes within an array or output them in a random order (without repeating any part of it)? Help

Re: [PD] Shuffling arrays

2010-10-03 Thread tim vets
William Brent's tabletool ? http://williambrent.conflations.com/pages/research.html http://williambrent.conflations.com/pages/research.htmlgr, Tim 2010/10/4 Andrew Faraday jbtur...@hotmail.com Hey Guys I've recently come across the .shuffle method in Ruby which randomly re-orders the