<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mick Dekkers on Medium]]></title>
        <description><![CDATA[Stories by Mick Dekkers on Medium]]></description>
        <link>https://medium.com/@mickdekkers?source=rss-35c066768e0c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aFX_Eg7N3IPaPTVSBB1CGg.jpeg</url>
            <title>Stories by Mick Dekkers on Medium</title>
            <link>https://medium.com/@mickdekkers?source=rss-35c066768e0c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:43:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mickdekkers/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Domain-Specific Language for Virtual Audio Routing]]></title>
            <link>https://medium.com/@mickdekkers/a-domain-specific-language-for-virtual-audio-routing-3cdbcef437f1?source=rss-35c066768e0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cdbcef437f1</guid>
            <category><![CDATA[node]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[domain-specific-languages]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Mick Dekkers]]></dc:creator>
            <pubDate>Sun, 26 Nov 2017 19:40:31 GMT</pubDate>
            <atom:updated>2017-12-04T14:44:07.973Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<p>I’m currently developing a Domain-Specific Language (DSL) — a kind of programming language — with the goal of making it easy to route audio between audio devices on your computer.</p><p>Side note: for a high-level look at what DSLs and their benefits are, I recommend this excellent article by <a href="https://medium.com/u/debe1b49278d">Federico Tomassetti</a>: <a href="https://tomassetti.me/domain-specific-languages/">https://tomassetti.me/domain-specific-languages</a></p><p>On Windows, an application called Virtual Audio Cable (VAC) by Eugene Muzychenko lets you create virtual audio cables. Using VAC’s Audio Repeaters, you can then create connections between them and physical devices such as microphones, speakers, and headphones.</p><p>This application has many uses; among other things it becomes possible to keep audio from your microphone, voice calls and other audio from your computer (e.g. music, games) separate and record them to separate files or channels. The benefit of having recorded audio from different sources in separate channels is considerable because it makes it possible to adjust the volume and apply audio effects to each of them independently or mute them entirely. Having this ability is not only beneficial to music producers and other audio professionals, but also to people who stream or record videos on platforms such as YouTube and Twitch.</p><p>One downside of Virtual Audio Cable is that it can be complicated for an average user to set up a configuration that facilitates these uses. In order to route audio between devices, several instances of the Audio Repeater program must be started. Each connection you wish to make requires you to configure one instance of the application, and this must typically be done again every time the computer restarts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*xbcefoo9m6YZ_MkQoHVo-A.png" /><figcaption>A screenshot of the Audio Repeater user interface</figcaption></figure><p>There are several options the user can configure through drop-down, number and checkbox inputs. The most important ones being <em>Wave in</em> and <em>Wave out</em>, where you select the source and destination devices, respectively.</p><p>Audio Repeater also accepts command-line arguments, which enables users to automate this process by <a href="https://helping-squad.com/advanced-vac-virtual-audio-cable-guide">putting their configuration in windows batch files</a>. The problem with this method is that it’s often verbose and will have you copy-pasting a lot for even a moderately complex setup. In other words, there is room for improvement.</p><p>My DSL project (working title: <em>vac-dsl</em>) aims to complement Virtual Audio Cable and applications like it by providing a straightforward way to write, apply, experiment with, and switch between different configurations.</p><p>vac-dsl lets you write your configuration using a simple text-based syntax inspired by Graphviz/DOT.</p><p>The following is an example of a complete vac-dsl configuration that routes audio from a microphone to speakers, meaning all the audio your microphone picks up will be played back through your speakers:</p><pre>&quot;Microphone&quot; -&gt; &quot;Speakers&quot;</pre><p>Yep, it’s that simple.</p><p>Rather than manually starting and configuring instances of the Audio Repeater every time you restart your computer or dealing with cumbersome batch files, vac-dsl handles everything for you behind the scenes.</p><p>The language also lets you define variables and use them throughout the rest of the configuration like this:</p><pre>mic = &quot;Microphone device with a really long name&quot;</pre><pre>mic -&gt; &quot;Speakers&quot;<br>mic -&gt; &quot;Headphones&quot;</pre><p>You can use comments and shorthands like this, which allows for more compact configurations:</p><pre>mic = &quot;Microphone device with a really long name&quot;</pre><pre># Route microphone audio to both speakers and headphones<br>mic -&gt; &quot;Speakers&quot;, &quot;Headphones&quot;</pre><p>And you can set properties on the connections as well:</p><pre>&quot;Microphone&quot; -&gt; &quot;Speakers&quot;, &quot;Headphones&quot; [sampling_rate=96000]</pre><p>The core project consists of three components which work together to execute your configuration:</p><ul><li>The parser: takes the raw text and produces an <a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract Syntax Tree (AST)</a></li><li>The compiler: takes the AST, resolves references to variables and expands shorthands, then returns a list of connections</li><li>The interpreter: takes the list of connections and starts an Audio Repeater instance with the right command-line arguments for each of them</li></ul><p><em>If you’d like to see some example output of each stage of the process, check out </em><a href="https://github.com/mickdekkers/vac-dsl/tree/master/packages/core/src/__tests__/fixtures/programs"><em>the project’s test fixtures</em></a><em>.</em></p><p>This is my first time writing a parser, compiler, or interpreter.<br>I’m learning a lot about language design and implementation, and it’s surprisingly fun!</p><p>I have many plans for this project, including:</p><ul><li>Humanized error messages <a href="http://elm-lang.org/blog/compiler-errors-for-humans">similar to the Elm compiler</a></li><li>Syntax highlighting in IDEs and code editors</li><li>An import system that allows users to split their configuration into multiple files, allowing better use of the DRY principle</li><li>A language server that implements the <a href="https://langserver.org/">Language Server Protocol</a>, which enables IDE features such as autocomplete, hover information, go to variable definition, find all references, and variable renaming</li><li>A way to compile your vac-dsl configuration to DOT/Graphviz graphs automatically for visualization</li><li>Support for platforms and audio routing applications beyond Windows and Virtual Audio Cable</li></ul><p>The source code of vac-dsl is freely available <a href="https://github.com/mickdekkers/vac-dsl">on my GitHub</a> under the Apache 2.0 license, so please feel free to check it out. I also welcome any constructive feedback you may have.</p><p><em>I am not affiliated with Eugene Muzychenko or the Virtual Audio Cable software.<br>The vac-dsl project merely provides an easy-to-use interface around VAC’s publicly documented command-line API. All rights belong to their respective owners.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cdbcef437f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>