teaching machines

Hot vs. Cold Inlets

June 12, 2019 by . Filed under electronics, music, public.

This post is part of a series of notes and exercises for a summer camp on making musical instruments with Arduino and Pure Data.

Summer Camp

Let’s start with a patch that adds two numbers and shows their sum. Using three Numbers and one Object, create this program:

Connect up the outlets and inlets as shown.

Leave Edit Mode and experiment by dragging on the number inputs. What do you notice? Be thorough, and you are bound to discover something interesting…

Let’s compare our findings.

Dealing with Hot/Cold

Sometimes we do want cold inlets to trigger downstream updates. One workaround to is to add a bng object:

After we change the second number, we just press the bng button to reissue the unchanged first number—which causes the sum to update. This bng fixes our update problem, but it is annoying.

A better solution is to use a trigger object. When a value enters the inlet of a trigger, the trigger fires off a sequence of values through its outlets:

The trigger here spits out a bang and a float. Importantly, it does so in reverse order. First, the float outlet sends the number along unchanged to the cold inlet of the plus object. Second, the bang outlet sends a pulse to the hot inlet of the plus object.

As you can see, a trigger can make a cold inlet behave like a hot inlet. This dynamic of hot vs. cold will be important to remember throughout the week. We’ll see trigger again.