Skip to content

textmode.synth.js / char

Function: char() ​

ts
function char(source): SynthSource;

Create a character source from any color/pattern source.

This function converts any pattern (like osc(), noise(), voronoi()) into character indices. The pattern's luminance or color values are mapped to character indices.

Parameters ​

ParameterTypeDescription
sourceSynthSourceA SynthSource producing color values that will be mapped to characters

Returns ​

SynthSource

A new SynthSource configured for character generation

Example ​