zwirn-0.2.3.1: README.md
# 🧶🧵🧶 zwirn 🧶🧵🧶
zwirn is a live coding language for playing with nested functions of time.
## Inspiration
zwirn is an experiment in making the pattern language [TidalCycles](https://tidalcycles.org/) into a small functional language of it's own. while zwirn's internals are quite different from Tidal's, zwirns design owes almost everything to tidals design by [Alex McLean](https://slab.org/).
the internal representation of signals of time was implemented together (and parallel) with [Julian Rohrhuber](https://wertlos.org/~rohrhuber/), in an effort to port tidal to SuperCollider. This can be found in the [zwirn-core](https://codeberg.org/uzu/zwirn/src/branch/main/src/zwirn-core/Zwirn/Core) sublibrary.
the implementation of the compiler is inspired by the excellent [Write You a Haskell](https://github.com/sdiehl/write-you-a-haskell) by Stephen Diehl.
## Installing zwirn
Currently, the easiest way to play with zwirn is through the small terminal UI zwirnmill, which comes with the sound engine [doux](https://doux.livecoding.fr/) bundled.
You can grab a release for your operating system [here](https://github.com/polymorphicengine/zwirnmill-release/releases).
## Compiling from Source
To compile zwirnmill or zwirnzi with Doux as the sound engine, you will need both Haskell and Rust installed. Then, clone the following repositories:
```
git clone https://codeberg.org/uzu/zwirn/
git clone https://codeberg.org/polymorphicengine/haskell-doux
```
Now we will compile `doux-ffi`:
```
cd haskell-doux/doux-ffi
cargo build --release
```
Then you will have to edit the paths in `zwirn/cabal.project.local` to point to your `haskell-doux` folder.
Now we are ready to install zwirnzi or zwirnmill:
```
cd zwirn
cabal install zwirnzi
cabal install zwirnmill
```
If you want to use `zwirnzi` with SuperCollider / SuperDirt instead, the installation is simpler:
```
git clone https://codeberg.org/uzu/zwirn/
cd zwirn
cabal install zwirnzi --flags +superdirt
```