Skip to content

Releases: mikesol/purescript-ocarina

Unparalleled utilities

05 Jun 06:56
Compare
Choose a tag to compare

From observing WAGS in anger, it was clear that many real-world examples needed to update control-rate parameters over time, and these functions of time needed to be speedy. One major bottleneck for time-based functions like piece-wise functions is locating the evaluation region on the time axis. We can speed this up substantially by knowing what values are no loner relevant (because they are in the past) and what values to check first (because they are in the immediate future). Comonads help us do this. Check out NE2CF to see these functions 🚀

Calm continuations

02 Jun 16:38
Compare
Choose a tag to compare

Introduces an icont function to improve continuations in ibranch.

Immaculate indices

02 Jun 09:17
a14cacc
Compare
Choose a tag to compare

This release uses comonads to back the indexed type. This simplifies the code base a great deal (cutting over 1,000 lines of code) and makes WAGS programs more readable (less boilerplate) as seen in the examples.

Persistent parameters

29 May 12:34
Compare
Choose a tag to compare

Parameters now have a forceSet option that, well, forces their being set. Sometimes, the web audio API linear interpolation is abrupt & causes unwanted pops. By forcing a parameter set before an interpolation, it decreases the chances of an auditory artifact.

Preternatural patches

23 May 08:01
Compare
Choose a tag to compare

There is now a command patch that will take a frame automatically from any graph1 to any graph2. That means that all create, connect, destroy and disconnect operations will be figured out by the compiler. This eliminates boilerplate substantially. Do git grep patch in the examples folder to see it in action.

Courageous cancellations

21 May 10:25
Compare
Choose a tag to compare

Audio can now be canceled after it has been scheduled.

This feature was added because, in many instances, it is more efficient (meaning less clicks & bloops) to schedule changes via the web audio API's scheduler rather than doing them JIT. When scheduling changes, we may need to cancel them in response to new information. The library now supports this.

Incredible instances

20 May 12:44
Compare
Choose a tag to compare

Math with AudioParameters is now a lot easier thanks to instances of Semiring and Field.

Judicious validation

20 May 03:01
Compare
Choose a tag to compare

Makes validation of audio graphs optional in makeScene. As audio graphs are already validated as they are built, the extra validation step in makeScene mostly catches corner cases. By making validation optional in makeScene, projects with complex graphs compile ~100x faster and can opt into validation when needed.

Great graphs

17 May 15:53
Compare
Choose a tag to compare

This release simplifies the structure of graphs in by using extensible records to model graphs instead of a custom type. This has the following benefits:

  • Function signatures are significantly shorter.
  • The code base's size was cut down by 33%.
  • Error messages are easier to read.
  • Records can be reified to the type-level and reflected to the term-level without using proxies.

Amazing changes

29 Apr 12:53
cd894c8
Compare
Choose a tag to compare

The library now returns an object from change, changeAt, changes and change' that reflects the changed audio unit. Previously, these functions had returned Unit (akin to set in many libraries), whereas now they return an updated value (akin to modify).

Furthermore, we've added an asGetter function to transform any graph into a getter. On change, this will get the previous values instead of modifying them.

Lastly, this version adds a get family of functions, get, getAt, gets and get' that work exactly like their analogue from the change family of functions but act as getters by using asGetter internally. Importantly, the get family of functions does not increment the change bit. An example of get is in the project's unit tests.