# Tidal CPU Optimization

**URL:** <https://uzu.lurk.org/t/tidal-cpu-optimization/2046>\
**Category:** TidalCycles\
**Tags:** innards\
**Created:** [28 August 2020 11:00 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046 "2020-08-28T11:00:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Corvi](https://uzu.lurk.org/user_avatar/uzu.lurk.org/francesco_corvi/32/2826_2.png) [@Francesco\_Corvi](https://uzu.lurk.org/u/Francesco_Corvi)\
**Post date:** [28 August 2020 11:00 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/1 "2020-08-28T11:00:25Z")

</div>

I was curios to know more about the way tidal works and how to optimise performances.  
From what I know having more RAM on your computer is useful if you want to load more sample on SuperDirt while having a faster Processor will increase the number of events in the pattern your computer can manage... Am I right?  
Also I would like to know if tidal uses multiple cores or just a single one.

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [28 August 2020 20:53 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/2 "2020-08-28T20:53:20Z")

</div>

Tidal hasn't ever really been oprtimised, luckily Haskell is nice and fast! But yes a faster processor will likely give you higher polyphony.

There's three main processes (aside from the editor), the tidal pattern engine, then on the supercollider side sclang managing the sound synthesis and scsynth actually doing the synthesis. I don't think any does any parallel stuff but it will take advantage of at least three processors.

In BootTidal.hs you can configure `cFrameTimespan`, which is by default `1/20`, which means tidal calculates in chunks of one 20th of a second. This is a balance between smaller values (e.g. 1/30) that spread the load better and improve interactivity (i.e. decrease latency), and larger values (e.g. 1/10) which might (or might not) decrease the overall load. I haven't spent much time tweaking this.. Also in there is oLatency, decrease that for greater interactivity, or increase it to increase latency but iron out 'spikes', e.g. if you see superdirt complain of late messages.

---

<div class="post-metadata">

**Author:** ![abalone1969](https://uzu.lurk.org/user_avatar/uzu.lurk.org/abalone1969/32/209_2.png) [@abalone1969](https://uzu.lurk.org/u/abalone1969)\
**Post date:** [28 August 2020 21:02 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/3 "2020-08-28T21:02:20Z")

</div>

🙂 which machine/operating system are  
you running/looking to run tidal on?

---

<div class="post-metadata">

**Author:** ![julian](https://uzu.lurk.org/user_avatar/uzu.lurk.org/julian/32/1398_2.png) [@julian](https://uzu.lurk.org/u/julian)\
**Post date:** [3 September 2020 05:11 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/4 "2020-09-03T05:11:08Z")

</div>

since tidal is divided into three application (the tidal language, the supercollider language, the supercollider synth), at least you use three cores.

---

<div class="post-metadata">

**Author:** ![Francesco\_Corvi](https://uzu.lurk.org/user_avatar/uzu.lurk.org/francesco_corvi/32/2826_2.png) [@Francesco\_Corvi](https://uzu.lurk.org/u/Francesco_Corvi)\
**Post date:** [3 September 2020 09:19 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/5 "2020-09-03T09:19:17Z")

</div>

So for example if I get skip messages inside Tidal I could try to increase the cFrameTimespan similar to how I would increase a buffer size inside a DAW?

---

<div class="post-metadata">

**Author:** ![Francesco\_Corvi](https://uzu.lurk.org/user_avatar/uzu.lurk.org/francesco_corvi/32/2826_2.png) [@Francesco\_Corvi](https://uzu.lurk.org/u/Francesco_Corvi)\
**Post date:** [3 September 2020 09:20 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/6 "2020-09-03T09:20:43Z")

</div>

I use both macOs and windows but my question was more general not just about my particular case

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [3 September 2020 12:14 UTC](https://uzu.lurk.org/t/tidal-cpu-optimization/2046/7 "2020-09-03T12:14:47Z")

</div>

Changing `cFramespan` will likely help.. In a slightly different situation (visualing patterns) I've expected that increasing the framerate would help, but actually decreasing it has improved efficiency massively. So try both directions.
