Euler is an iPhone app that makes music from a walk. Each direction you can walk leads toward a different musical style, and the paths between them are transitions. A generative model blends those styles live as you move, so the route decides what you hear. Stand still and the music settles.

- A walk is a graph: stops that each carry a musical style, joined by paths. Ten times a second the conductor filters the GPS fix, snaps it to a path, and turns the position along that path into weights over the styles.
- The weights become a blend of text prompts that steers Magenta RealTime 2. The model runs on a cloud GPU and streams 48 kHz stereo back to the phone in 40 ms frames.
- If the connection drops, the app falls back to pre-rendered loops of the same styles, crossfaded on the phone by a port of the same field function, and returns to live generation when the stream comes back.
- Walks can be drawn on a map and shared as links. The walk is packed into the link itself, so there is no server storage.
Position to style space
The mapping from place to sound is what I spent the most time on. GPS under trees jumps around by several meters, and a naive mapping turns that jitter straight into the music. So the fix goes through an alpha-beta filter that rejects teleports, then a matcher that snaps it to the nearest path. The matcher is sticky. It only switches paths when another one is clearly closer, and near a junction it uses your heading to break ties. That is what stops the music flapping between two branches while you stand still.
A field function then turns the position on the path into style weights. I kept three of them in the code and compare them on the same logged walk: inverse-distance weighting over the stops as a naive baseline, a Gaussian kernel around each stop, and the one that ships, which blends along the path between its two endpoints and looks a little ahead in the direction you are walking.
The last stage couples the music to how you move. Target weights are rate-limited by walking speed, so an amble gives slow morphs and a stride gives faster ones. Stop for a few seconds and the weights freeze and the sampling temperature drops, so the texture settles in place. The conductor also sends effect settings that the phone applies (filter, delay, reverb), and a walk can tie those to the path or to which way you are facing.
Where the model runs
The first field walks, in July, ran the model on my laptop through a C++ engine on MLX, with the phone sending GPS over the local network. The store app can’t depend on a laptop, so the conductor now runs inside a cloud GPU service next to the model. The phone sends its position and heading over a WebSocket several times a second, and gets audio frames and the current weights back. Live music uses the mrt2_small model through the community PyTorch port.
The app never waits on that connection to make sound. The loops start at once, and live generation crossfades in when the first frames arrive. The cloud GPU can take up to a minute to warm up, and the loops cover that too.
Making and sharing walks
The app ships with one walk, laid out around wherever you start, with a different style about 80 meters away in each direction. Everything else is yours to draw: a walk you make can be previewed without moving, walked for real, or sent to a friend as a link.
You can also make your own: tap the map to place stops and pick a style for each from a fixed set of sixteen. Walks are saved only on the phone. Sharing one builds a link on the phone, with the walk packed into a few hundred bytes after the “#” of a dylancantor.com/euler/w link. Browsers don’t send that part of a URL to the server, so the site never receives the walk. If Euler is installed, the link opens it in the app. If not, a page on this site decodes the walk in the browser, with the same codec the app uses, and draws its shape.
A link carries the walk’s shape, not where it is: stop positions are stored in meters relative to the first stop. The real location goes into the link only if you choose to pin the walk to a place, and the app asks you to confirm before sharing it.
What happens to your location
Euler needs your location to work, and it sends it to the music server in real time. That is what steers the music. The server uses it to choose the blend and does not store it. There are no accounts, ads or analytics. The privacy policy has the details.
Credits
Music generation: Magenta RealTime 2 by Google DeepMind. Model weights are licensed under CC BY 4.0 and code under Apache 2.0. Live music uses mrt2_small through the magenta-community PyTorch port, run unmodified. The offline loops were rendered with mrt2_base from Euler’s style prompts.
Support
Questions, bugs or feedback: [email protected]. I read everything.
To report a problem, email me what you were doing when it happened, which walk you were on, your iPhone model and iOS version, and the app version from About in Euler.
- No sound: tap the “Tap for sound” pill at the top of the screen. iOS needs a tap before web audio can start.
- Live music needs an internet connection. Without one, Euler plays offline loops and says so.
- Keep Euler open while you walk. It stops when the phone locks.
React Native · Expo · TypeScript · Python · Magenta RealTime 2 · PyTorch · WebSocket · MapKit