(Updated for v.0.0.6)
Long post ahead. As you may know, I'm currently working on tidal as part of the haskell summer of code.
In the last month I started working on a custom interface for tidal, that is basically a code editor with a built in interpreter.
A big advantage of this is that it's very easy to install: just download, unzip and you're ready to go!
(You still need to install SuperCollider & SuperDirt though)
The application is still pretty experimental, but is already in a state where it has most of the functionality of the other editors & editor plugins.
It would be very cool if some of you could try it out and give me some feedback / report bugs etc.
I already tested on Ubuntu 20.04.2 and 18, Windows 10 and MacOS High Sierra and at a first glance everything seemed to work fine.
Note to MacOS users: In more recent versions of Mac you might have to work around the maleware protection - I couldn't get it to run on Big Sur because of that. If anyone has experience with writing open source applications for MacOs and has an idea how to do this, please contact me.
Edit: Much simpler now, thanks to @ndr_brt for pointing me in the right direction with github releases !
- Visit the following link:
- Select the latest release
- Under 'Assets' choose the file that is named like your operating system
- Unzip all the files (twice)
You should now have a folder 'binary' that you can put anywhere on your system. Inside the folder are a bunch of files and an executable 'tidal-gui', to run it either double click on it or run it from a terminal (recommended).
Note: Moving the executable to another location will break the application.
Explanation of the interface
Once the application is running, you can open a browser and go to http://127.0.0.1:8023. Note that you still need to start up SuperDirt to hear sound, and you cannot have any other instances of Tidal running at the same time.
Now there is only one editor where you can basically evaluate most expressions you're probably used to from othe editor plugins. Above the editor is a little display of the state of tidal, i.e. the current cps and which channels are playing/muted. Below the editor are two buttons to load or save documents, and below that is a little output box, that displays error messages or other kinds of information.
One new feature that the interface offers is syntax highlighting (like you may have seen in feedforward):
To make a channel that has that feature just use 'h1', 'h2' etc. instead of 'd1', 'd2'. For example:
h1 $ s "bd sn"
Note: The highlighting channels cannot be used in definitions or inside of do-blocks
You can prepend a
:t to an expression and evaluate it, to print out the expressions type.
you can evaluate expressions of the form
let x_1 = e_1 x_2 = e_2 ... x_n = e_n
Note: If you defined a variable in two blocks and evaluate them both, it will have the value defined by the block evaluated last.
Loading definitions on boot
Inside the static folder is a file called
bootDefs.hs, you can write one let expression block inside the file, for definitions you use all the time, to not have to load them again each session.
You can not only evaluate statements of type
IO a but also of type
Show a => a but you need to lift the latter to IO using
return. For example, if you want to print a control pattern like
s "bd sn" to the console you can evaluate
return $ s "bd sn".
There are currently four options for pre defined keymaps: default, vim, emacs and sublime. To configure the keymap open the file
tidalConfig in the static folder in a text editor and change the value of the 'keyMap' constant to your liking. Restart the application for the changes to have an effect.
Since the editor is based on the codemirror editor, you can use any codemirror editor theme you want. Here is a nice tool to customize and generate your own themes: https://mkaminsky11.github.io/codemirror-themes/
Once you have a theme you like, save it in a file named
theme.css and replace the file of the same name that is currently inside the
static/css/ folder. Restart the application for the changes to have an effect.
You can evaluate expressions of the form
hoogle x where you can substitute
x with the name of a function you want to explore.
Hoogle adds a lot of dependencies and thus increases the final size of the package by about 400mb..don't really know if it's something people really want/need ... it will probably be redundant if the docs are integrated completely... let me know what you think!
List of keyboard shortcuts
Ctrl + Enter= Evaluate block of code at the place of the cursor
Shift + Enter= Evaluate line of code at the place of the cursor
Ctrl + /= toggle comment line of code at the place of the cursor
Ctrl + D= open tidal docs, where the word at the current place of the cursor is entered in the search
Ctrl + .= hush
Ctrl + 1 ... Ctrl + 9= toggle mute d1 ... d9
Shift + Ctrl + 1 ... Shift + Ctrl + 9= toggle mute h1 ... h9
Ctrl + -= decrease font size of editor
Shift + Ctrl + -= increase font size of editor
Ctrl + O= open file
Ctrl + S= save contents
Like I said, the interface is still experimental and missing some features. Here is a short (incomplete) list of things left to do:
- Make the editor prettier and make it so the look is easily configurable
- Work on the state display, possibly displaying information from supercollider
- Automatically fill in blank lines that fit the editors on startup
- Integrating the SVG pattern visualizer
- Sound browser
- Using electron to make a standalone application (without needing a browser)
Some more advanced features that may be possible:
Record and play-back activities in the editor: GitHub - Jisuanke/CodeMirror-Record: A project for recording and playing coding activities in @CodeMir
Integrate the tidal docs directly into the editor
Let me know if you have any ideas!
Like I briefly mentioned above, I also need help in figuring out what to do to get the application to run on newer versions of MacOS without having to bypass the malware protection.
And of course I need help in testing the application! So, try it out and if you have any questions / suggestions or encounter unexpected behaviour please let me know in this thread / on discord or open an issue on github.
Have a nice weekend everyone!