Building a Music Player 🚀: AMP Lessons + Offline AI (2026)16 min read3,215 words

Building a Music Player 🚀: AMP Lessons + Offline AI (2026)

Learn how to build a music player with an offline music player approach—plus Zig programming language lessons and AI-assisted coding tips for software maintainability.

building a music playeroffline music playerZig programming languageAI-assisted codingsoftware maintainability
Building a Music Player 🚀: AMP Lessons + Offline AI (2026)

How Not to Build a Music Player - and What AMP Taught Me

Building a music player sounds like a manageable hobby project: read audio files, add playback controls, show your library, and make the interface look right. The part that usually trips people up isn't getting the first version on screen. It's picking a scope you can actually finish, making choices you can live with, and keeping the codebase sane as the project grows.

I started AMP after an internet blackout made online music services unreliable where I live. I wanted an offline player with a small feature set, lyrics I could sing along with, system integration that felt native, and an implementation in Zig. Then life happened - and AI coding tools pushed the project into code I couldn't really review. I ended up rebuilding a lot by hand.

That sequence taught me more than a clean "build it from scratch" story would have. This isn't a blueprint for the perfect music player. It's a practical account of how constraints shape what you ship, why "hobby scope" matters more than people think, and what happens when generated code runs faster than your ability to understand it.

Why build an offline music player?

AMP started with a failure mode, not a shiny feature idea. During the Twelve-Day War, internet access was cut across the country. Online music players weren't a reliable option. When the connection came back, I started archiving tracks and looking for something that could play them locally.

Strawberry worked and kept me happy for a while. The problem was lyrics. I like reading them while listening and singing along, but Strawberry sometimes showed lyrics without line-level synchronization. It also presented timestamps in a way that pulled my attention away. It's a small UX complaint - but small annoyances add up. Eventually they make you try something else.

A friend pointed me to foobar2000 while I was working on this. I hadn't known about it before. And honestly, that's a useful detail: building your own tool isn't always the result of exhausting every existing option first. Sometimes you build because your current setup is annoying, and only later you learn there were alternatives. That doesn't mean the project is pointless - it just means you should be clear about what you're trying to learn or solve.

Treat connectivity as a product constraint

If you have stable internet, online playback is convenient. If you don't, it turns into a single point of failure. An offline library changes the dependency: once your tracks are stored locally, playback doesn't require a service to be available at the exact moment you want music.

This applies beyond music. If an app gets used in places with unreliable connectivity, offline behavior isn't a "nice to have." It affects what you store locally, how updates work, and what the app should do when it reconnects. Those choices come with costs, so they should match an actual user need - not just a generic preference for "offline-first."

During a later blackout, getting internet required costly workarounds, including personal white SIMs, whitelisted servers, and Starlink dishes. I spent hundreds of dollars across different methods to stay in touch and keep working on personal projects. At one point, a single gigabyte could cost $5 or more. In that setting, carefully downloading repositories and documentation wasn't background admin - it was part of the engineering process.

Let the actual annoyance define the first problem

AMP wasn't meant to replace every music app. The initial goal was narrower: a local player with a minimal feature set and a better lyrics experience. Keeping that distinction matters. If you start with "this one workflow annoys me" and then immediately add every feature you've seen in existing players, you turn a focused experiment into a long-term product commitment you can't realistically maintain.

So the lesson isn't "every annoyance deserves a custom app." It's: be honest about why you're building. Are you solving a recurring personal problem? Learning a language? Exploring UI work? Eventually serving other users? Those goals can overlap, but they imply different choices about scope, polish, platforms, and maintenance.

How should you scope a hobby software project?

My goals for AMP were deliberately specific: a minimal feature set, no C++ dependencies, proper system integration so it felt native, and an implementation in Zig - including the shaders. I also planned to build the UI myself, partly because I'd enjoyed working on V's UI when I was getting into system programming.

Those goals aren't just "features." They're constraints on dependencies, language, integration, and the type of work I wanted to do. That helps a hobby project, because motivation matters. But every constraint also removes ready-made components from the menu. Choosing Zig and writing a custom UI can make the project more interesting, but it also increases the amount of foundational work you have to do.

Separate product requirements from learning goals

Before writing code, split the project into two lists:

  • User requirements: what someone needs the finished application to do.
  • Learning requirements: what you want to understand by building it yourself.

For AMP, local playback and useful lyrics belong in the product problem. Using Zig and implementing a custom interface are partly learning and craft choices. Neither category is "less valid." The risk is pretending a learning goal is a user requirement and then treating the extra engineering work like it's unavoidable product scope.

This separation makes trade-offs easier to see. If you want to learn Zig, leaning on a mature library written in another language can undercut the point. If you want to ship a dependable player quickly, avoiding every dependency can work against that goal. You don't have to optimize for speed in a hobby project - but you should know when you're choosing the slower path on purpose.

