Blog  |   Puzzles  |   Books  |   About

PicoCrickets – Mindstorms sans Testosterone

May 23rd, 2006

A PicoCricket is a tiny computer that can make things spin, light up, and play music.

You can plug lights, motors, sensors, and other devices into a PicoCricket, then program them to react, interact, and communicate.

For example, you can make a cat and program it to purr when someone pets it. Or you can make a birthday cake and program it to play a song when someone blows out the candles.

The PicoCricket Kit is similar to the LEGO® MINDSTORMS™ robotics kits. MINDSTORMS is designed especially for making robots, while the PicoCricket Kit is designed for making artistic creations with lights, sound, music, and motion.

The Playful Invention Co.

God’s Email

May 23rd, 2006

I’m testing out Google’s new “Gmail for your domain” service with my domain heaven.com.

Here’s a screen snapshot. It’s pretty cool – all the goodness I’ve come to expect from GMail, with a much cooler domain name.

god@heaven.com currently gets about 30 to 50 prayers a day, and a very large amount of spam. He has also signed up for an enormous number of mailing lists and newsletters. Busy fellow.

Childhood Reads

May 18th, 2006

Stranger from the Depths, by Gerry Turner, 1967. Abridged version 1970.

This was my favorite book for much of my childhood (until about 8th grade). I read the Scholastic abridged version a kajillion times. At least a couple dozen. One of the only science fiction books of my youth whose cover & blurb truthfully advertised what lay inside.

Here’s the blurb on the back:

“Look!” says Gary, as they climb down the cliff. “In that dark opening over there … something gleaming.”

“It’s a tiny statue!” exclaims his brother. “It looks like a lizard man… and I think it’s made of diamond!”

Where has the statue come from? Who made it? The answers lead Gary and his brother into terrifying adventures in a world of fantastic people — miles beneath the ocean floor!

This book, which has a utopian underwater city, and a Jules Verne-like trip to a Dystopian city at the center of the earth, and here’s the best part: two boys who drive around in a jeep, go scuba diving, and don’t have any parents, would make a great movie for kids, or maybe the basis of a cartoon series.

I lost my copy long ago, but recently acquired this one using the Interwebs. This particular version has a pretty good flipbook animation added to the outer margins credited to “Harris Productions”.

* * *

On a related note, I would dearly love to do a coverpop of favorite out-of-print childhood books, but I would need a good collection of covers to make this. If you know of any good resources, leave a comment.

I’ve been dugg!

May 15th, 2006

Welcome, visitors from digg.

Here are some recent music-related posts from KrazyDad:

More fun stuff in the links on the upper right…

Enjoy!

UPDATE: Welcome also, visitors from flabber.nl. My favorite comment on your site was this one, which needs no translation:

“sjiiiiiiit wat een troep man!”

Of course, this was followed by another comment:

“leem”

Good thing I can’t read dutch!

QFold Puzzles

May 11th, 2006

The QFold puzzle website contains puzzles that are meant to be printed and solved with a pencil.

The puzzles are beautiful symmetrical designs that contain 20 hidden asymmetrical elements. To solve the puzzle, you identify these 20 elements of the puzzle and count the number of instances of each class of asymmetry (this is explained in a sample puzzle). This information is then used to identify a secret word or phrase.

The puzzles are free.

Why Flickr is cool

May 10th, 2006

Lot C, LAXToday I emailed this photo to Flickr. I had taken it with my cellphone last month while traveling on business. Within minutes, Jogales added a comment which revealed the make of the plane, the airline, and pointed me to a far more interesting picture of this very same plane colliding with another plane, on the ground, its wing slicing through the tail.

And that is why Flickr is cool.

It is not so much the technologies that were involved in making this happen (cellphones, digital cameras, email, tags, search, etc…). I could have found the same information myself, without uploading the photo to Flickr, if I had bothered to look for it. But I didn’t even think to look for it — and that is where Flickr comes in:

It nudges you.

And the humans that use Flickr, Jogales in this case, are the engine behind that bit of magic.

UPDATE: Chris Barrus posts about a similar experience.

We can remember it for you wholesale

May 8th, 2006

Here’s a new coverpop featuring the works of my favorite sf author of his generation, Philip K. Dick. The covers were provided by the Philip K. Dick cover gallery, courtesy of Jason Koornick.

5000 Puzzles from 1914

May 3rd, 2006

Ed Pegg Jr, of the excellent MathPuzzle.com, has put up a complete set of scans of a profusely illustrated classic from 1914 containing 5000 unique puzzles.

