zwirn: a live coding language for playing with nested functions of time

[ gpl, language, library, program, sound ] [ Propose Tags ] [ Report a vulnerability ]

zwirn is a live coding language for playing with nested functions of time, whith additional discrete structure. it's syntax is inspired by TidalCycles' mini-notation and its API for manipulating patterns.


[Skip to Readme]

library zwirn:zwirn-doux

Modules

[Last Documentation]

  • Zwirn
    • Doux
      • Zwirn.Doux.Env
      • Zwirn.Doux.Process
      • Zwirn.Doux.Types
      • Zwirn.Doux.UI

library zwirn:zwirn-stream

Modules

[Last Documentation]

  • Zwirn
    • Stream
      • Zwirn.Stream.Env
      • Zwirn.Stream.Handshake
      • Zwirn.Stream.Listen
      • Zwirn.Stream.Process
      • Zwirn.Stream.Target
      • Zwirn.Stream.Types
      • Zwirn.Stream.UI

library zwirn:zwirn-lang

Modules

[Last Documentation]

  • Zwirn
    • Zwirn.Language
      • Zwirn.Language.Block
      • Builtin
        • Zwirn.Language.Builtin.DouxParameters
        • Zwirn.Language.Builtin.Internal
        • Zwirn.Language.Builtin.Parameters
        • Zwirn.Language.Builtin.Prelude
      • Zwirn.Language.Compiler
      • Zwirn.Language.Environment
      • Zwirn.Language.Evaluate
        • Zwirn.Language.Evaluate.Convert
        • Zwirn.Language.Evaluate.Expression
        • Zwirn.Language.Evaluate.Internal
        • Zwirn.Language.Evaluate.SKI
      • LSP
        • Zwirn.Language.LSP.Diagnostics
        • Zwirn.Language.LSP.Eval
        • Zwirn.Language.LSP.Hover
        • Zwirn.Language.LSP.InlayHints
      • Zwirn.Language.Lexer
      • Zwirn.Language.Location
      • Zwirn.Language.Macro
      • Zwirn.Language.Parser
      • Zwirn.Language.Play
      • Zwirn.Language.Pretty
      • Zwirn.Language.Rotate
      • Zwirn.Language.Simple
      • Zwirn.Language.Syntax
      • TypeCheck
        • Zwirn.Language.TypeCheck.Constraint
        • Zwirn.Language.TypeCheck.Infer
        • Zwirn.Language.TypeCheck.Types

library zwirn:zwirn-core

Modules

[Last Documentation]

  • Zwirn
    • Core
      • Zwirn.Core.Cord
      • Zwirn.Core.Core
      • Lib
        • Zwirn.Core.Lib.Conditional
        • Zwirn.Core.Lib.Cord
        • Zwirn.Core.Lib.Core
        • Zwirn.Core.Lib.Map
        • Zwirn.Core.Lib.Modulate
        • Zwirn.Core.Lib.Number
        • Zwirn.Core.Lib.Random
        • Zwirn.Core.Lib.State
        • Zwirn.Core.Lib.Structure
        • Zwirn.Core.Lib.Text
      • Zwirn.Core.Query
      • Zwirn.Core.Time
      • Zwirn.Core.Tree
      • Zwirn.Core.Types

Flags

Manual Flags

NameDescriptionDefault
superdirt

Use Superdirt as the audio backend

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.2.0, 0.2.2.1, 0.2.3.1
Dependencies aeson (>=2 && <2.4), array (>=0.5 && <0.6), base (>=4.14 && <4.22), base64 (>=1.0 && <1.1), brick (>=2.10 && <2.14), bytestring (>=0.12.1 && <0.13), commonmark (>=0.3 && <0.4), conferer (>=1.1 && <1.2), conferer-yaml (>=1.1 && <1.2), containers (>=0.7 && <0.9), directory (>=1.3.9 && <1.4), easyplot (>=1 && <1.1), exceptions (>=0.10.9 && <0.11), file-embed (>=0.0.16 && <0.0.17), file-io (>=0.1.5 && <0.3), filepath (>=1.5.4 && <1.6), haskeline (>=0.8.4 && <0.9), haskell-doux (>=0.2.5 && <0.3), hmt (>=0.20 && <0.21), hosc (>=0.21.1 && <0.22), lens (>=5.3 && <5.4), lsp (>=2.8 && <2.9), microlens (>=0.5.0.0 && <0.6), microlens-th (>=0.4.3.18 && <0.5), mtl (>=2.3 && <2.4), network (>=3.2.7 && <3.3), prettyprinter (>=1.7 && <1.8), process (>=1.6.25.0 && <1.7), pure-noise (>=0.2 && <0.3), random (>=1.2 && <1.4), stm (>=2.5 && <2.6), text (>=2 && <2.2), text-rope (>=0.3 && <0.4), text-zipper (>=0.13 && <0.14), tidal-link (>=1.2.2 && <1.3), time (>=1.14 && <1.15), tinyfiledialogs (>=0.2.1 && <0.2.2), utf8-string (>=1.0.2 && <1.1), vector (>=0.13.2.0 && <0.14), vty (>=6.5 && <6.7), vty-crossplatform (>=0.5 && <0.7), yaml (>=0.11.11.2 && <0.12), zwirn [details]
Tested with ghc ==9.12.2, ghc ==9.6.7
License GPL-3.0-only
Copyright Martin Gius
Author Martin Gius
Maintainer Martin Gius
Uploaded by MartinGius at 2026-09-15T17:56:20Z
Category Language, Sound
Source repo head: git clone https://codeberg.org/uzu/zwirn/
Distributions
Executables zwirn-docs, zwirn-plot, zwirnmill, zwirnzi
Downloads 104 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2026-09-15 [all 2 reports]

Readme for zwirn-0.2.3.1

[back to package description]

🧶🧵🧶 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 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.

the internal representation of signals of time was implemented together (and parallel) with Julian Rohrhuber, in an effort to port tidal to SuperCollider. This can be found in the zwirn-core sublibrary.

the implementation of the compiler is inspired by the excellent 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 bundled. You can grab a release for your operating system here.

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