Skip to content

Commit 6f03094

Browse files
committed
Update metronomes article
1 parent c3d6149 commit 6f03094

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

src/content/writings/every-way-to-create-a-metronome-in-javascript.mdx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Every Way to Create a Metronome in JavaScript
33
dateCreated: 2024-06-27
4-
dateUpdated: 2024-06-27
4+
dateUpdated: 2025-12-09
55
---
66

77
import Picture from "@/components/picture.astro";
@@ -16,7 +16,7 @@ could find and think of to create metronomes in JavaScript using only browser
1616
APIs", but that wouldn't sound as nice so we're sticking with what we got.
1717

1818
Anyway, much like
19-
[Grant James](https://grantjam.es/creating-a-simple-metronome-using-javascript-and-the-web-audio-api),
19+
[Grant James](https://grantjames.github.io/creating-a-simple-metronome-using-javascript-and-the-web-audio-api),
2020
for one reason or another, I decided that I would make my own metronome and
2121
thought, "This will be easy!" Oh how wrong we were. Unlike him though, who
2222
sanely stopped after he was able to make a metronome, I ended up going down that
@@ -50,10 +50,10 @@ setInterval(() => {
5050
```
5151

5252
If you've ever read up on how the
53-
[event loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Event_loop)
54-
and [threading](https://developer.mozilla.org/en-US/docs/Glossary/Thread) work
55-
in JavaScript, you'll know that those methods aren't very accurate because
56-
before the callback can be called, the
53+
[event loop](https://javascript.info/event-loop) and
54+
[threading](https://developer.mozilla.org/en-US/docs/Glossary/Thread) work in
55+
JavaScript, you'll know that those methods aren't very accurate because before
56+
the callback can be called, the
5757
[main thread](https://developer.mozilla.org/en-US/docs/Glossary/Main_thread)
5858
first needs to finish everything that it's queued to handle, which could range
5959
from adjusting the page layout to handling different events to garbage
@@ -188,8 +188,9 @@ What about running it off the main thread? Will that solve our problems?
188188
## Worker Timer
189189

190190
This idea came from
191-
[Monica Dinculescu's article](https://meowni.ca/posts/metronomes). You can find
192-
her code [here](https://glitch.com/edit/#!/metronomes).
191+
[Monica Dinculescu's article](https://meowni.ca/posts/metronomes).
192+
Unfortunately, I can no longer find any working links to her code as it was
193+
hosted on [Glitch](https://blog.glitch.com/post/changes-are-coming-to-glitch).
193194

194195
To run a timer off the main thread, we're going to have to use the
195196
[Web Workers API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API),
@@ -611,3 +612,8 @@ I think that's all I wanted to say on that. Feel free to correct me if I made
611612
any mistakes, I probably said some inaccurate things here and there. I don't
612613
have comments on here yet, so you can just
613614
[file an issue](https://github.com/mcecode/mce.codes/issues) for now.
615+
616+
## Changelog
617+
618+
- December 09, 2025
619+
- Update or replace old links and remove broken ones

0 commit comments

Comments
 (0)