[sdiy] 1 bit serial stream delay approaches..
Martin Klang
mars at pingdynasty.com
Mon Sep 24 15:34:16 CEST 2012
Interesting, yes, I didn't even consider your option A/
Which would be the expected behaviour, if this were a synth module?
> If you follow the A/ approach, it's very easy to keep the event list
> sorted - events are just added in order to it, and this can indeed be
> done with a FIFO. A change in delay time will just rush the flushing
> of the list...
a smooth, slow change might dequeue all events, but I imagine a sudden change will leave items on the list.
Unless you remove them whenever the delay time is shortened.
> Since the variation of delays might alter the order of events, you
> might have to insert the event somewhere in the middle of the list,
> which requires O(log n) operations if the event list is kept sorted
> (and not O(n) as stated).
I was considering a simple insertion sort, which would be very fast for sorted and almost-sorted lists.
I was still wrong though, since worst case insertion sort is probably O(n^2).
However O(log n) is for finding an item in a sorted array, right, not sorting the array itself? The best performing sort algorithms are n log n.
/m
More information about the Synth-diy
mailing list