Write a boundary, not just a wishlist

A useful scope doc should spell out what the first release won't do. For AMP, that meant focusing on a local library, playback controls, and a lyrics view - while delaying things like remote music servers, mobile clients, and broad packaging work.

That boundary keeps the core experience from getting buried under features that multiply the work. A music server shifts the project into a client-server system with all the network and synchronization problems that come with it. Android support means an expanded platform surface and a different interaction model. Packaging for multiple Linux distributions adds release steps and ongoing compatibility worries. Each addition can be reasonable, but nothing is free just because it looks good on a roadmap.

A practical test: if you repeat a decision 100 times, what happens? One custom integration might be fun. Supporting multiple platforms, formats, and distribution channels creates recurring work. If you're the only maintainer, that cost eventually comes out of either time you could spend improving playback - or time you could spend just enjoying the project.

Keep an assumption log

For decisions that might be hard to reverse, write down the assumption and what it costs. Why avoid a dependency? Why build the UI from scratch? Which platforms matter now? What does "native" mean for the first release?

A short note is enough. The point is to make future changes easier to justify. When a new requirement appears, you can revisit your reasoning instead of defending an old decision forever. Hobby projects benefit from flexibility - but flexibility works better when you can see which choices were deliberate and which were just accidental momentum.

What did AI-assisted coding get wrong for AMP?

Once connectivity was mostly back to normal, I started paying more attention to large language models. I hadn't used them seriously for coding before, but my boss had given me a Claude Max 20x subscription in 2025, and it was just sitting there. I decided to try it on AMP.

The experience was... hard to stop. I could prompt for hours without hitting the plan limits, and a big chunk of the project was generated over a few nonstop days. At the time, I told myself it was fine for a hobby. I'd review everything later and clean it up.

That plan didn't survive contact with reality. I couldn't meaningfully review tens of thousands of lines of unfamiliar code. The issue wasn't that every generated line was "wrong." The issue was volume and complexity: there was more than I could verify. Code that runs doesn't automatically mean you understand it, can maintain it, or can confidently change it later.

The hidden cost is review capacity

AI coding tools reduce the effort needed to produce code. They don't remove the need to decide whether the code belongs in your system.

In practice, the bottleneck moves from typing to reviewing, integrating, and debugging. That trade-off is manageable if the output stays small and you can validate it easily. A narrow transformation, a small test scaffold, or a mechanical edit can save time - if you still inspect what it produced.

It gets harder when a tool generates a broad feature across unfamiliar parts of your codebase. You might get a working result faster, but then you inherit architectural decisions, abstractions, error handling, and dependencies you didn't consciously choose.

I was also reminded that tools and services aren't guaranteed to remain available. Anthropic banned my account after determining that I lived in Iran. Around the same time, Codeberg announced a no-AI policy, which forced a choice: delete the generated work or move the repository. I chose to remove it. That was specific to my situation, but the risk is general: if your workflow depends on a service or platform, access policies can change and break your plan.

Use AI as an IDE feature, not an owner

What's worked better for me is treating an LLM like an IDE feature: something that helps with bounded tasks, similar to a long search-and-replace or a regex refactor you'd otherwise avoid. The human sets the goal, checks the scope, and verifies the diff.

That doesn't magically make AI use safe. It just keeps the review obligation visible. Before you ask the model to change code, define what should change and what must stay untouched. Afterward, inspect the diff, run the relevant checks, and make sure you can explain what it did without leaning on the model's narrative.

If you can't explain the code well enough to modify it later, you haven't finished the task. You've just moved the work into future maintenance. That may be a reasonable trade for a prototype you'll discard soon. It's a bad default for a project you expect to keep using.

How do you recover an overgrown codebase?

After I decided to remove the AI-generated work, I started reading the code line by line and rewriting it. That process took four months. Nearly half the codebase disappeared, and somehow the app became more robust - without losing features. If anything, it started behaving more consistently.

I can't give you a dramatic before-and-after code example, because I didn't keep a usable pre-rewrite history, and my memory of specific changes is imperfect. What I can point to is the outcome and the process. Removing code wasn't a cosmetic cleanup. It reduced what I had to reason about, and it forced me to understand how the application actually worked.

Start with behavior, not a rewrite target

When a codebase feels overgrown, "rewrite everything" is a risky plan. First, identify the behavior you need to keep working. In a music player, that might mean loading your local library, selecting a track, controlling playback, and displaying lyrics. The exact list depends on your product - but it should describe observable behavior, not internal architecture.

Then work through the system in small units:

  1. Find a component you can describe clearly.
  2. Trace the inputs and outputs it handles.
  3. Check what depends on it before you touch it.
  4. Rewrite or remove the smallest useful unit.
  5. Test the behavior you want to keep.
  6. Repeat, adjusting as you learn more.

It's slower than accepting a big generated refactor in one go. It's also easier to debug, because each change has a limited "blast radius." If a test fails or an interaction breaks, you have fewer possible causes to investigate.

