I built a telemetry-aware music engine, then tried to disprove what I felt
What driving research knows about music, what a system may build on it, and why subjective improvement is not objective evidence.
On a long highway, attention can graze.
The car stays in its lane. You brake, overtake, follow the road. Later, little of it remains in memory. The task continues while attention quietly moves elsewhere.
I built an open-source system that starts from this condition. Longplay reads live telemetry from the car and changes the upcoming Spotify queue with the drive. It does not select one genre and mood at departure. It follows the trajectory over time. Pace, traffic, ETA, region, journey phase, the light outside, and moments such as a border crossing or the release after a traffic jam.
Then I drove roughly 4,000 kilometers from Germany to southern Spain and back with my family, a trailer, and an electric car. I came home convinced that the system had changed the experience of the drive.
That conviction is where the problem begins.
The highway as pasture
Driving without much conscious attention is familiar enough to have acquired several names. In 1991, J. S. Kerr formalized one version as Driving Without Attention Mode: a state in which the operational parts of driving continue while attention becomes detached from the task.
Research into sustained attention predates that terminology. In his 1948 vigilance experiments, Norman Mackworth asked participants to watch a pointer moving around a blank dial and detect rare irregular jumps. Detection performance declined over time, with a substantial part of the loss appearing after the first half hour.
An empty highway is not a laboratory clock. It contains more variation, higher stakes, and continuous control. But both tasks can combine long periods of predictable input with rare events that suddenly matter.
Later simulator research distinguished between active fatigue from overload and passive fatigue from underload. In two studies, Saxby and colleagues found that a passive, highly automated driving condition reduced task engagement and slowed emergency responses. Crash probability also increased in that condition. This does not reproduce ordinary highway driving, but it demonstrates how low engagement can impair responses without requiring the driver to feel conventionally exhausted.
Monotony can produce measurable performance loss.
When the task no longer occupies attention, the mind tends to supply its own material. In a responsibility case-control study of 955 crash-involved drivers, Galéra and colleagues found that highly distracting mind-wandering reported immediately before the crash was associated with responsibility for that crash, with an adjusted odds ratio of 2.12. The authors also noted important limitations, including retrospective self-report and uncertainty about temporal sequence.
It is an association, not proof that mind-wandering caused each crash. It is still enough to make the underlying question worth asking.
If monotony allows attention to drift, can a changing setlist make a drive feel more engaging without becoming another distraction? And how would I distinguish an actual effect from the convincing feeling of one?
The drive
The route ran from Germany's Ruhr area through France to San Sebastián, then via Pamplona to Málaga and back. There were many charging stops, several overnight stays, two children in the rear seats, and a wide range of driving conditions.
The trip was not an experiment. It was observational material from one person who had also built the system being observed.
Night drives felt more relaxed. Music connected to the region made crossing countries feel more distinct. In traffic jams, the selection seemed to lower aggression and make the situation easier to tolerate.
Those are three observations, and all three depend on the word felt.
The system reaction itself is more concrete. When recent telemetry snapshots show increasing route delay and stop-and-go movement, deterministic rules change the musical brief. The ranking gives more weight to familiar, contextually fitting candidates and less to novelty. When the congestion clears, a cooldown-guarded traffic-release event can lift the energy of an upcoming slot. The current song is not interrupted.
Approaching San Sebastián, the coarse region became part of the brief. That activated regional and local-language sources, so music connected to the place entered the candidate pool. Raw coordinates were converted into a coarse region on the server and discarded. The language model never received them.
In simplified form, the path looks like this:
Tesla Fleet API, read only
|
v
recent telemetry snapshots
|
v
pace trend + ETA trend + journey phase + moments
|
v
deterministic musical brief
|
v
candidate generation at the edge
|
v
Spotify resolution + deterministic scoring
|
v
append-only playback queue
Candidate ordering is also explicit rather than delegated to a model:
total =
confidence * w.confidence +
contextFit * w.contextFit +
telemetryFit * w.telemetryFit +
tasteFit * w.tasteFit +
diversityGain * w.diversityGain +
novelty * w.novelty -
fatiguePenalty * w.fatiguePenalty;
The weights shift with the journey context, but the calculation remains deterministic and testable. That is what I mean when I say the music reacts to the drive. Whether this reaction improves anything beyond the experience is a separate question.
What the research supports
The strongest match with my own observation concerns congestion.
In a field study, Wiesenthal, Hennessy and Totten randomly assigned commuters either to listen to their preferred music or to avoid music and talk radio. Self-selected music appeared to limit reported driver stress in highly congested traffic, while making little difference under low congestion.
This supports a narrow statement: preferred music may change the experience of a frustrating commute. It does not establish better attention or safer driving.
Music characteristics also matter. In an anger-inducing simulator study with 100 participants, van der Zwaag and colleagues compared combinations of musical energy and valence. Anger was highest with high-energy, negatively valenced music compared with positive music, while physiological measures also differed between conditions.
A context-sensitive system therefore cannot treat all music as a generic calming stimulus. Energy, valence, familiarity, and the situation interact.
The regional observation is harder to support. A well-known supermarket field study by North, Hargreaves and McKendrick found that French and German background music shifted wine purchases toward products associated with the respective country. Customers generally did not report being aware of that influence.
That finding concerns product choice in a supermarket, not driving comfort. I use it only as an analogy for context congruence: music may activate associations that color how a place is experienced. There is no evidence here that Basque music makes driving through the Basque Country better or safer.
The night
The night drives on the trip felt calm. There was less traffic, fewer lane changes, and less visual activity. That reduced the experienced workload.
It did not remove the physiological risk associated with night driving.
In a study of 679 sleep-related accidents, Horne and Reyner found peaks around 2 a.m., 6 a.m., and 4 p.m. Sleep-related accidents accounted for 16 percent of police-attended accidents on major roads in southwest England and more than 20 percent on the motorways examined in the Midlands.
Those figures describe particular roads and datasets, not a universal rate. They nevertheless show how strongly sleep-related accidents can cluster by time of day and road type.
Using Swedish accident, traffic-flow, and time-use data, Åkerstedt and Kecklund found a night-time odds ratio of approximately five for drivers aged 18 to 24 compared with the forenoon. The increase was smaller for older drivers.
The apparent contradiction is not difficult to resolve. A quiet road can feel less stressful while simultaneously providing ideal conditions for passive fatigue and meeting a circadian low.
Feeling more relaxed is not evidence of being safer.
"Felt" is the important word
In 1998, Reyner and Horne tested two common in-car responses to sleepiness: cold air and self-selected radio.
Sixteen young adults slept for only five hours the night before and then completed a monotonous 2.5-hour simulator drive. After 30 minutes they received cold air, radio, or no treatment.
Across the drive, neither radio nor cold air produced a significant overall reduction in lane-crossing incidents. EEG measures showed no significant effect. Radio did, however, reduce self-reported sleepiness during much of the session, and there was a temporary trend toward fewer incidents.
This was a small simulator study under specific sleep-restriction conditions. It does not prove that music can never affect fatigue or driving performance. A non-significant result is not evidence that every possible effect is absent.
What the study does demonstrate is a discrepancy that product builders should take seriously. An experience can improve subjectively without the objective indicators improving alongside it.
Music may change the experience of fatigue without reliably changing the underlying impairment. In the worst case, feeling more alert could encourage someone to continue driving when stopping would be the better decision.
That is the skepticism I have to apply to my own 4,000 kilometers. The fact that the system felt convincing makes measurement more necessary, not less.
What follows for the system
The first design consequence is to use trajectories rather than snapshots.
Longplay reads recent telemetry as a time series. It derives whether pace is accelerating, slowing, or steady; whether the ETA is approaching; and where the drive sits between departure, cruise, golden hour, a rest stop, and arrival.
A single speed value says little. Several minutes of slowing combined with increasing route delay may indicate congestion. A falling ETA combined with a phase transition provides a useful cue for the shape of the remaining setlist.
The second consequence is to limit what the system can change.
Longplay alters the media environment.
Changing which songs play is still an intervention, but it stops right at the speakers. Longplay has no control over steering, speed, braking, Autopilot, volume, or vehicle settings the access is strictly read-only.
The system changes media exposure, not vehicle controls.
This distinction limits its authority. It does not eliminate the need to evaluate distraction or unintended effects, and it does not turn music selection into driver assistance.
The third consequence is to keep the central decisions inspectable.
Deterministic code derives energy, mood, journey phase, candidate roles, ranking, diversity, and no-repeat constraints. The language model receives an abstract musical intent and proposes catalog candidates. Spotify resolution then checks whether those tracks are actually available. The model never decides whether the car is in a dangerous state, and it never receives raw coordinates, a VIN, or the user's complete music library.
Each song also receives a role such as anchor, momentum, bridge, surprise, or resolution. The setlist has an opening and an arrival rather than behaving like an endless shuffle.
Two small studies influenced the Familiar/Discover control, although neither establishes an effect in real-world driving. Fontaine and Schwalm found better detection performance with familiar music in a 35-person vigilance task. Feng and Bidelman associated familiar music with faster responses and less reported mind-wandering during a lexical task. These findings made familiarity a useful user-controlled variable. They did not justify a vigilance promise.
The charging stop
Having driven electric across Europe for seven years, frequent charging stops are routine to me. What intrigues me is how this enforced rhythm intersects with driver fatigue research.
The stops occurred because of range and charging speed, not because I had correctly diagnosed my own fatigue. Yet they repeatedly interrupted long driving sessions that a combustion-engine driver might have continued.
There is evidence that the type of break matters. In a simulator study, Watling, Smith and Horswill compared a 15-minute nap with a 15-minute active rest break after two hours of driving. The nap reduced physiological and subjective sleepiness. The active break produced an immediate subjective improvement but did not reduce EEG-defined sleepiness. The study found no difference between the breaks on its driving-performance measure.
There is much less evidence connecting electric-vehicle charging cadence to driver fatigue. Chen and colleagues incorporated synchronized charging and resting into a network-equilibrium model. Their model assumes that charging time can contribute to fatigue mitigation. It does not empirically demonstrate that EV drivers are more rested or crash less often.
The idea remains plausible and unproven.
Longplay treats a detected charging stop as the end of one journey leg. After charging, the musical arc starts again rather than dragging the previous finale into the next stretch. That is a dramaturgical decision informed by the structure of the trip, not a safety feature.
Limits, spoken aloud
Longplay is a comfort feature. It is not a safety system or a driver-assistance system, and it makes no claim to improve attention, cognitive load, or driving performance.
It cannot make a tired driver fit to continue. It cannot make a night drive safe. It cannot infer that a calmer experience means a safer one.
What it can do is expose its own decisions. Candidate scores include context fit, telemetry fit, taste fit, diversity gain, novelty, and repetition penalties. Journey signals and moment triggers can be recorded alongside those decisions, making it possible to ask why a particular track entered the queue.
No controlled behavioral effect has been measured so far. The current evidence is approximately 4,000 kilometers of one developer using his own system. That is useful product experience, but it is not efficacy evidence.
A serious experiment would need explicit consent, privacy-preserving logging, multiple drivers, and a control condition. It could compare the adaptive system with a shuffled or static playlist while observing predefined measures such as acceleration variance, speed variability, recovery after congestion, subjective stress, and possibly validated attention or workload measures.
The protocol would also need to account for route, weather, traffic, time of day, driver, passengers, musical preference, and the possibility that novelty disappears as the system becomes familiar.
The repository does not answer that question. It makes the question easier to formulate and the system easier to inspect.
The consequence
This problem extends beyond music in cars.
Focus applications promise concentration but often measure satisfaction. Wellness trackers can produce a feeling of control without demonstrating a corresponding health outcome. Adaptive interfaces may feel more helpful while their evaluation relies entirely on self-report.
Subjective improvement is still valuable. Comfort, enjoyment, and a sense of narrative can be legitimate product outcomes. The problem begins when those outcomes are relabeled as objective performance or safety effects without measuring them.
That distinction matters more as systems become context-aware. The more convincingly a product adapts to a person, the easier it becomes to mistake responsiveness for efficacy.
Longplay can make a drive feel composed rather than shuffled. That is already an interesting result. Whether it changes anything about the way people drive remains an open question.
Music may accompany the drive. It must not pretend to lead it.
Project: Longplay, MIT licensed, self-hosted, and single-user. The deterministic curation core is written in TypeScript. Tesla Fleet API access is read-only, and the language model is restricted to candidate generation at the edge.
References
- Åkerstedt, T., & Kecklund, G. (2001). Age, gender and early morning highway accidents. Journal of Sleep Research, 10(2), 105-110.
- Chen, Z., Deng, Y., Xie, C., Guan, C., & Pan, T. (2023). Network equilibrium of battery electric vehicles considering drivers' resting behavior. Transportation Research Part C, 155, 104305.
- Feng, S., & Bidelman, G. M. (2015). Music familiarity modulates mind wandering during lexical processing. Proceedings of the 37th Annual Meeting of the Cognitive Science Society.
- Fontaine, C. W., & Schwalm, N. D. (1979). Effects of familiarity of music on vigilant performance. Perceptual and Motor Skills, 49(1), 71-74.
- Galéra, C., Orriols, L., M'Bailara, K., et al. (2012). Mind wandering and driving: responsibility case-control study. BMJ, 345, e8105.
- Horne, J. A., & Reyner, L. A. (1995). Sleep related vehicle accidents. BMJ, 310(6979), 565-567.
- Kerr, J. S. (1991). Driving without attention mode: a formalisation of inattentive states in driving. In Vision in Vehicles III, 473-479.
- Mackworth, N. H. (1948). The breakdown of vigilance during prolonged visual search. Quarterly Journal of Experimental Psychology, 1(1), 6-21.
- North, A. C., Hargreaves, D. J., & McKendrick, J. (1999). The influence of in-store music on wine selections. Journal of Applied Psychology, 84(2), 271-276.
- Reyner, L. A., & Horne, J. A. (1998). Evaluation of in-car countermeasures to sleepiness: cold air and radio. Sleep, 21(1), 46-50.
- Saxby, D. J., Matthews, G., Warm, J. S., Hitchcock, E. M., & Neubauer, C. (2013). Active and passive fatigue in simulated driving. Journal of Experimental Psychology: Applied, 19(4), 287-300.
- van der Zwaag, M. D., Fairclough, S., Spiridon, E., & Westerink, J. H. D. M. (2011). The impact of music on affect during anger-inducing drives. In Affective Computing and Intelligent Interaction, 407-416.
- Watling, C. N., Smith, S. S., & Horswill, M. S. (2014). Stop and revive? The effectiveness of nap and active rest breaks for reducing driver sleepiness. Psychophysiology, 51(11), 1131-1138.
- Wiesenthal, D. L., Hennessy, D. A., & Totten, B. (2000). The influence of music on driver stress. Journal of Applied Social Psychology, 30(8), 1709-1719.
Top comments (0)