Research Prototype · Android

Adaptive
MusicDrive

Smartphone-based adaptive music for driving support

AdaptiveMusicDrive is an Android research application that acquires vehicle speed using smartphone GPS, obtains road speed-limit information from OpenStreetMap-based data, and adapts music playback to the driving condition.

Experiment condition
No music
Fixed tempo (80 BPM)
Adaptive
Speed: 42.3 km/h
Speed limit: 50.0 km/h
Δv: 7.7 km/h
Road: Example Road
Music: 80 BPM
START STOP
Overview

Adaptive music presentation based on driving context

This project investigates a smartphone-based system that changes music presentation according to the relationship between the current vehicle speed and the road speed limit. The present implementation is designed as a research platform for controlled experiments and real-road feasibility evaluation.

GPS-based sensing

The smartphone acquires position, vehicle speed, and GPS accuracy using Google Play Services Location.

Road context

MapLibre is used for map display, while OpenStreetMap-based road information is used to obtain speed-limit data.

Experimental logging

Driving condition, GPS data, speed, speed limit, selected BPM, and music switching events can be recorded in CSV format.

Smartphone GPS
Vehicle Speed & Position
OSM Speed Limit
Driving-State Classification
Music Playback & CSV Logging
Experiment Modes

Three conditions for controlled evaluation

The application provides three selectable experimental conditions. During a real-road experiment, the condition can be selected before the experiment starts.

1

No Music

No music is played during the experimental run.

2

Fixed Tempo

Music assigned to a fixed tempo category is played throughout the experimental run. The current condition uses 80 BPM.

3

Adaptive

The music tempo is selected automatically from 60, 80, and 120 BPM categories according to the current driving state.

Δv = road speed limit − current vehicle speed
Driving condition Selected tempo
Δv ≥ 10 km/h 120 BPM
5 km/h ≤ Δv < 10 km/h 80 BPM
Δv < 5 km/h 60 BPM
The current thresholds and tempo categories are experimental settings. They should not be interpreted as universally optimal tempo values for driving.
Music Files

Experiment-specific audio can be supplied separately

Audio files are not included in the source-code repository. For controlled experiments, researchers can place fixed MP3 files in tempo-specific asset directories.

Recommended project structure:

app/src/main/assets/
├── bpm60/
│   ├── song01.mp3
│   └── ...
├── bpm80/
│   ├── song01.mp3
│   └── ...
└── bpm120/
    ├── song01.mp3
    └── ...
Download

Source code

AdaptiveMusicDrive is managed on GitHub. Clone the repository and open the project in Android Studio.

Clone with SSH:

git clone git@github.com:YoshiyukiKido/AdaptiveMusicDrive.git
Documentation

Research and technical information

Development and Preliminary Evaluation of a Smartphone-Based Adaptive Music System for Driving Support Research paper describing the system concept, Android implementation, and preliminary real-road feasibility evaluation.
CSV experimental logging Logs may include date/time, experimental condition, GPS coordinates, GPS accuracy, vehicle speed, road speed limit, Δv, BPM, music file, playback event, road name, and speed-limit source.
Research use Controlled experiments may compare No Music, Fixed-Tempo Music, and Adaptive Music conditions. Human-participant studies should follow the applicable ethics-review and informed-consent procedures.
License

MIT License

The AdaptiveMusicDrive source code is released under the MIT License. Audio files are not covered by the software license unless explicitly stated.

Project

AdaptiveMusicDrive

Yoshiyuki Kido
Faculty of Business Data Science, Kansai University