Notes from a curious system.
OS music playback note

I let my OS become a DJ

Note
Latest|March 11, 2026

I let my OS become a DJ

Hi, I’m Sierra.
Who? Yeah. Sierra. Nice to meet you.

If you make music, isn’t your folder structure probably kind of like this?

Music
├ Album_A
│  ├ track01.mp3
│  ├ track02.mp3
│
├ Album_B
│  ├ track01.wav
│  ├ track02.wav
│
└ EP_test
   ├ demo01.wav
   └ demo02.wav

You know, the thing where you make separate folders for each album or EP.

Which is normal, probably. But there’s this one tiny problem.

If you want to listen to things on shuffle, you end up doing this:

Open the folder.
Drag files into the player.
Hit shuffle.
Open another folder.

And this kind of tiny little operation keeps happening over and over.

What kind of tiny little operation? Okay, so— it’s like apps that don’t even fit on your desktop anymore are somehow multiplying before you notice.
I mean, technically you opened them.
But it still feels like they appeared on their own somehow.

And when you’re in the middle of making music, that whole chain of little actions starts becoming this weird low-level stress. A tiny time loss.
But the kind that keeps happening.

Oh, side note.

I built this site with a JavaScript framework called Next.js.
Apparently it’s good for small blogs too.
Honestly, I didn’t really know what I was doing, but the AI was basically like, “Next.js is a galaxy,” and I was like, wait, that sounds amazing actually.

I really didn’t know much at first, and I’m pretty sure my instructions were super vague too.
Actually I’m saying that in past tense, but I might still be vague now. Oops. I kind of had this attitude of, if I can’t find the words, I’ll just go find the words too somehow, and that’ll probably get me through.
Ah, I drifted again.

Anyway, during that whole process I ended up using the CLI a lot. And TypeScript— which, if I had to rename it, is kind of like an annoyed pair of glasses— kept yelling at me the whole time. Errors. Errors. Errors.
Just packed all over a black screen in English.

And then I’d just send the whole thing straight to the AI.
Like, okay, transporting this now.
And meanwhile I’m sitting there thinking, wow, I’m basically an error-message delivery person.

But after doing that for a while, I got a little used to it. By the time the site was finally live, I was way less scared of using the CLI at all.

To be honest, at first the CLI terrified me. You know.
The black screen where you type things.

It felt like if I made one typo, my whole PC might explode.

At the beginning I used to ask the AI, “Is this safe to type?” before entering basically anything.
I still do that sometimes 🤣

But once I got a little more used to it, the black screen stopped feeling like just this scary thing. It started feeling more like you were handling the things inside your PC directly.

Not through the rules of some app,
but a little closer to the OS itself,
where you could just say, “I want it to do this,” or “No, more like this.”

And I thought that was kind of interesting.

So while I was building the site, drawing manga, making music, and thinking through essay structures and all that, I was also listening back to music I made in my DAW and music generated with AI.

And little by little I started thinking: the whole folder-to-file process is quietly making the listening experience worse.

But I also didn’t really want to import everything into some dedicated music app, because then it starts feeling like there’s this annoying little gap between what’s in the app and what’s actually on my PC. So I ended up complaining to the AI about it.

Like:

“I want to play a music folder on shuffle, but
opening folders is annoying
and all of it is annoying
come onnn 🐮💥”

And then it replied in basically one second.

What?
Excuse me?
Was my problem really that lightweight?
Like, was it just a scoop of vanilla ice cream on a summer terrace? 🍦

Like, is the AI data center that comfortable? That was kind of my first thought.

But then I tried it.

And it worked.

And not only that:

  • no special app needed

  • uses the OS directly

  • works with a double-click

I kind of laughed. Really?
That’s allowed?

All you do is put two files into the folder.
Did you know that? Because I did not.

One is a .ps1 file.
That’s the PowerShell part.

And the other is a .bat file.
That’s basically a tiny launch button so you can double-click it.

So as an experience, it’s just this: double-click, and the songs in that folder start playing in random order.

Isn’t that kind of nice?
I liked it a lot, actually.

How to make it (non-scary version)

1) Open Notepad

Regular Windows Notepad is fine.

2) First, make the main .ps1 file

You can name it something like this:

random-play-stable.ps1

Put this inside:

# =========================
# random music player
# (Sierra guide version)
# =========================

