Give Each Section Its Own Visuals
A section has a visual lane, section[screen], beside its track lanes. A section with no screen
write shows black. The Visual Graph explains what a
visual is.
Write a visual to each section
Section titled “Write a visual to each section”use "std/visuals" as gfx;
let verse = section(8);verse[screen] << gfx.Noise("field");
let chorus = verse.clone();chorus[screen] << (gfx.Noise("grain") >> gfx.Blur("haze"));
let song = arrange(#[verse, chorus]);Open the window with screen.show_window() before song.play().
Playing the song builds every section’s visuals up front, so a cut between sections is instant and lands on its frame. An operator with the same name in two sections is one operator: a feedback trail carries across the cut. If any section’s shader fails to compile, the song’s visuals don’t take — the picture already on screen stays, and the error is shown.
Punch a visual over part of the song
Section titled “Punch a visual over part of the song”Write to a position on the song’s screen lane, on a layer of its own:
song[screen].layer("hits").at(14, 2) << gfx.Edge("edges");Check which visual plays when
Section titled “Check which visual plays when”show(song);section — 16 cycles
screen layers: base, hits 0..8 field (Noise) base 8..14 haze (Blur) base 14..16 edges (Edge) hitsRelated
Section titled “Related”- Arrange a Song from Sections — sections and songs
- Add Fills to a Song — positions and layers
- Visuals — every visual operator