Remove code when it does not earn its place

Deleting code is tempting to treat like a last resort - especially when you already spent time building a feature. But every abstraction and dependency has a carrying cost. It adds something you have to understand during debugging, upgrades, and future changes.

A better question than "does this look sophisticated?" is: does this code solve a real problem here, and is the complexity justified? Sometimes the answer is yes. An abstraction might prevent repeated mistakes or keep a boundary clean. Sometimes the simplest implementation is easier to verify and maintain.

This isn't an argument against architecture. It's an argument that architecture should earn its cost. In AMP's rewrite, removing a large amount of code made the app more robust without cutting features. Code volume and capability aren't the same thing.

Preserve the reason for each change

A rewrite gets safer when you can explain what each step is accomplishing. Keep changes small enough to review, and write down decisions while they're still fresh. Use tests where they help protect behavior, but don't treat a passing test suite like proof that every design choice was sound.

Time matters. Rewriting by hand takes time, and a project with deadlines or many users may require a more incremental migration. In my case, AMP was personal, so I could afford a slow, thorough cleanup. For a production system, you might isolate one module, replace it behind a stable interface, and roll it out in stages. The underlying principle is the same: keep the behavior visible, and keep the amount of unreviewed change small.

What belongs in a music player's first release?

A first release should prove the core experience is reliable. For AMP, that meant treating the local library, playback, controls, and lyrics as the center of the product - not the base layer for an endless feature list. A good v1 isn't a promise that every roadmap item is already planned in detail. It's a version people can use, and you can maintain.

The interface and system integration matter because people use a player repeatedly, often while doing something else. A feature-rich app can still feel awkward if common actions are hard to reach or if the interface doesn't fit the environment it runs in. On the flip side, a minimal feature set isn't an excuse to miss basic reliability. "Minimal" should mean fewer responsibilities, not missing essentials.

Put roadmap items behind explicit gates

AMP's roadmap includes a music server, Android and Windows support, and packaging for major Linux distributions. These are all reasonable possibilities - but they're different kinds of work:

  • A music server changes the architecture and introduces network and synchronization questions.
  • Android and Windows support adds platform surface area and may require adapting the interface and integration points.
  • Distribution packaging adds release processes and ongoing compatibility maintenance.

Before starting each item, ask what user problem it solves, who will maintain it, and what it will delay. If the answer is mostly "it would be cool," that might still be fine for a hobby. Just don't imply the project needs it to be useful today.

Make feedback actionable

Asking for suggestions is helpful when you're ready to evaluate them against your project goals. Without a filter, feedback becomes an unordered list of requests. A simple decision rule helps: accept a suggestion when it fits the core use case, matches the project's constraints, and you can point to who (including future-you) will maintain it.

That rule might mean postponing something popular. It might also mean accepting a feature you didn't expect, if real users keep hitting the same problem. The goal isn't to freeze everything. It's to connect each change to a user need and to the cost of supporting it.

Key takeaways

  • Build for a real constraint. AMP started because online music was unreliable, not because I wanted features for their own sake.
  • Separate user needs from learning goals. Both are valid, but they lead to different trade-offs.
  • Keep AI-generated changes within your review capacity. If you can't understand the diff, the work isn't actually done.
  • Treat deletion as a design tool. Less code can mean fewer ways for the system to fail.
  • Make roadmap work earn its place. Every platform and service is ongoing maintenance, whether you planned for it or not.

Conclusion

AMP began as a response to a real connectivity problem, and it turned into a lesson about scope, maintainability, and the limits of generating fast code. The biggest shift wasn't adding a clever feature. It was getting the codebase back to a size and shape I could understand.

If you're starting something similar, define the user problem, set clear boundaries, and keep your implementation work small enough to review. Pick tools that support the project you actually want - not the one a roadmap or coding assistant makes tempting. A hobby doesn't have to be rushed to be worthwhile.

Frequently Asked Questions

A custom player can make sense when it addresses a specific unmet need or serves as a learning project. It is not automatically better than established software. In my case, offline reliability and a less distracting lyrics experience motivated AMP, while using Zig and building the interface were also personal engineering goals.
It depends on what you are optimizing for. Zig suited AMP’s goal of exploring the language and avoiding C++ dependencies, but those constraints also shaped the implementation choices. If your priority is shipping quickly or supporting many platforms, compare available libraries and tooling before committing to a language for the sake of novelty.
They can be useful when the task is bounded and the output is reviewable. The risk does not disappear because the project is a hobby: code you cannot understand still creates future maintenance work. Use the tool to assist with a change, not to make architectural decisions you are unable to inspect.
Start by listing the user-visible behaviors that must remain. Then trace and change one small component at a time, checking the relevant behavior after each step. Avoid a large rewrite unless the project’s context gives you room to absorb the risk and time required.

Related articles