Difference between revisions of "Linux installation"

From TidalCycles userbase
Jump to: navigation, search
(Marked this version for translation)
Line 1: Line 1:
 
<translate>
 
<translate>
= Required Prerequisites=
+
= Required Prerequisites= <!--T:1-->
  
 +
<!--T:2-->
 
There's a few things to install as part of a complete tidal system:
 
There's a few things to install as part of a complete tidal system:
  
 +
<!--T:3-->
 
* [https://www.haskell.org/platform/ Haskell Platform] - '''the 'full' version is strongly recommended'''.
 
* [https://www.haskell.org/platform/ Haskell Platform] - '''the 'full' version is strongly recommended'''.
 
* [https://atom.io/ Atom Editor]  (if you don't like the atom editor for some reason, please check out the [[List of tidal editors|list of alternatives]])
 
* [https://atom.io/ Atom Editor]  (if you don't like the atom editor for some reason, please check out the [[List of tidal editors|list of alternatives]])
Line 9: Line 11:
 
* [https://git-scm.com/ Git]
 
* [https://git-scm.com/ Git]
  
 +
<!--T:4-->
 
Hopefully your Linux distribution makes the pre-requisites easily available to you via a package manager. For example, if you are using recent version of Ubuntu or similar, you can install haskell with the following command in a terminal window:
 
Hopefully your Linux distribution makes the pre-requisites easily available to you via a package manager. For example, if you are using recent version of Ubuntu or similar, you can install haskell with the following command in a terminal window:
  
  sudo apt-get install build-essential cabal-install git
+
  <!--T:5-->
 +
sudo apt-get install build-essential cabal-install git
  
 +
<!--T:6-->
 
It ''should'' be possible to install supercollider via this method too, via <source lang="shell">supercollider sc3-plugins</source>. However this generally doesn't work. Either the supercollider version is too old (superdirt needs at least version 3.7), or the version of supercollider is mismatched with sc3-plugins. If you're using ubuntu, mint or a similar distribution, my advice is to ignore the supercollider packages and just compile them yourself. These scripts make it super easy to do so:
 
It ''should'' be possible to install supercollider via this method too, via <source lang="shell">supercollider sc3-plugins</source>. However this generally doesn't work. Either the supercollider version is too old (superdirt needs at least version 3.7), or the version of supercollider is mismatched with sc3-plugins. If you're using ubuntu, mint or a similar distribution, my advice is to ignore the supercollider packages and just compile them yourself. These scripts make it super easy to do so:
 
   https://github.com/lvm/build-supercollider
 
   https://github.com/lvm/build-supercollider
  
 +
<!--T:7-->
 
Just paste in the four commandline instructions under "How to?" in turn (you can ignore the bit about 'the debian way')
 
Just paste in the four commandline instructions under "How to?" in turn (you can ignore the bit about 'the debian way')
  
= Optional Prerequisites =
+
= Optional Prerequisites = <!--T:8-->
  
 +
<!--T:9-->
 
The following is optional, but recommended:
 
The following is optional, but recommended:
  
 +
<!--T:10-->
 
* [https://supercollider.github.io/sc3-plugins/ SC3 Plugins] - you may need the SuperCollider sc3-plugins if you want to use any of the synths included in SuperDirt. Most of the examples in the documentation will still work, so you could skip this step and return to it later.
 
* [https://supercollider.github.io/sc3-plugins/ SC3 Plugins] - you may need the SuperCollider sc3-plugins if you want to use any of the synths included in SuperDirt. Most of the examples in the documentation will still work, so you could skip this step and return to it later.
  
= Install TidalCycles =
+
= Install TidalCycles = <!--T:11-->
  
 +
<!--T:12-->
 
Open a Terminal. If you’re unsure how to open a terminal window in Linux, it varies according to distribution but generally find “Terminal” in the menus. Then type and run these two commands ''(ignoring any complaints that cabal has of 'legacy v1 style of usage')'':
 
Open a Terminal. If you’re unsure how to open a terminal window in Linux, it varies according to distribution but generally find “Terminal” in the menus. Then type and run these two commands ''(ignoring any complaints that cabal has of 'legacy v1 style of usage')'':
  
  cabal update
+
  <!--T:13-->
 +
cabal update
 
  cabal install tidal
 
  cabal install tidal
  
 +
<!--T:14-->
 
If you've never installed TidalCycles before, then the <code>cabal install tidal</code> step may take some time. At the end of the command output, it should say <code>Installed tidal-x.x.x</code> (where x.x.x is the latest version number) without any errors.
 
If you've never installed TidalCycles before, then the <code>cabal install tidal</code> step may take some time. At the end of the command output, it should say <code>Installed tidal-x.x.x</code> (where x.x.x is the latest version number) without any errors.
  
= Install SuperDirt =
+
= Install SuperDirt = <!--T:15-->
  
 +
<!--T:16-->
 
As you know, TidalCycles is meant to run on top of SuperDirt, so you will have to run it first to make sound. Here's how to install it.
 
As you know, TidalCycles is meant to run on top of SuperDirt, so you will have to run it first to make sound. Here's how to install it.
  
 +
<!--T:17-->
 
Start SuperCollider IDE, and in the editor window paste in the following line of code:
 
Start SuperCollider IDE, and in the editor window paste in the following line of code:
  
  Quarks.checkForUpdates(); Quarks.install("SuperDirt", "v1.0")
+
  <!--T:18-->
 +
Quarks.checkForUpdates(); Quarks.install("SuperDirt", "v1.0")
  
 +
<!--T:19-->
 
Run the code by clicking on it, to make sure the cursor is on this line, then hold down Shift and press Enter. This will download SuperDirt and you will see it has completed when the Post Window displays:
 
Run the code by clicking on it, to make sure the cursor is on this line, then hold down Shift and press Enter. This will download SuperDirt and you will see it has completed when the Post Window displays:
  
  ... the class library may have to be recompiled.
+
  <!--T:20-->
 +
... the class library may have to be recompiled.
 
  -> SuperDirt
 
  -> SuperDirt
  
 +
<!--T:21-->
 
After it has completed, you will need to restart SuperCollider (or alternatively, recompile the class library via the “Language” menu).
 
After it has completed, you will need to restart SuperCollider (or alternatively, recompile the class library via the “Language” menu).
  
== Using the SuperCollider interpreter in a terminal ==
+
== Using the SuperCollider interpreter in a terminal == <!--T:22-->
  
 +
<!--T:23-->
 
You can also install it using the terminal interpreter. You might want to get familiar with it if you prefer using your own text editor. There are great SuperCollider integration plugins available for [https://github.com/supercollider/scel Emacs], [https://github.com/supercollider/scvim Vim] or [https://atom.io/packages/supercollider Atom].
 
You can also install it using the terminal interpreter. You might want to get familiar with it if you prefer using your own text editor. There are great SuperCollider integration plugins available for [https://github.com/supercollider/scel Emacs], [https://github.com/supercollider/scvim Vim] or [https://atom.io/packages/supercollider Atom].
  
 +
<!--T:24-->
 
To start the interpreter just run <code>sclang</code> in a terminal, then just paste the command line from above and press Enter to run it. Once the installation is done, you can exit the interpreter by pressing Ctrl + C.
 
To start the interpreter just run <code>sclang</code> in a terminal, then just paste the command line from above and press Enter to run it. Once the installation is done, you can exit the interpreter by pressing Ctrl + C.
  
= Install editor extensions =
+
= Install editor extensions = <!--T:25-->
  
 +
<!--T:26-->
 
TidalCycles was made to be run in an interactive environment. The way to do it is to get a text editor and install an extension for it. Here's a list of extensions you might want to try:
 
TidalCycles was made to be run in an interactive environment. The way to do it is to get a text editor and install an extension for it. Here's a list of extensions you might want to try:
  
 +
<!--T:27-->
 
* [https://github.com/supercollider/scel Emacs extension]
 
* [https://github.com/supercollider/scel Emacs extension]
 
* [https://github.com/supercollider/scvim Vim extension]
 
* [https://github.com/supercollider/scvim Vim extension]
 
* [https://github.com/crucialfelix/atom-supercollider Atom extension]
 
* [https://github.com/crucialfelix/atom-supercollider Atom extension]
  
== Instructions: Atom Extension ==
+
== Instructions: Atom Extension == <!--T:28-->
  
 +
<!--T:29-->
 
Start Atom, and install the TidalCycles plugin. You can find it via the menus under edit > settings > install, then typing “tidalcycles” into the search box. Once that’s installed, restart atom.
 
Start Atom, and install the TidalCycles plugin. You can find it via the menus under edit > settings > install, then typing “tidalcycles” into the search box. Once that’s installed, restart atom.
  
== Instructions: Emacs Extension ==
+
== Instructions: Emacs Extension == <!--T:30-->
  
 +
<!--T:31-->
 
A MELPA package is provided for TidalCycles integration within Emacs. You must first make sure you have MELPA installed on your machine ([https://melpa.org/#/getting-started here are the instructions]) then simply run <code>M-x install-package return tidal return</code>.
 
A MELPA package is provided for TidalCycles integration within Emacs. You must first make sure you have MELPA installed on your machine ([https://melpa.org/#/getting-started here are the instructions]) then simply run <code>M-x install-package return tidal return</code>.
  
 +
<!--T:32-->
 
This extension provides a major mode for <code>*.tidal</code> files. Once the package is installed, you can just open a Tidal script and press <code>C-c C-s</code> to start Tidal in Emacs, then <code>C-return</code> to run the statement under your cursor.
 
This extension provides a major mode for <code>*.tidal</code> files. Once the package is installed, you can just open a Tidal script and press <code>C-c C-s</code> to start Tidal in Emacs, then <code>C-return</code> to run the statement under your cursor.
  
= Test Your Installation =
+
= Test Your Installation = <!--T:33-->
  
 +
<!--T:34-->
 
Now you are ready to [[Start_tidalcycles_and_superdirt_for_the_first_time|Start TidalCycles and SuperDirt for the first time]].
 
Now you are ready to [[Start_tidalcycles_and_superdirt_for_the_first_time|Start TidalCycles and SuperDirt for the first time]].
  
= Installation Troubleshooting =
+
= Installation Troubleshooting = <!--T:35-->
  
 +
<!--T:36-->
 
Supercollider run on a Jack audio server in order to deliver sound to your speakers. If you see in Supercollider's Post Window a error
 
Supercollider run on a Jack audio server in order to deliver sound to your speakers. If you see in Supercollider's Post Window a error
  
 +
<!--T:37-->
 
<source>
 
<source>
 
Couldn't set realtime scheduling priority 1: Operation not permitted
 
Couldn't set realtime scheduling priority 1: Operation not permitted
 
</source>
 
</source>
  
 +
<!--T:38-->
 
you'll need to setup Jack with the command <source inline> sudo dpkg-reconfigure jackd2 </source> and add your username to the audio group with <source inline> sudo addgroup -username- audio </source>.
 
you'll need to setup Jack with the command <source inline> sudo dpkg-reconfigure jackd2 </source> and add your username to the audio group with <source inline> sudo addgroup -username- audio </source>.
  
 +
<!--T:39-->
 
You can check if your username is already in the audio group by typing the command <source inline>groups -username-</source>
 
You can check if your username is already in the audio group by typing the command <source inline>groups -username-</source>
 
</translate>
 
</translate>

Revision as of 16:26, 21 March 2019

Required Prerequisites

There's a few things to install as part of a complete tidal system:

Hopefully your Linux distribution makes the pre-requisites easily available to you via a package manager. For example, if you are using recent version of Ubuntu or similar, you can install haskell with the following command in a terminal window:

sudo apt-get install build-essential cabal-install git

It should be possible to install supercollider via this method too, via

supercollider sc3-plugins

. However this generally doesn't work. Either the supercollider version is too old (superdirt needs at least version 3.7), or the version of supercollider is mismatched with sc3-plugins. If you're using ubuntu, mint or a similar distribution, my advice is to ignore the supercollider packages and just compile them yourself. These scripts make it super easy to do so:

 https://github.com/lvm/build-supercollider

Just paste in the four commandline instructions under "How to?" in turn (you can ignore the bit about 'the debian way')

Optional Prerequisites

The following is optional, but recommended:

  • SC3 Plugins - you may need the SuperCollider sc3-plugins if you want to use any of the synths included in SuperDirt. Most of the examples in the documentation will still work, so you could skip this step and return to it later.

Install TidalCycles

Open a Terminal. If you’re unsure how to open a terminal window in Linux, it varies according to distribution but generally find “Terminal” in the menus. Then type and run these two commands (ignoring any complaints that cabal has of 'legacy v1 style of usage'):

cabal update
cabal install tidal

If you've never installed TidalCycles before, then the cabal install tidal step may take some time. At the end of the command output, it should say Installed tidal-x.x.x (where x.x.x is the latest version number) without any errors.

Install SuperDirt

As you know, TidalCycles is meant to run on top of SuperDirt, so you will have to run it first to make sound. Here's how to install it.

Start SuperCollider IDE, and in the editor window paste in the following line of code:

Quarks.checkForUpdates(); Quarks.install("SuperDirt", "v1.0")

Run the code by clicking on it, to make sure the cursor is on this line, then hold down Shift and press Enter. This will download SuperDirt and you will see it has completed when the Post Window displays:

... the class library may have to be recompiled.
-> SuperDirt

After it has completed, you will need to restart SuperCollider (or alternatively, recompile the class library via the “Language” menu).

Using the SuperCollider interpreter in a terminal

You can also install it using the terminal interpreter. You might want to get familiar with it if you prefer using your own text editor. There are great SuperCollider integration plugins available for Emacs, Vim or Atom.

To start the interpreter just run sclang in a terminal, then just paste the command line from above and press Enter to run it. Once the installation is done, you can exit the interpreter by pressing Ctrl + C.

Install editor extensions

TidalCycles was made to be run in an interactive environment. The way to do it is to get a text editor and install an extension for it. Here's a list of extensions you might want to try:

Instructions: Atom Extension

Start Atom, and install the TidalCycles plugin. You can find it via the menus under edit > settings > install, then typing “tidalcycles” into the search box. Once that’s installed, restart atom.

Instructions: Emacs Extension

A MELPA package is provided for TidalCycles integration within Emacs. You must first make sure you have MELPA installed on your machine (here are the instructions) then simply run M-x install-package return tidal return.

This extension provides a major mode for *.tidal files. Once the package is installed, you can just open a Tidal script and press C-c C-s to start Tidal in Emacs, then C-return to run the statement under your cursor.

Test Your Installation

Now you are ready to Start TidalCycles and SuperDirt for the first time.

Installation Troubleshooting

Supercollider run on a Jack audio server in order to deliver sound to your speakers. If you see in Supercollider's Post Window a error

Couldn't set realtime scheduling priority 1: Operation not permitted

you'll need to setup Jack with the command sudo dpkg-reconfigure jackd2 and add your username to the audio group with sudo addgroup -username- audio.

You can check if your username is already in the audio group by typing the command groups -username-