Punctual Practice

Now let’s go ahead and combine some of the concepts we’ve seen in the last few sections to try things before experimenting further!

Exercise 1

Try the following snippets of code in Punctual to see how they work:

tex "https://upload.wikimedia.org/wikipedia/commons/a/a0/Blue_stragglers_in_NGC_6397.jpg" [1.2*fx,1.2*fy] >> video;
tex "https://upload.wikimedia.org/wikipedia/commons/a/a0/Blue_stragglers_in_NGC_6397.jpg" [1.2*fx+0.3*(sin cps),1.2*fy] >> video;

For this one, we’re showing a shortcut that lets you only write a particular color to the screen. You won’t see anything until you make a beat in Tidal to go with it!

pic << tex "https://upload.wikimedia.org/wikipedia/commons/a/a0/Blue_stragglers_in_NGC_6397.jpg" [1.2*fx,1.2*fy];

hline (sin 0.1) (0.3*hi) * pic >> red;
vline (sin 0.05) (0.2*lo) * pic >> blue;
circle [0,0] (0.4*mid) * pic >> green;

If you don’t have a beat to use with this one, try

stack [s "bd*4",
       s "linnhats*8?",
       s "cp ~ cp cp"]

Notice which parts of the beat affect the different shapes.

Exercise 2

  • Go to Wikimedia Commons and find a picture you’d like to use with Punctual
  • Make it display on the screen
  • Multiply fx and fy by different numbers to stretch, squish, and zoom into the image

Exercise 3

Pick one of the examples from Exercise 1 and replace the image I used with the one you found in Exercise 2. Try adding more shapes, changing numbers, and otherwise playing with the image. Try adding a visualizer component with lo, mid, or hi and seeing how different beats affect the image.