[Haskell-cafe] Sample rate inference

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Thu Nov 11 04:49:13 EST 2004


 I want to connect several functions for signal processing. The typical
case is that in a network of signal processor there are parts that are
already discretized such as sampled sounds, and there are processors with
no particular sample rate such as amplifiers. But when it comes to
computation each processor must choose a sample rate for processing. There
are also processors for converting sample rates. They divide the network
into components of equal sample rate.
 The computation sample rate should be propagated through the network as
follows:
  If in a component of equal sample rate some processors have the same
fixed sample rate, all uncertain processors must adapt that. 
  If some processors have different fixed sample rates this is an error. 
  If no processor has a fixed sample rate, the user must provide one
manually.
 To me this looks very similar to type inference. Is there some mechanism
in Haskell which supports this programming structure? 



More information about the Haskell-Cafe mailing list