SynthMaker Manual Help Watch Open SynthMaker (opens in a new tab)
Visuals

Drawings moved by sound

A drawing is a picture you write in a few lines: points, paths, circles, stars and patterns, in layers. Its inputs are wires, so an envelope makes it swell on every kick and an LFO turns it slowly. You can also draw with the pen, which writes the lines for you, and bring in an SVG.

The Screen: an orange eight-point star, pink leaves and a white ring, swelling on a kick.
The Kick drawing on the Screen, its pulse wired from the kick's envelope.

1A drawing in a few lines

Add Start from drawing from the Visuals group, wire its visual into a Screen, and an envelope into its pulse. In the sound's code the drawing is used by name like a module, and written as a block after the patch:

logo   = Kick(size: 45)amp -> logo.pulselogo.visual -> screen drawing Kick  in pulse  setting size: 40, from 10 to 100  centre = (0, 0)  tip    = (0, 60 + pulse * 20)  leaf   = path(centre, curve(tip, (40, 20), (30, 50)), close)  ring   = circle(centre, size + pulse * 20)  spikes = star(centre, points: 8, inner: 30, outer: 50 + pulse * 30)  petals = repeat(leaf, 6, around: centre)  layer glow: spikes, hue: 30, opacity: 0.6, blend: add  layer body: ring, stroke: 3, colour: whiteend
  • One thing per line. in and setting read as in a module's code: an input a wire drives, and a knob.
  • The page goes from −100 to 100 on the Screen's shorter side, (0, 0) in the middle, and up is up.
  • A point is (x, y), and either number can be worked out: (0, 60 + pulse * 20) rises with each hit.

2Shapes

ShapeWhat it draws
path(a, b, curve(c, c1, c2), close)Lines from point to point; curve bends to its point through two handles; close goes back to the start. Its points are a1, a2…
circle(centre, radius)A circle.
rect(centre, width, height, turn)A rectangle, its corners v1 to v4.
polygon(centre, sides, radius, turn)A regular polygon, its corners v1…
star(centre, points, inner, outer, turn)A star, its tips tip1… and inner corners v1…

A shape's own points can be used further down: circle(spikes.tip1, 5) puts a dot on the star's first tip.

3Patterns

LineWhat it makes
repeat(leaf, 6, around: centre)Six copies round a point, a sixth of a turn apart.
repeat(bar, 120, step: (3, 0))120 copies side by side, 3 apart: fine lines.
repeat(circle((0, 0), 2), 40, grow: 3)40 rings, each bigger than the one before by three times the first one's size.
rotate(shape, angle), scale(shape, by), move(shape, x, y)A turned, resized or moved copy; the amount can follow an input.

Fine lines and a turned copy of them make moiré: the slow LFO turns one field, each kick nudges it, and the fringes where they cross move across the picture.

Fine black lines on white crossing a turned copy, with rings and a fan of spokes: moiré fringes.
Moiré: two fields of lines (one turned by an LFO), rings that grow on each kick and invert what's under them, and a fan.

4Layers

layer name: shapes, … draws its shapes in one look, in the order the layers are written.

SaysMeans
stroke: 3How thick the lines are (0: none).
colour: whitewhite, black, red, orange, yellow, green, cyan, blue, purple, pink, grey, or rgb(1, 0.5, 0).
hue: 30A bright colour at that place round the colour wheel.
fill: onFills the shapes, in the layer's colour or one of its own (fill: red).
opacity: 0.6From 0 (not there) to 1.
blend: addadd (light adds up), multiply (dark lines darken), screen, difference (white over white is black), or normal.

Any of them can follow an input: opacity: 0.4 + pulse * 0.6. A shape no layer draws is drawn as a thin white line.

5The pen

Open the drawing to see its code beside its picture. The pen changes the code, never a picture beside it:

  • Drag a point: its numbers change. In (0, 60 + pulse * 20) only the 60 changes, so the point still rises with each hit.
  • A point made only of inputs (pulse * 20) is orange: it says it's driven by pulse and stays where the sound puts it.
  • Choose a shape and its line lights up in the code.
  • Pen: click to add a point to the chosen path (drag for a curve), or start a new path; click its first point to close it. Each point gets a line of its own, p1 = (x, y).
  • ⌘Z (Ctrl+Z on Windows and Linux) in the code takes a change back.
Inside the drawing: its code on the left, its picture on the right with points to drag and the Select, Pen, Import SVG and Export SVG buttons.
Inside a drawing: the code, the picture with its points, and the pen.

6SVG in and out

  • Import SVG… adds a file's outlines to the drawing as path(…) lines, each point named (p1, p2…), with a layer for each look. Only shapes are read: a file with a script, an image, a style sheet or a link to anything outside it is refused, and nothing is ever downloaded.
  • Export SVG saves the picture as it is at that moment, each layer a group.

7Draw it, hear it

PathOsc plays a drawing. Wire the drawing's visual into PathOsc's drawing: a pen walks its lines once round for every cycle of the note, so the drawing is the sound's wave.

  • x is where the pen is across, the left of the sound; y how high, the right.
  • Wire x, y and beam into an XY Plot and it draws the drawing back in light. beam is off while the pen jumps from one shape to the next, so the jumps aren't drawn.
  • Smooth rounds the corners for a softer sound; Oversample walks it faster and averages, for cleaner corners.
  • The drawing's own wires move PathOsc too: an envelope into pulse swells the shape you see and the sound you hear.
An XY Plot drawing a five-pointed star with leaves in blue light, traced by PathOsc.
A star with leaves walked by PathOsc at the note's pitch, drawn back by an XY Plot.

Try it

  1. Open the example, play a key, and watch the drawing swell with the kick.
  2. Open the drawing and drag the top of the leaf: the 60 in tip changes.
  3. Change points: 8 to points: 12 in the code.
Open the example sound: Drawn Kick ↗ (opens in a new tab)

Remember