Difference between revisions of "Configuration"

From TidalCycles userbase
Jump to: navigation, search
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Tidal boot-up procedure has changed, so with Tidal 1.0.0-pre installed, you'll probably get errors when you start your editor.
+
To configure Tidal, you'll need to edit the code used to start it up in your text editor.
  
You can find the new startup code here: https://github.com/tidalcycles/Tidal/blob/master/BootTidal.hs
+
You can download a copy of this startup code here: https://github.com/tidalcycles/Tidal/blob/master/BootTidal.hs
  
You can just run it in a tidal buffer and all should be fine.
+
Save it somewhere safe, and if you're using the atom editor, put the full path to it (including the filename) in the settings for the tidalcycles package. You can then edit this file to configure tidal.
  
If you get late messages in supercollider, you can increase the latency by changing the startTidal line to e.g.:
+
= Controlling latency =
 +
 
 +
There are two configuration values which control overall latency, 'frame timespan' and 'latency'. To find the maximum total latency, add them together. Here's an example configuration:
 +
 
 +
<source>
 +
tidal <- startTidal (superdirtTarget {oLatency = 0.02}) (defaultConfig {cFrameTimespan = 1/20})
 +
</source>
 +
 
 +
== Frame timespan ==
 +
 
 +
This is the duration of Tidal's calculation window in seconds. The default is 0.05 seconds, in other words a calculation rate of 20 frames per second.
 +
 
 +
If you find Tidal is using too much CPU, increasing the frame timespan will probably help.
 +
 
 +
== Latency ==
 +
 
 +
If you get late messages in supercollider, you can increase the latency by increasing this from its default value (which at the time of writing is 0.02).
 +
 
 +
= SuperDirt running in another host =
 +
 
 +
If you're running SuperDirt in another host (perhaps, in a multi-user setup), you need to define this in a similar fashion as with the latency, except in this case the keyname is "oAddress":
  
 
<syntaxhighlight lang="Haskell">
 
<syntaxhighlight lang="Haskell">
tidal <- startTidal (superdirtTarget {oLatency = 0.04}) defaultConfig
+
tidal <- startTidal (superdirtTarget {oAddress = "192.168.0.23", oPort = 57120}) defaultConfig
 
</syntaxhighlight>
 
</syntaxhighlight>
  
In the old tidal, this value used to be 0.3, but by default is currently set to 0.01.
+
In case you need to alter multiple settings for superdirtTarget, just separate them by a comma (<source inline>{oAddress = "1.2.3.4", oLatency = 0.04}</source>).
 +
 
 +
Note that in emacs (and possibly other editor) configuration files, you'll need to escape the quotation marks.
 +
 
 +
You will also need to configure SuperDirt to accept messages coming from another host. For example, starting dirt like this will tell listen for OSC messages on all network interfaces:
 +
 
 +
<source>
 +
~dirt.start(57120, [0, 0], NetAddr("0.0.0.0"));
 +
</source>
 +
 
 +
[[Category:Tidal-1+]]
 +
[[Category:Reference]]

Latest revision as of 21:12, 1 July 2019

To configure Tidal, you'll need to edit the code used to start it up in your text editor.

You can download a copy of this startup code here: https://github.com/tidalcycles/Tidal/blob/master/BootTidal.hs

Save it somewhere safe, and if you're using the atom editor, put the full path to it (including the filename) in the settings for the tidalcycles package. You can then edit this file to configure tidal.

Controlling latency

There are two configuration values which control overall latency, 'frame timespan' and 'latency'. To find the maximum total latency, add them together. Here's an example configuration:

tidal <- startTidal (superdirtTarget {oLatency = 0.02}) (defaultConfig {cFrameTimespan = 1/20})

Frame timespan

This is the duration of Tidal's calculation window in seconds. The default is 0.05 seconds, in other words a calculation rate of 20 frames per second.

If you find Tidal is using too much CPU, increasing the frame timespan will probably help.

Latency

If you get late messages in supercollider, you can increase the latency by increasing this from its default value (which at the time of writing is 0.02).

SuperDirt running in another host

If you're running SuperDirt in another host (perhaps, in a multi-user setup), you need to define this in a similar fashion as with the latency, except in this case the keyname is "oAddress":

tidal <- startTidal (superdirtTarget {oAddress = "192.168.0.23", oPort = 57120}) defaultConfig

In case you need to alter multiple settings for superdirtTarget, just separate them by a comma ({oAddress = "1.2.3.4", oLatency = 0.04}).

Note that in emacs (and possibly other editor) configuration files, you'll need to escape the quotation marks.

You will also need to configure SuperDirt to accept messages coming from another host. For example, starting dirt like this will tell listen for OSC messages on all network interfaces:

~dirt.start(57120, [0, 0], NetAddr("0.0.0.0"));