Put one candle on a desk and you feel warmer. It does not light your hands, and it does not make the work go faster. Still, with a small flame moving at the edge of your sight, the work is a little better to sit with.
I wanted that inside the screen, so I made Petit Fire, a Mac app. Click the menu bar icon and a small candle light comes up in the corner of the screen. Click it again and it goes out.
A candle rather than a campfire, because this is meant to be used while you work. With a campfire, tending the fire is the experience: you split the wood, you feed it, you watch it. That is hard to do while working. A candle is different. It only has to sit there, and it colors something else you are doing.
Why I stopped drawing the flame
I drew the flame at first, and it did not work. A flame drawn on a screen comes out as a picture of a flame, however it is drawn.
What reaches you when a real candle is on the desk is less the flame than the light it throws around it. The wall warms. The edge of the desk catches. All of it moves with the sway of the wick.
So I changed what was being drawn to the light alone. What Petit Fire draws in Metal is the spread of light a flame would throw along the edge of the screen.
The sway is taken from real footage
Movement made from a formula turns out mechanical. Stacked sine waves let the period be read.
What runs now is a recording of a real flame bundled in the app, with its average brightness used as the strength of the light. Instead of a wave shaped by hand, the sway of a fire that was really burning goes straight in.
That alone was not enough. Testers called the early builds flickery. Measured, the fast component (0.95 Hz) and the slow one (0.115 Hz) carried almost the same weight.
I reweighted them toward 1/f fluctuation.
Before, three components:
- 0.95 Hz, weight 0.16
- 0.34 Hz, weight 0.26
- 0.115 Hz, weight 0.18
After, split into four with the slow side made heavier:
- 0.035 Hz, weight 0.46
- 0.11 Hz, weight 0.26
- 0.33 Hz, weight 0.13
- 0.95 Hz, weight 0.05
The slower the component, the wider it swings. That gave a movement that swells and comes back. The crackle component changed too: it used to fall away sharply in 0.12 seconds, and it now rises over 0.35 seconds and returns over 0.75.
What flickery meant was the way the speeds were shared out, not the depth of the brightness.
Keeping the sound off a fixed interval
Someone had put a recording of a wooden-wick candle into the public domain, so that is what the sound uses. The material is 62.8 seconds.
Play a short recording as a loop and it is caught in a few passes. What gets caught is not that the same sound came again, but that it came at the same interval. The moment the period shows, the sound leaves the background and steps forward.
So it is not looped. At run time the app picks a different place in the material each time, takes 20 to 35 seconds of it, and joins that with a five second equal-power crossfade. The next start has to be at least eight seconds away from the one before.
The same sounds do come around again, since there are only 63 seconds of them. What is gone is the period.
Five settings, all inside one menu
Brightness, size, place, volume, and sound on or off. I did not build a settings window. Press the menu bar icon and all of it is there.
Hunting around for the settings of an app that sits in the menu bar is itself an interruption to work. With five of them, I judged that they fit inside the menu.
What it runs on
macOS 14 or later, free, on both Apple silicon and Intel. Light it when you start, and put it out when you are done.
