AI

I Wanted to Turn Audio Into MIDI Without Uploading My Music to the Cloud

So I built Atomik Audio to MIDI — a free, local tool that extracts melodies, drums, basslines, and stems from audio using open-source AI.

12 min read

Sometimes I hear something in an audio file and immediately think:

I want that in MIDI.

Maybe it’s a bassline I recorded months ago.

Maybe it’s a melody played on an instrument.

Maybe it’s a drum groove.

Maybe it’s an old bounced track where I no longer have the original project.

Audio is great when you want to listen.

MIDI is better when you want to change things.

Once something becomes MIDI, I can:

  • change the instrument
  • edit individual notes
  • transpose it
  • quantize it
  • change the rhythm
  • rearrange the part
  • use it to trigger another synth
  • analyze what was actually played

The problem is getting from one to the other.

There are plenty of online tools that promise to convert audio into MIDI or split a song into stems.

But that usually comes with a familiar workflow:

upload the track → wait → process → download

For released music, maybe that’s fine.

For an unreleased track, demo, vocal, or client project, I don’t necessarily want to send the audio to a random server just to extract a few notes.

So I built Atomik Audio to MIDI.

It runs locally.

It is open source.

And it combines two open-source AI tools I already liked:

Spotify’s Basic Pitch for melodic transcription and Meta’s Demucs for source separation.

The result is a small music-production utility that can turn audio into editable MIDI and separate full mixes into stems without requiring a cloud service.

Audio and MIDI Solve Different Problems

Audio records the sound itself.

MIDI describes musical events.

A MIDI file can contain information such as:

  • which note was played
  • when the note started
  • how long it lasted
  • velocity
  • timing

That’s why MIDI is so useful inside a DAW.

If I have an audio recording of a bassline, I can process the sound.

But I can’t simply drag one note somewhere else.

If I have the same bassline as MIDI, I can replace the instrument completely.

I can turn an electric bass into a synth.

Move the entire part up an octave.

Correct one note.

Change the rhythm.

Use the notes to layer another instrument.

That makes audio-to-MIDI transcription especially interesting for music production.

The goal isn’t necessarily to perfectly reconstruct the original recording.

Sometimes I just want to recover the musical idea inside it.

Melodies, Chords, and Basslines

For melodic material, Atomik Audio to MIDI uses Basic Pitch, an open-source audio-to-MIDI system originally developed by Spotify.

The tool analyzes the audio and estimates the notes that are being played.

That makes it useful for things like:

  • melodies
  • basslines
  • piano parts
  • guitar ideas
  • synth lines
  • chordal material

The resulting MIDI can then be imported back into a DAW.

Imagine I have a bass recording:

bass-recording.wav

After transcription, I can get:

bass-recording.mid

Now the performance is no longer tied to the original sound.

I can load that MIDI into Reason, Ableton, FL Studio, Reaper, Logic, Bitwig, or whatever DAW I’m using and assign a completely different instrument.

That’s the part I find most useful.

Audio becomes editable musical information.

But Drums Are a Different Problem

Melodic transcription and drum transcription aren’t quite the same thing.

A kick drum isn’t a pitched note in the same sense as a piano key.

And when you’re dealing with a full song, the drums are mixed together with vocals, bass, guitars, synths, and everything else.

So for drums, the application first needs to isolate the percussion.

That’s where Demucs comes in.

Demucs is an AI-based source-separation model.

It can take a complete mix and separate it into stems such as:

  • vocals
  • drums
  • bass
  • other

Once the drum stem is isolated, Atomik Audio to MIDI analyzes the percussion and converts detected drum hits into MIDI events.

That makes the workflow roughly:

Full song
   │
   ▼
Demucs
   │
   ├── Vocals
   ├── Bass
   ├── Other
   └── Drums
         │
         ▼
  Drum detection
         │
         ▼
       MIDI

Now instead of simply having an audio drum loop, I have notes that can trigger my own drum kit.

Different Drum Maps Matter

Anyone who has moved MIDI drum patterns between different instruments knows the problem.

The kick might be correct.

But suddenly the snare triggers a cowbell.

The hi-hat becomes a tom.

And everything sounds completely wrong.

That’s because not every drum instrument uses exactly the same MIDI note mapping.

So the drum mode in Atomik Audio to MIDI supports multiple target mappings, including standard General MIDI, as well as mappings intended for Reason and Redrum workflows.

That might sound like a small detail.

For me, it’s the kind of detail that determines whether a tool actually fits into a music-production workflow.

