Skip to content
This repository has been archived by the owner on Mar 10, 2019. It is now read-only.

how to deal with latency issues #32

Open
1 of 6 tasks
lennart opened this issue Feb 5, 2017 · 4 comments
Open
1 of 6 tasks

how to deal with latency issues #32

lennart opened this issue Feb 5, 2017 · 4 comments

Comments

@lennart
Copy link
Contributor

lennart commented Feb 5, 2017

I think tidalcycles/Tidal#133 should be resolved before working on the latency issues in tidal-midi.

For future users we should therefore make sure that:

  • all controllers have a default latency of 0.1 (100ms)
  • Howtos on ask.tidalcycles.org are tagged midi and latency
    • "How to adapt latency settings to your needs?" has a sane answer
    • "How to sync tidal-midi with others?" has a sane answer
  • the MIDI section of tidalcycles.org has a note about the situation
  • tidal-midi README contains detailed description (work in 0.9-dev, also link to answers from former steps)

see #14 and #22 for background.

@lennart
Copy link
Contributor Author

lennart commented Feb 5, 2017

quick fix might be to get rid of the really old default of latency = 0.01 for all Volca Controllers which seems frequently used.

background: these defaults were originally used to set the latency for alsa in the first implementation of tidal-midi.

originally the keyproxy (which became midiproxy) used this latency to delay sending out midi events,
however this was added to the latency already existing in the proxy connection to tidal via OSC.

with tidal 0.7 and tidal midi being implemented with portmidi, we have no more proxying for MIDI but a generic tidal stream interface (decoupled from OSC).

now latency in ControllerShape becomes latency in tidal's Shape when you use a stream made from midiStream.

So if I remember correctly, the original alsa implementation used a shape latency of 0.04 (like dirt/superdirt still do) and added another 10ms on top for the proxy, if we want to restore the original latency this would now be 0.5.

However since 0.8/0.9 added multichannel (which adds load) it might still be best to increase default latency to 100ms (as said above latency = 0.1).

@lennart
Copy link
Contributor Author

lennart commented Mar 20, 2017

@telephon I read you updated superdirt to default to latency = 0.2, is this something we should consolidate as well across tidal/tidal-midi? e.g. let tidal-midi 0.9.1 switch to 0.2 as well?

@telephon
Copy link

yes we should definitely consolidate this, in particular because you may want to use midi and osc in combination.

It would be optimal if one could set that value at runtime.

@diegodorado
Copy link

+1 for setting that value at runtime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants