.. in the visual synthesizer niseq: 13k LOC
¤%%link;;{½3;
.. in the upcoming Pmmd modular synth module
¤%%link;;{½3;
you can use S.fix to bind recursive relationships between modules
¤%%link;;{½3;
so the subscriber relation is inverted, relative to OO, where you register listeners
¤%%link;;{½3;
in effect, a FRP first class module, is a stateful instance, which others can subscribe to
¤%%link;;{½3;
you can use E.fold/S.fix inside a module to accumulate state
¤%%link;;{½3;
you can program with time-semantics in a declarative way
¤%%link;;{½3;
CV-in ports are given as functor params
¤%%link;;{½3;
CV-out ports are returned via functor result
¤%%link;;{½3;
events are equivalent to CV "gates"
¤%%link;;{½3;
signals are equivalent to ordinary CV
¤%%link;;{½3;
.. though ofc. much more is possible with FRP than with modular-synth modules
¤%%link;;{½3;
there is btw. a direct relation between modular-synth modules and this model too
¤%%link;;{½3;
.. and return a module containing events and signals
¤%%link;;{½3;
.. which are module-functors that receive a set of events and signals as input
¤%%link;;{½3;
.. use OCaml first class modules
¤%%link;;{½3;
the setup is as follows:
¤%%link;;{½3;
then you get something that looks a bit like OO, if you squint, but it's safe
¤%%link;;{½3;
and I've found that if you mix OCamls module system with FRP..
¤%%link;;{½3;
I've worked with FRP for a long time now
¤%%link;;{½3;
21 thoughts left