Selfie Sunday 002 :: Webcam to ASCII

In this Selfie Sunday we learn how to build a patch that turns webcam input into an ASCII display.

It’s a 3 part tutorial – starting with how to push font into a matrix to analyse and sort the brightness of each character to use in the next 2 tutorials.


Part 1 (above):

We start off the tutorial by bringing [] rendered font into matrix-land and analyse each character, sorting them in order of brightness, and storing them in a matrix table.


Part 2:

Then we learn how to use the sorted character table from Part 1 to generate an ASCII image from webcam input, using [] embedded in a [poly~] to generate each line of text text.

You’ll need an even spaced font to do this properly – here’s the font “Classic Console“:


Part 3:

And in part 3 we take a different approach, by using the table from Part 1 and learn how to generate a large [] that contains all the font characters. We then use the input from the webcam to generate a UV/texture map using [jit.expr], and apply it to a [], dynamically referencing the texture of characters.


Here are the patchers:

Leave a Reply

Your email address will not be published. Required fields are marked *