
Hi folks from the cafe!! Last weekend, I was wondering on how hard it would be to use Haskell for mixed-signal processing. Here is an example of an digital integrator: summation=zipWith (+) delay xs=(fromIntegral 0):xs integrator xs=let ws=summation (integrator xs) xs in delay ws The input and output are infinite streams. I have a few questions: 1) Is it possible to change it to use arrows? How would it look like? 2) How would one implement an continuous time version? For 2) I would like to implement something like that digital integrator, so I could create filters based on integrator loops like this one: x(t) ----(+)----> Integrator --|---> y(t) ^ | |--------------------| Note that x(t) would be a function, and I would expect to create a function y, based on this flow! Rafael Gustavo da Cunha Pereira Pinto -- Rafael Gustavo da Cunha Pereira Pinto

Am Mittwoch, den 08.09.2010, 11:47 -0300 schrieb Rafael Gustavo da Cunha Pereira Pinto:
The input and output are infinite streams. I have a few questions:
1) Is it possible to change it to use arrows? How would it look like? 2) How would one implement an continuous time version?
Have you had a look at Yampa? Best wishes, Wolfgang

Just found it! It is pretty much what I was looking for,
On Thu, Sep 9, 2010 at 10:08, Wolfgang Jeltsch
Am Mittwoch, den 08.09.2010, 11:47 -0300 schrieb Rafael Gustavo da Cunha Pereira Pinto:
The input and output are infinite streams. I have a few questions:
1) Is it possible to change it to use arrows? How would it look like? 2) How would one implement an continuous time version?
Have you had a look at Yampa?
Best wishes, Wolfgang
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Rafael Gustavo da Cunha Pereira Pinto

Rafael Gustavo da Cunha Pereira Pinto schrieb:
The input and output are infinite streams. I have a few questions:
1) Is it possible to change it to use arrows? How would it look like? 2) How would one implement an continuous time version?
For 2) I would like to implement something like that digital integrator, so I could create filters based on integrator loops like this one:
x(t) ----(+)----> Integrator --|---> y(t) ^ | |--------------------|
Note that x(t) would be a function, and I would expect to create a function y, based on this flow!
If you look for Arrows, Signal processing _and_ real-time efficiency, then you might be interested in my experiments with LLVM: http://www.youtube.com/watch?v=GNiAqBTVa6U http://arxiv.org/abs/1004.4796 http://code.haskell.org/synthesizer/llvm/ (you need some more repositories like http://code.haskell.org/~thielema/llvm-2.6/, http://code.haskell.org/synthesizer/alsa/ ... no fun of installation currently because I could not achieve to get some patches to llvm to hackage.)
participants (3)
-
Henning Thielemann
-
Rafael Gustavo da Cunha Pereira Pinto
-
Wolfgang Jeltsch