Replace the JS railroad diagram with an SVG in the Audio Scope post

This commit is contained in:
Eryn Wells 2024-10-17 08:41:04 -07:00
parent 45449c3b20
commit 9e3f7d1a69
2 changed files with 37 additions and 16 deletions

View file

@ -88,22 +88,7 @@ node to the input of the analyzer node, and the output of the analyzer node to
the audio context's `destination` node that routes to the computer's speakers.
Our audio processing graph looks like this:
{{< figures/railroad id="audioContextDiagram" >}}
{{< scripts/railroad >}}
return rr.Diagram(
rr.Sequence(
rr.Terminal("<audio>"),
rr.Terminal("Analyzer"),
rr.Terminal("destination")));
{{< /scripts/railroad >}}
{{< scripts/railroad narrow=1 >}}
return rr.Diagram(
rr.Stack(
rr.Terminal("<audio>"),
rr.Terminal("Analyzer"),
rr.Terminal("destination")));
{{< /scripts/railroad >}}
{{< /figures/railroad >}}
![](diagram.svg)
By itself the AudioContext doesn't actually play any audio. I'll tackle that
next.