MIDI Latency
Date | 2017-03-11 20:52 |
From | Sam Smalley |
Subject | MIDI Latency |
Hi Csounders, Finally got around to doing MIDI stuff in sound. Is there a reason why the latency is so high between producing a midi message and receiving it and hearing it in Csound? Is it possible to reduce this latency? Also, wondering if it's possible to record the midi events into Csound (i.e. if I had a score already set up to play a melody from one instrument and I play along with the melody using a MIDI keyboard controlling another instrument and having that save) Thanks, Sam Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2017-03-11 20:59 |
From | Tarmo Johannes |
Subject | Re: MIDI Latency |
Hi, In my case on Linux using jack audio and alsa or jack misi module the latency is unnoticeable, it is not a Csound thing. What is your platform and realtime audio modules that you are using? Check also that the buffer sizes -b and -B and ksmps in csd file are not too big. Tarmo 11.03.2017 22:52 kirjutas kuupäeval "Sam Smalley" <ssmalley@berklee.edu>: Hi Csounders, |
Date | 2017-03-11 21:00 |
From | Aaron Krister Johnson |
Subject | Re: MIDI Latency |
What you are probably experiencing is audio latency, and you're noticing it b/c you are triggering the audio via MIDI. The first thing to do is to experiment with optimizing buffer sizes for your hardware setup. The other piece would be to set a lower 'ksmps' in your header, so that there are more sample blocks being sent per second. More here: On Sat, Mar 11, 2017 at 2:52 PM, Sam Smalley <ssmalley@berklee.edu> wrote: Hi Csounders, |
Date | 2017-03-11 21:05 |
From | Samuel Smalley |
Subject | Re: MIDI Latency |
Just looked again. It's definitely audio latency. Tried lowering ksmps but that did not change anything. What would be recommended buffer sizes? On Sat, Mar 11, 2017 at 4:00 PM, Aaron Krister Johnson <akjmicro@gmail.com> wrote:
|
Date | 2017-03-11 21:12 |
From | Richard van Bemmelen |
Subject | Re: MIDI Latency |
Attachments | midiRecord2.csd |
Buffers sizes are important here. What system are you on? It differs per system. I have attached a csd file I used for recording midi to a text file, while another track is playing, from a previous recorded file. It won't work as is, but it might give an impression how it can be done. Richard 2017-03-11 21:52 GMT+01:00 Sam Smalley <ssmalley@berklee.edu>: Hi Csounders, |
Date | 2017-03-11 21:13 |
From | Victor Lazzarini |
Subject | Re: MIDI Latency |
Not ksmps at first. Buffer sizes. Try to go as low as possible. It will depend on the audio backend. On OSX the rtauhal backend can go down to as low as -b 32 -B 128 and with ksmps >= 32. Portaudio callback mode (pa_cb) maybe -b 64 -B 256. Jack is possibly low as well (depending on the jack settings). On Linux, the alsa backend is probably the lowest latency. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 11 Mar 2017, at 21:05, Samuel Smalley |
Date | 2017-03-11 21:14 |
From | Samuel Smalley |
Subject | Re: MIDI Latency |
I'm on a MacBook Pro running OS X 10.10.5 On Sat, Mar 11, 2017 at 4:12 PM, Richard van Bemmelen <zappfinger@gmail.com> wrote:
|
Date | 2017-03-11 21:14 |
From | Victor Lazzarini |
Subject | Re: MIDI Latency |
I meant ksmps <= 32! ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 11 Mar 2017, at 21:13, Victor Lazzarini |
Date | 2017-03-13 08:06 |
From | Richard |
Subject | Re: MIDI Latency |
On OS X I use : -B1024 -b256 Richard On 11/03/17 22:14, Samuel Smalley
wrote:
|
Date | 2017-03-13 14:36 |
From | Aaron Krister Johnson |
Subject | Re: MIDI Latency |
Richard, in my experience, that might be a setting that doesn't give xruns, but it may not be snappy/responsive enough for MIDI; that is, if you don't want your performance to sound like the time/swing is terrible. But, YMMV. On Mon, Mar 13, 2017 at 3:06 AM, Richard <zappfinger@gmail.com> wrote:
|