Sam Loyd’s Cyclopedia of Puzzles.

If the name Sam Loyd isn’t familiar to you, perhaps it should be. Loyd was the inventor of the sliding 15-tile puzzle. Here’s my own Flickr-powered version of the 15 puzzle.

Warning: Some of the illustrations and text is politically incorrect by today’s standards. Consider this informative gem: “The chinese are wonderfully expert at figures, although in some way or other they seem to do everything backwards…”

Oh yes, some of the puzzles in the book have been selected as ‘prize puzzles.’ “A prize of one hundred ($100) dollars will be awarded to the person who sends in the best set of correct answers to these ‘Prize Puzzles’ before the first of January, 1915.”

Better get cracking!

Link courtesy of Anarchaia.

A φ Fractal

May 2nd, 2006

I’ve been examining the visual patterns produced by the Whitney Music Box (see previous post). If you watch the animation for any length of time, you’ll notice that the dots form spoked or starfish-like patterns periodically. These patterns often cause chords to be played by the music box.

I was curious to understand the sequence of N-armed patterns. I noticed a sequence in which the number of arms descended 11,10,9,8,7,6,5,4,3,2 (with 2 in the exact middle of the 3 minute cycle). But these patterns were interspersed with another sequence that went 11,9,7,5 and I detected some other sequences interspersed as well.

Paying attention to the position of the largest dot (which travels around the circle only once during the 3 minute cycle), I realized that the spoked formations can be predicted by the position of that dot. The position of the dot can be represented as a fraction, which represents how much of the cycle it has completed.

  • When the position is 1/2, we see a 2-spoked pattern.
  • When the position is 1/3, or 2/3 we see a 3-spoked pattern,
  • When the position is 1/4, or 3/4 we see a 4-spoked pattern.
  • When the position is 1/5, 2/5, 3/5 or 4/5 we see a 5-spoked pattern.

This makes sense given that the orbits of all the smaller dots are multiples of the largest dot. So when the largest dot is at N/5, the smallest dots must be at N*M/5 – so all the dots must be at a point which divides the circle into 5.

More generally, the number of spokes will always be the denominator of the lowest-common denominator fraction which represents the position of the largest dot. For example, when the dot is at position 3/9, it is also at 1/3, so we see only a 3-spoke pattern. So for the 9s, only the fractions for which the numerator and denominator are relatively prime will we see a 9-spoked pattern: 1/9, 2/9, 4/9, 5/9, 7/9, 8/9.

For each division of the cycle n, I plotted the positions in the cycle in which an n-armed spoke pattern will be seen, and produced the above graphic (here is a larger version).

The image is a fractal, as you can see. The single dot in the center of the top row represents the 2-armed figure when the largest dot ist at 1/2. The next two dots are the 1/3 and 2/3 figures, and so on. Looking at this figure, it is obvious that given enough dots, at any one time, the figure always forms an N-spoked figure, but in the cases where the number of spokes is very large, this may not be visually obvious, and the figure looks more like a spiral. There are numerous pairs of solid-looking horizontal lines running thru the figure, which show the positions of consecutive primes.

walnut moireThe overall form of the fractal (with or without the divisible fractions removed) resembles a pattern I’ve seen numerous times when generating mathematical art — whenever I generate a graph that involves linear scaling. The one on the right is the moire pattern you get if you plot all the pixels for which (y * x) has a particular bit set. I call this a “walnut moire.” Look at the outer edges of this other image for another example of this pattern.

I also noted the number of times each N-armed pattern appears (or the number of dots on each line of my graph), and came up with this sequence:

1 1 2 2 4 2 6 4 6 4 10 4 12….

I looked this sequence up on Google and found a very interesting website from 1998. The website tells me the number sequence was originally discovered by Leonhard Euler, and is called the Euler Phi (φ) sequence. Euler’s Phi sequence describes the number of relatively prime numbers which are lower than the each of the numbers 1,2,3 etc.

I’ve since learned that the sequence of lowest-common-denominator fractions is called the Farey Sequence.

Daniel Cummerow’s website, where I first found the Euler Phi sequence, contains a number of interesting MIDI files which render various mathematical sequences, such as the digits of PI, the Fibonacci series, as well as the Euler Phi sequence.

Here are some other pages involving math-based music:

Visual Harmony

April 23rd, 2006