Generating MIDI isn’t enough.

The MIDI needs to be useful once it arrives in the DAW.

Sometimes I Don’t Want MIDI at All

There is another situation I run into regularly:

I don’t need the notes.

I need the individual pieces of the mix.

Maybe I want:

  • the vocal without the instrumental
  • the bass isolated
  • just the drums
  • everything except the vocal

Because Demucs is already part of the processing pipeline, Atomik Audio to MIDI can also work as a stem separator.

A full mix can be separated into four main stems:

Vocals

Drums

Bass

Other

So the project ended up solving two related problems:

audio → editable musical information

and

full mix → isolated audio sources

For remixing, studying arrangements, recovering old projects, or experimenting with samples, both can be useful.

BPM Matters More Than It Seems

Getting the correct notes is only part of the problem.

They also need to line up properly in the DAW.

So Atomik Audio to MIDI includes automatic BPM detection.

The idea is to estimate the tempo of the source audio so the resulting MIDI is easier to align with a project grid.

Without the correct tempo, you can have a technically accurate sequence of notes that becomes frustrating to work with once imported into a DAW.

Again, this is where audio transcription stops being an AI demo and starts becoming a production tool.

I don’t just want to know what notes were detected.

I want the result to fit into the next step of the workflow.

Detection Isn’t Perfect — So I Exposed the Controls

Audio-to-MIDI transcription is not magic.

Different recordings behave differently.

A clean monophonic synth lead is very different from a noisy guitar recording.

A bassline buried inside a mix is different from an isolated bass track.

A soft note might disappear.

A noisy transient might become a false note.

So the GUI exposes some of the detection parameters rather than pretending one configuration will work perfectly for everything.

You can adjust things like:

  • onset threshold
  • frame threshold
  • minimum note length

Those controls let you decide how sensitive the transcription should be.

If too many unwanted notes are being detected, increase the threshold.

If quiet notes are disappearing, you may need to make detection more permissive.

The defaults are a useful starting point.

But having access to the underlying parameters means the tool can adapt to the audio rather than forcing every recording through exactly the same settings.

Why I Wanted a GUI

I could have left the project as a command-line utility.

And there is nothing wrong with that.

But audio transcription is the kind of process where I often want to experiment.

Change a threshold.

Try again.

Switch from melodic mode to drum mode.

Select another file.

Extract the stems.

For that workflow, a small graphical interface makes more sense.

The current workflow is basically:

  1. Select an audio file.
  2. Choose Melodic, Drums, or All Stems.
  3. Adjust the parameters if needed.
  4. Start the conversion.
  5. Import the result into your DAW.

The app can also accept supported online audio URLs as inputs, although for my own unpublished material the main reason for building the tool is still local files.

The interface isn’t trying to become a DAW.

It’s a preprocessing tool.

Do the conversion.

Get the MIDI or stems.

Then go back to making music.

The Most Important Feature Is Actually “Local”

Basic Pitch and Demucs are the interesting AI pieces.

But the architectural decision I care about most is simpler:

the processing happens on my computer.

Unreleased music can contain a lot more than a random audio file.

It can contain:

  • material that hasn’t been published
  • vocals from another artist
  • client work
  • licensed stems
  • demos
  • samples
  • intellectual property

Uploading those files to another service might be acceptable.

But it should be a decision.

It shouldn’t be a technical requirement for something my own computer is perfectly capable of processing.

Atomik Audio to MIDI runs on the local CPU or GPU.

My audio stays on the machine.

There is no account to create.

No subscription to maintain.

No per-conversion payment.

And no requirement to send the track to a remote processing server.

That fits the way I’ve been thinking about more and more software lately:

use the cloud when it provides real value — not simply because it’s the default architecture.

An NVIDIA GPU Helps, but It Isn’t Required

AI audio processing can be computationally expensive.

Stem separation in particular can take some work.

The tool can run locally using the CPU, but if you have a compatible NVIDIA GPU, CUDA can significantly speed up the processing.

That makes a GPU useful for more than generating images or running language models.

It can become part of the audio-production toolchain.

The basic architecture is still simple:

Audio file
    │
    ▼
Your CPU / GPU
    │
    ├── Basic Pitch → MIDI
    │
    └── Demucs → Stems / Drum MIDI

Nothing in that processing path requires the track to leave the computer.

It’s Not a Perfect Transcription Machine

This is important.

Audio-to-MIDI transcription is fundamentally an estimation problem.

The tool is analyzing a waveform and trying to infer the musical events that produced it.

