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, which trigger the sending of osc-messages. it's syntax is inspired by TidalCycles' mini-notation and its API for manipulating patterns.


[Skip to Readme]

library zwirn:zwirn-lang

Modules

  • Zwirn
    • Zwirn.Language
      • Zwirn.Language.Block
      • Builtin
        • 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.Pretty
      • Zwirn.Language.Rotate
      • Zwirn.Language.Simple
      • Zwirn.Language.Syntax
      • TypeCheck
        • Zwirn.Language.TypeCheck.Constraint
        • Zwirn.Language.TypeCheck.Infer
        • Zwirn.Language.TypeCheck.Types
    • Stream
      • Zwirn.Stream.Handshake
      • Zwirn.Stream.Listen
      • Zwirn.Stream.Process
      • Zwirn.Stream.Target
      • Zwirn.Stream.Types
      • Zwirn.Stream.UI

library zwirn:zwirn-core

Modules

  • 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

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
Dependencies aeson (>=2.2.3 && <2.2.4), array (>=0.5 && <0.6), base (>=4.14 && <4.22), bytestring (>=0.12.1 && <0.13), conferer (>=1.1 && <1.2), conferer-yaml (>=1.1 && <1.2), containers (>=0.6.8 && <0.8), directory (>=1.3.9 && <1.4), easyplot (>=1 && <1.1), exceptions (>=0.10.9 && <0.11), file-io (>=0.1.5 && <0.1.6), filepath (>=1.5.4 && <1.5.5), haskeline (>=0.8.4 && <0.9), hmt (>=0.20 && <0.21), hosc (>=0.21.1 && <0.22), lens (>=5.3 && <5.3.6), lsp (>=2.7 && <2.7.1), mtl (>=2.3 && <2.4), network (>=3.2.7 && <3.3), prettyprinter (>=1.7 && <1.8), pure-noise (>=0.1.0.1 && <0.2), random (>=1.2 && <1.4), stm (>=2.5 && <2.6), text (>=2 && <2.2), text-rope (>=0.3 && <0.4), tidal-link (>=1.1 && <1.2), utf8-string (>=1.0.2 && <1.1), zwirn [details]
Tested with ghc ==9.12.1, ghc ==9.8.2, ghc ==8.10.7
License GPL-3.0-only
Copyright Martin Gius
Author Martin Gius
Maintainer Martin Gius
Uploaded by MartinGius at 2026-03-10T10:58:09Z
Category Language, Sound
Source repo head: git clone https://codeberg.org/uzu/zwirn/
Distributions
Executables zwirn-docs, zwirn-plot, zwirnzi
Downloads 47 total (2 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-03-10 [all 2 reports]

Readme for zwirn-0.2.2.0

[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

tba

Limitations

due to the representation of signals and the way they are queried, there can only be a limited amount of triggers per cycle, if this number is exceeded zwirn fails to find any triggers. Currently the threshold seems to be at 500 triggers per cycle:

while fast 499 $ s "bd" works as expected, fast 500 $ s "bd" is silent. if you would like to increase the amount of trigger per second (not cycle!), increase the cycles per second, for example by running :cps 1.

Documentation

documentation for zwirn is still in progress and available here, feel free to drop me a message if you have any questions.