This weekend I’ve been playing, once again, with the ideas of experimental film pioneer John Whitney, using both graphics and audio. While Whitney was interested in turning musical ideas into motion graphics, I’m doing the inverse — turning one of his key animation ideas back into music.

Whitney made a number of films based around the simple idea of harmonic relationships. Above is a visual example of one his ideas that I implemented in Flash.

Here’s Whitney talking about this idea:

An early intuition about how to control total dynamics led me to activate all graphic elements through a motion function that advances each element differentially. For example, if one element were set to move at a given rate, the next element might be moved at two times that rate. Then the third would move at three times that rate and so on. Each element would move at a different rate and in a different direction within the field of action. So long as all elements obey a rule of direction and rate, and none drifts aimlessly or randomly, then pattern configurations form and reform. This is harmonic resonance, and it echoes musical harmony, stated in explicit terms. I tried this procedure in several films, and was gratified by the consistency of the confirmation it demonstrated.
— John Whitney, “Digital Harmony“, pp. 38

In this movie, each of the 48 dots is moving in a circle. Each of the dots is on a 3 minute cycle. At the end of 3 minutes, the outermost dot will have moved around the circle once (this dot represents the first harmonic or fundamental). The next dot will have moved around the circle twice (representing the second harmonic). The next dot three times, and so on. The innermost dot moves around the circle 48 times.

So, I had a cool idea: Imagine these dots are raised bumps on a disc which is controlling a music box, with each bump triggering a note when it passes the zero degree line (a line extending from the center to the east). The result would look and sound something like this three minute looping movie, which I built in Flash:

Whitney Music Box (chromatic version)

In this particular implementation, the music box has the bars for a 48-note chromatic scale. The pattern causes chords, ascending and descending runs and melodies to be heard.

You may notice some interesting links between the visuals and the audio, especially if you are a musician. For example, when the pattern forms a 3-arm starfish, the chords you are hearing are diminished chords, which consist of minor thirds, an interval in which the notes are 3 chromatic steps apart. The chords you hear always bear this type of relationship to the pattern you are seeing, consisting of intervals which match the arrangement of arms.

I generated the audio using my sound synthesis program, Syd, which provides a very elegant way to accomplish this kind of thing. Unfortunately, Syd is horribly supported these days (I haven’t updated the Macintosh version since before OS X). Here’s a sample Syd patch which was used to generate the audio (I actually used 3 similar patches and mixed the results together).

Update:

Here’s are some other variations. The first few assign pitches based on the harmonic series, rather than the chromatic scale (thus the dot that represents the 10th harmonic actually sounds like the 10th harmonic). In these variations, the “chords” sound like single notes with a buzzier timbre, because when you combine harmonics, you are performing a kind of additive synthesis.

Whitney Music Box (harmonic version – fundamental = 55hz)

Whitney Music Box (harmonic version – fundamental = 20hz)

The above variation uses a lower fundamental which is close to the limit of human pitch perception.

Whitney Music Box (harmonic version – fundamental = 48hz, reversed)

The above variation reverses the assignment of the pitches, so that the lower fundamentals are heard more frequently.

Whitney Music Box (harmonic version – Palindrome)

The above variation uses both forward and reverse pitch mappings at the same time, to create a palindrome effect. The oscillators with the reverse pitch mapping are 180 degrees out of phase, which causes some nodes to cancel each other out, and creates some mildly interesting filtering effects.

Whitney Music Box (chromatic version – 88 tines)

The above variation uses 88 tines in a chromatic arrangement with alternating ascending and descending notes. Because there are more bumps on the wheel, there are more notes in the sequence.

Update 4/25/06:

I’ve generated a few more variations, which you can see here. I’ve begun using STK (the synthesis toolkit) instead of Syd to generate the audio, since this is more commonly available software that will allow other folks to experiment with this type of system. I generate the audio score using a Perl script which outputs note events in the SKINI format. I use the command-line utility calico to render the audio.

Update 4/26/06:

Nyquist, the Lisp-based music language, also provides an elegant way to generate this type of music. Here’s a sample nyquist score that I used to generate variation 11.

Update 5/2/06:

https://blog.krazydad.com/2006/05/02/a-fractal/In this new post, I describe the nature of the star-fish patterns in more detail.

Update 9/22/11:

I added links to Whitney’s book in the blog post, and slightly modified the text for clarity. I changed the original Flash illustration to a GIF, so it can be viewed on IOS devices. I’ve updated the links to point to their current locations. You’ll find lots of sample code on Github.