TidalCycles for VSCode
Support for the TidalCycles in vscode. You can learn more about TidalCycles at TidalCycles.
Upgrading to 1.1
If you are upgrading from 1.04 to 1.1, you will need to install the latest version of SuperDirt unless you are using
your own custom Tidal boot file. The default boot will assign Tidal's
This VSCode extension for TidalCycles is inspired by the commands from the popular Atom package:
You have 9 customizable, predefined shortcuts for executing commands e.g. through key combinations. By default the shortcuts are initially set up to do the following (you can change them to your liking though):
The current stream number is determined by checking for a
You can use the stream number in the commands by putting a
Another useful replacement value is
Note that the extension does not come with default key bindings as to not interfere with your current key bindings.
In order to execute the commands through key combinations you need to wire them up in the
If the 9 predefined shortcut commands are not enough, you can also define new ones by creating new keyboard mappings.
Defining a shortcut like this also has the added benefit of allowing for multiple, top level commands to be specified in
the same shortcut. Below is an example that needs to go into your
You can configure a custom tree view for sounds that you might want to use. At the moment only locally available samples can be added to the view. To do so you need to add the path where your samples can be found to the configuration and then restart vscode:
The sound browser view is visible in the
In you sample tree view you'll only see one level of folders per specified sample directory. This is intentional, as SuperDirt also only supports one level at the moment.
Samples in a folder are displayed in a format specific to Tidalcycles/SuperDirt.
Here's an example for the
The first part of the name is how you can reference the sound in TidalCycles ( provided that the folder is configured in SuperDirt as well). The second displayed part after the slash is the actual file name, stripped from its extension and any numeric prefix. If you hover the mouse over an item you'll get the actual, full file name in the title.
To play a sound you can just click on the sound item (supported on Linux, macOS,
Windows 10, others might work too). Click again to re-launch the sound. If you
want to stop the sound you can either hit the
Every sound also has some actions that you can execute by clicking on the respective icon displayed to the right, when you hover over an item:
In order to get syntax highlighting in
You will need to have TidalCycles (a Haskell package) installed before using this extension. If you want to produce sound, you'll also need to have SuperDirt running. You can find instructions to install TidalCycles and SuperDirt at TidalCycles.
Take a look in the Contributions tab on the extension page to see what config setting options are available. Here is a more verbose explanation of a few of them:
Probably the most important setting. This is the path to
If you are using Stack, you can enable the
This extension has a default internal bootup process to load the Tidal libraries into GHCI.
If instead you wish you run your own bootup process, you can configure this extension to point
to a Tidal bootup file on your machine, or use a
Hover / completion support for Tidal statements
This extension implements some code support features for Tidal specific statements, providing code completion and hover information.
You can set the detail level of the provided information through two
configuration settings, one for the
Available levels for both options are:
Writing new documentation
Not every command is documented yet and the detail level of the documentation varies from command to command. The files commands.yaml and commands-generated.yaml contain the currently available documentation. If you'd like to contribute, please add new documentation to commands.yaml.
The easiest way to do this is by creating a new file and adding it to the
For the format take a look at the existing documentation and the source code. Most fields support MarkDown syntax as well, so you can style them.
If you want to see how your documentation looks, simply reload the file by
Full Config Example