teaching machines

The Tiangle, Part I

This post is part of a series of notes and exercises for a summer camp on making musical instruments with Arduino and Pure Data. Our First Instrument It’s time to make our first instrument: the tiangle (sic). The tiangle will use a piece of hardware called a potentiometer, which is a knob that controls how […]

Hot vs. Cold Inlets

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 […]

Seeing Waveforms

This post is part of a series of notes and exercises for a summer camp on making musical instruments with Arduino and Pure Data. Author Christopher Paul Curtis writes in Elijah of Buxton, “Believe some to none of what you hear and only half of what you see.” The intended target of Curtis’ wisdom is […]

Oscillating

This post is part of a series of notes and exercises for a summer camp on making musical instruments with Arduino and Pure Data. The very first thing we must do this week is make noise. We’ll create this patch in Pure Data to generate a single frequency: Follow these steps to produce your patch: […]

4-pin Buttons on Arduino

At the early stages of learning, we tend to mimic without understanding. That’s how I learned to code, and that’s how I’m learning electronics. A book presents a circuit diagram, and I copy it faithfully. And lo, it works! That small thrill carries me to the next step of understanding. Here’s a circuit that I […]

TransportException with Eclipse and EGit

Students in my introductory programming class were getting TransportExceptions when trying to pull from a remote Git repository with the EGit plugin in Eclipse. The issue was a missing line in their .git/config. The file should have looked like this: … [remote “origin”] … fetch = +refs/heads/*:refs/remotes/origin/* The definition of fetch was absent. I think […]

Weighted Distribution in Unity UI

Suppose you have a Horizontal Layout Group in a Canvas-based UI in Unity, and some elements in the group should expand but not others. Or some should expand at different rates than others. Checking the Width option of Child Force Expand on the group seems like it might do what you want, but you are […]

Capturing High-resolution Screenshots in Unity

A student and I were collaborating on a poster. We needed an image of a Unity scene that for a 4-foot-by-4-foot poster. Capturing our screens at their normal resolutions resulted in images that got fuzzy when scaled. So, we worked up a quick method for taking screenshots at higher resolutions with a render texture. Perhaps […]

CS 330: Final

See the PDF.

Multicolumn Layouts in Unity

Unity’s RectTransform can be used to achieve a couple of common multi-column UI patterns. I describe here how to achieve these using only anchors, offsets, and pivots—and not any layout groups. Percentage-based N-column Layout If your layout requires multiple columns and each column is apportioned a percentage of the total display, set each column’s X […]

1 51 52 53 54 55 204