1. 11
  1. 3

    Very serendipitous for me that this post is showing up now. I’d like to write some live music performance software using Haskell, and as a first step I’m trying to figure out how to write a tempo clock. Of course first I investigated FRP approaches but found them to be a bit high-level for what I want to build, and since then I’ve been bouncing around looking at everything from atom (https://hackage.haskell.org/package/atom) to simply adding FFI calls out to some kind of Rust library, so at the very least I could get a separate OS thread dedicated to my time-keeping process. Simultaneously I’m trying to figure out how Ableton link (https://github.com/Ableton/link) could fit into this equation (side note: suggestions or comments on any or all of this most welcome!).

    Anyways, this looks very interesting and right in the space that I’ve been exploring. I’m excited to dig in further. Thanks for the post!

    1. 2

      You’re very welcome. It was FRP stuff that I looked into for real-time since they were using it in embedded. I can’t help you further on this other stuff since I don’t know functional programming or audio. I learn a decent amount on functional programming from people here on Lobsters. Happy to at least give you something to work with. :)

      1. 1

        It was FRP stuff that I looked into for real-time since they were using it in embedded.

        I realize now we’re starting to digress further, but would you mind talking a bit about this?

        1. 4

          Embedded systems often react to external stimuli running some computation. It might just be a loop that constantly runs. The FRP model maps to that nicely. So, some people were making Haskell DSL’s for FRP and similar stuff. Atom was one of more well-known with its guarded actions. My memory loss seems to have dropped the others.

          Given it’s interesting topic, I went ahead and did some DuckDuckGoing on it. I found several languages for FRP in embedded and/or Haskell. I’ll add them to my list of things to check out and maybe submit over next week or two.

          1. 1

            Thanks. I look forward to more submissions!

      2. 2

        You may also want to look at temporal recursion, although it’s been awhile since I’ve read the paper and it may not be purely functional enough for you

        1. 1

          Interesting, thank you!

          (EDIT:) Also, I’ve been doing a lot with SuperCollider as well so it’s cool seeing James McCartney and SC namechecked in the opening section…