Hi All, I'm pleased to announce the release of diff-eq, a library for generating signal processing functions using difference equations.
https://github.com/kunstmusik/diff-eq https://clojars.org/kunstmusik/diff-eq The library provides the dfn macro which takes in a set of difference equations and analyzes, rewrites, reorders, and generates a function suitable for sample-at-a-time processing. The dfn macro will take care to handle historical values for input and generated signals. The README.md shows examples of writing one-pole, one-zero, biquad (transposed direct form II), and zero-delay feedback one-pole filters using diff-eq. The goal for this project was to stay within the math of difference equations and not have to worry about translating that into working signal processing code, particularly dealing with storage/retrieval of history. The generated code uses arrays for memory and optimizes to use a simple array get/set for single-sample history, or an array-backed ring-buffer for signals where multiple values of history are required. Function arguments and return values are automatically type hinted for doubles so users will not need to do so in their own code. The scope of the project is currently focused around audio signal processing. A list of todos is given the docs/intro.md page, with the support of initial conditions and initial state as the primary issues that will be tackled next. As always, feedback very welcome! Thanks! steven -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.