Sound LabBinary-tree sonification

Follow a binary search tree branch as a musical line.

This variant keeps the Sound Lab control model but swaps the array for a balanced binary search tree. Each visited node plays its own pitch, then bends left or right depending on the branch choice.

Search invariant

Every left branch contains smaller values. Every right branch contains larger ones.

Audible cue

Left turns dip in pitch, right turns climb, and a hit resolves with a brighter overtone.

Try these targets

Use `72`, `88`, or `120` for clear hits, or `90` to hear the search fall out of the tree.

88 is larger than 64. Move to the right child and lift the phrase upward.

Search tree

Binary tree visualizer

Orange marks the active node. Gold marks the visited path.
64329616488011282440567288104120
depth 0
64
depth 1
32
depth 1
96
depth 2
16
depth 2
48
depth 2
80
depth 2
112
depth 3
8
depth 3
24
depth 3
40
depth 3
56
depth 3
72
depth 3
88
depth 3
104
depth 3
120

Sonification rules

Each visited node emits one primary tone based on its value.

Left decisions add a lower companion note.

Right decisions add a higher companion note.

Successful search resolves with an overtone; misses end low and muted.

Search trace

Step 1go right

88 is larger than 64. Move to the right child and lift the phrase upward.

Step 2go left

88 is smaller than 96. Move to the left child and drop the pitch contour.

Step 3go right

88 is larger than 80. Move to the right child and lift the phrase upward.

Step 4match

88 matches the target. The tree resolves on a bright confirmation tone.

Active path

64

Step 1 of 4. Enable audio once, then replay finished steps by hovering the trace.