Classes

Pattern

Defined in classes/Pattern.ts

Patterns are the building blocks of Zen. They are used to generate patterns of values in interesting, concise ways.

Stream

Defined in classes/Stream.ts

A Stream is a musical layer. You can think of it as a track in a DAW, or a channel in a mixer. It can be used to control multiple instruments, effects, and routing. Streams are available within Zen as s0, s1, s2, s3, s4, s5, s6, s7.

s0.set({inst:0,cut:0,reverb:.5,delay:.25,vol:.5,modi:1.25,mods:0.1})
s0.n.set('Cpro%16..*16 | Cpro%16..?*16').sub(12),
s0.s.noise(.25,0.05,0.5)
s0.e.every(4).or(every(3))

Wire

Defined in classes/Wire.ts

The Wire class represents a single wire in a quantum circuit. They are represented in Zen as q0, q1, q2, etc. It uses the Quantum Circuit package to implement quantum gates. Some gates are documented here. See https://www.npmjs.com/package/quantum-circuit#implemented-gates for a list of all implemented gates.

ts q0.h().cx([1])