Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code.fm

Infinite AI-generated focus music for coding. Tracks are generated on-the-fly using an ACE-Step API, creating a never-ending playlist of instrumental music.

image

How it works

  • Press play to generate your first track
  • When the most recently generated track is ~45 seconds from ending, the next one is automatically queued for generation
  • Browsing older tracks won't trigger new generations — only the latest track does
  • Generated audio is cached locally so your library survives restarts

Setup

npm install

Create a .env file (or export env vars):

ACE_API=http://<your-ace-step-host>:8008
ACE_TOKEN=              # optional, if your API requires auth
PORT=3000               # optional, defaults to 3000

Usage

npm start

Open http://localhost:3000.

Keyboard shortcuts

Key Action
Space Play / Pause
Arrow Left Previous track
Arrow Right Next track
Arrow Up Volume up
Arrow Down Volume down
M Mute / Unmute

Customizing prompts

Edit prompts.json to change the music styles. Each entry has:

{
  "prompt": "genre tags and descriptors",
  "bpm": 85,
  "key_scale": "C Minor",
  "audio_duration": 180
}

Built with Claude

This project was generated with Claude Code (Anthropic's Claude). The code, structure, and this README were all written by Claude.

Project structure

server.js          Express server, proxies ACE-Step API, caches audio
prompts.json       Music generation prompt pool
public/
  index.html       Page markup
  style.css        Styles
  app.js           Client-side player logic
cache/
  tracks.json      Persisted track metadata
  audio/           Cached mp3 files

About

Infinite coding music using a local ACE-Step API

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages