Project Info
This project did not submit a demo video on Devpost.
Inspiration
Heart-BEATS was inspired by the need for a real-time, personalized way to help individuals manage panic attacks and anxiety. Many existing solutions offer guided meditation or generic relaxation music, but we wanted to create a system that adapts dynamically to the user’s physiological state, providing a more immersive and effective calming experience.
What it does
Heart-BEATS listens to the user’s bodily signals, specifically their heartbeat, and uses real-time signal processing to generate custom music beats. Measuring several attributes of the heartbeat enables us to estimate a user’s emotions. Heart-BEATS adjusts the music accordingly, helping to restore a sense of calm and stability.
How we built it
We integrated multiple components to bring Heart-BEATS to life: Vitals Monitoring: Capturing the user's heartbeat data using Arduino KY-039 sensors. Signal Processing: Analyzing the heart rate variations to detect stress or panic states. Sound Sample Database: A curated collection of sounds designed to promote relaxation. Custom Music Generation Software: Algorithmically generates music that syncs with the user's heartbeat. OpenAI-Guided Sample Construction: Leveraging AI-generated samples to enhance the experience.
Challenges we ran into
Ensuring accurate real-time heartbeat detection and processing. Designing music that responds naturally and effectively to physiological changes.
Accomplishments we're proud of
Successfully implementing a system that dynamically adjusts music based on heart rate. Combining signal processing and AI-driven music generation in a novel way. Providing a potential tool for individuals who experience anxiety or panic attacks.
What we learned
The importance of real-time signal processing and latency optimization. How different musical elements can influence emotional states. The potential of AI in personalized mental health solutions.
What's next
Expanding sensor compatibility to work with more wearable devices. Our current system makes use of IR pulse detection, similar to the mechanisms used in Apple Watches and other wearable devices for pulse detection. Enhancing the capabilities of our music generation models. Exploring clinical applications and potential collaborations with mental health professionals.
HeartBEAT_TreeHacks2025
Setup
conda create -n heartbeat python=3.10
conda activate heartbeat
pip install -e .
Data
mkdir data
cd data
wget https://www.hexawe.net/mess/200.Drum.Machines/drums.zip
unzip drums.zip
Run
python heartbeat_scripts/generate.py
Currently this is set up so that we can test on the simulated heart rate data.
TODO (sort of in order):
- Tune the parameters so debugging in normal mode is less painful (haven't tested much, tbh have no idea if switching beats even works since I haven't run through this for more than a minute)
- Sounds weird cuz of some thread issue maybe? Or maybe my software is just bad.
- Implement synth (just uncomment stuff in
generate.py) - Add logging/visualization for original/filtered signal (so people have some idea of how we got to our emotion)
- Make it sound good (hard)
- Update arduino-related things
Analysis
View
Metric
- 19
- 12
- 4
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- PythonIn code
- OpenAIClaimed
1 of 2 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
53 KB
Source files
15
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
shainotshy1/HeartBEAT_TreeHacks2025
24 files · 314 KB · @ 3c9a87f
Structure
Application logic
15 files · 63%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python98%
- Markdown2%
Share of indexed source by file size. Binary and vendored files are excluded.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.