On Sat, 2 Aug 2008, Evan Laforge wrote: > >> I have streams of samples with irregular sampling rates, so they look > >> like [(Time, SampleVal)]. In practice, this means [(Double, Double)]. > > > > Maybe I have already mentioned my eventlist package on Hackage which > > supports such resampling operations - but is based on lists. > > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/event-list > > Ah, I had seen event-list and even downloaded and read parts of it, > but it was hard for me to figure out what was going on and how to > actually use it based on the scattered comments in the source.
I commented only non-trivial parts, because I thought it is clear, that 'mapTime' is a 'map' on the time stamps and so on. > Apparently there are absolute and relative time variants, but within > that there are further "body" and "time" variants, and they're built > on a similarly sparsely documented alternating list library. Are > there some simple examples of its use out there? There are all four variants of whether a list starts and ends with a time or a data body. The 'midi' package uses 'event-list'. > Unfortunately, storable vector, unlike ByteString, doesn't export > 'create' and whatnot so I have to keep a locally patched version of > it. Well, it does export 'create': http://hackage.haskell.org/packages/archive/storablevector/0.1.2.2/doc/html/Data-StorableVector-Base.html However in my applications I could use the safe 'unfoldrN' in most cases. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