# --- setup stuff ---

# where your music lives
$musicFolder = "."

# where VLC is installed
$vlcPath = "C:\Program Files\VideoLAN\VLC\vlc.exe"

# temporary playlist file (auto generated)
$playlistPath = Join-Path $env:TEMP "random_playlist.m3u"

# file types we want to play
$extensions = @(".mp3", ".wav")

# --- check: does VLC exist? ---
if (-not (Test-Path $vlcPath)) {
    Write-Host "looks like VLC isn't here: $vlcPath"
    Write-Host "check where VLC is installed and update `$vlcPath."
    exit 1
}

# --- collect music files ---
$files = Get-ChildItem -Path $musicFolder -Recurse -File -ErrorAction SilentlyContinue |
    Where-Object {
        $extensions -contains $_.Extension.ToLower()
    }

# if nothing is found, stop
if (-not $files -or $files.Count -eq 0) {
    Write-Host "no mp3 / wav files found in this folder"
    exit 1
}

# --- shuffle the music ---
$shuffledFiles = $files | Sort-Object { Get-Random }

# --- create a playlist file ---
$lines = @("#EXTM3U")
$lines += $shuffledFiles.FullName
$lines | Set-Content -Path $playlistPath -Encoding UTF8

Write-Host "playlist ready: $playlistPath"
Write-Host "tracks: $($shuffledFiles.Count)"

# --- open VLC and play ---
Start-Process -FilePath $vlcPath -ArgumentList @(
    "--one-instance",
    "--playlist-enqueue",
    $playlistPath
)

What this does is pretty simple:

  • finds .mp3 and .wav files inside the folder

  • shuffles them

  • creates a temporary playlist

  • plays that playlist in VLC

That’s it.

3) Next, make the .bat file

Name it this:

random-play-stable.bat

Put this inside:

@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0random-play-stable.ps1"
pause

This is the little launch button I mentioned. It just runs the .ps1 file sitting in the same folder.

4) Where do you put it?

Anywhere you want.

For example:

Music
├ Album_A
│  ├ track01.mp3
│  ├ track02.mp3
│  ├ random-play-stable.ps1
│  └ random-play-stable.bat

If you put it there, it will randomly play only the songs inside Album_A.

But if you put it at a higher level— like the main Music folder— then it can randomly play across all the albums and EPs inside it.

So the folder where you place it changes the DJ’s territory. Which is kind of fun.

5) Double-click

That’s it.

Double-click the .bat file, and the music in that folder starts playing in random order.

If you don’t know where your folder is

If you see something like this:

C:\Music\Album_A

and your reaction is,

“Okay, but where is that?”

That’s fine.

Look at the top of File Explorer.

(put screenshot here)

The text shown in the address bar is the location of that folder.

Things like this look a little like spells at first. I get it.

Have you ever thought this while using your PC?

It’s useful while making music.

For example:

Checking your mix.
Shuffle within one album.

Checking loudness balance.
Listen across multiple albums.

Comparing sound across time periods.
Listen to old folders and current folders side by side.

Checking the flow of an EP.
Try both normal order and shuffle.

So basically,

you can play your own music like a DJ set.

And you can do it with a double-click.

Isn’t that kind of nice?
I like it.

A tiny bit about GUI and CLI

Making things usually means working inside the limits of various apps, right?

But the CLI feels more like using the OS directly.

So you’re not as trapped by what a specific app wants you to do.

At this point my setup kind of feels like this:

DAW -> GUI
everything else -> CLI

Or, well, something like that.

But don’t worry. The actual experience here is still just double-click.

A black window opens briefly in the background, but nothing especially scary happens.

You might see something like this:

playlist ready: C:\Users\sierra\AppData\Local\Temp\random_playlist.m3u
tracks: 147
Press any key to continue . . .

And honestly, you can just leave it alone.

So even if the CLI scares you, it’s okay.
It really scared me at first too 🤣

And if you’re one of those people who isn’t scared of it at all, then feel free to read this part while laughing a little 🤭

If you end up liking this, you can do all kinds of things with it.

Put one in each album folder.
Make one for comparing EPs.
Keep one in your current work-in-progress folder.

It’s pretty flexible.

Your OS becomes your own personal DJ.

A little dramatic?
Yeah, maybe.

Want a donut? 🍩