That means the quality of the result depends heavily on the source.

A clean isolated melody can produce a very usable MIDI file.

A dense mastered song with distorted guitars, pads, drums, vocals, and effects is a much harder problem.

Likewise, stem separation can produce impressive results without literally recreating the original multitrack recording.

There can be artifacts.

Notes can be missed.

Extra notes can appear.

Drum detection may require cleanup.

So I don’t think of Atomik Audio to MIDI as:

Press a button and perfectly reconstruct the original project.

I think of it as:

Give me a useful editable starting point.

That’s often enough.

Correcting five notes in a MIDI clip is much faster than rebuilding the entire part by ear.

A Few Ways I Actually Find This Useful

There are several practical workflows where this becomes interesting.

Recovering old musical ideas

Maybe I exported an old demo but no longer have the original DAW project.

I can extract a melody or bassline and start rebuilding around it.

Replacing instruments

I can take a recorded melodic line, convert it to MIDI, and send it into a completely different synth.

Studying a bassline

Instead of repeatedly listening and trying to identify every note manually, I can use the transcription as a starting point.

Rebuilding drums

Extract the drum stem, generate MIDI hits, then replace the original kit with my own samples.

Remixing

Stem separation gives me access to vocals, drums, bass, and the remaining instrumentation without needing the original session.

Turning experiments into arrangements

Maybe I recorded myself playing something without MIDI.

Later, I can recover the performance and edit it inside the DAW.

Those are the workflows that interest me more than the technical novelty of AI transcription itself.

The question isn’t:

Can AI detect notes?

It’s:

Does this save me time while making music?

What’s Under the Hood?

The project is written in Python.

The main AI components are:

Spotify Basic Pitch

Used for melodic audio-to-MIDI transcription.

It handles the note-detection side of things for melodic and polyphonic material.

Meta Demucs

Used for separating a complete mix into individual stems.

In Atomik Audio to MIDI, that also enables the drum-transcription workflow by isolating the percussion before analyzing it.

FFmpeg

Used as part of the audio-processing environment and required by the project.

The application then wraps those pieces in a graphical workflow rather than requiring me to manually connect multiple command-line tools every time I want to process something.

That’s usually how these Atomik Factory projects start.

There are already good open-source building blocks.

I just want them connected in the way I actually use them.

Want to Try It?

Atomik Audio to MIDI is open source.

You can find the project here:

GitHub: github.com/atomikfactory/atomik-audio-to-midi

You’ll need:

  • Python 3.9 or newer
  • FFmpeg
  • the Python dependencies included with the project
  • optionally, an NVIDIA GPU with CUDA support for faster processing

Clone the repository:

git clone https://github.com/atomikfactory/atomik-audio-to-midi.git
cd atomik-audio-to-midi

Create a virtual environment:

python -m venv venv

Activate it and install the dependencies:

pip install -r requirements.txt

Then start the GUI:

python gui.py

On the first conversion, the underlying AI models may need to be downloaded.

After that, processing runs locally on your machine.

The project is released under the MIT License.

Basic Pitch and Demucs have their own licenses, so if you’re planning to incorporate the underlying models into a commercial product, review those separately.

The Interesting Part Isn’t Really Audio to MIDI

What I like most about this project is that it changes what an audio file represents.

Normally, a bounced song feels finished.

Static.

The notes have become sound.

The tracks have become a mix.

And the original structure is mostly gone.

AI music tools are starting to make that boundary less rigid.

A waveform can become notes again.

A mix can become stems again.

A drum recording can become triggers.

Not perfectly.

But often well enough to continue working.

And that creates a much more interesting relationship with old recordings, samples, demos, and musical ideas.

Instead of asking:

Do I still have the original project?

I can sometimes ask:

What can I recover from the audio I still have?

That is why I built Atomik Audio to MIDI.

Not to replace musicianship.

Not to recreate an entire DAW session automatically.

Just to make recorded sound a little more editable again.


Atomik Factory is where I document the software, scripts, experiments, and tools I build for everyday use — around AI, technology, automation, privacy, productivity, and music.

Most projects start because I need something myself.

I build it.

I learn from it.

Then I put the code out there in case somebody else has the same problem.

Build. Learn. Share.

If you’ve ever had an audio loop, old demo, bassline, or drum groove that you wished you could turn back into MIDI, give Atomik Audio to MIDI a try.

And if you improve the transcription, add another workflow, or find a particularly useful way to use it, I’d like to hear about it.

// tags