{"action":"created","issue":{"url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/178","repository_url":"https://api.github.com/repos/Arkq/bluez-alsa","labels_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/178/comments","events_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/178/events","html_url":"https://github.com/Arkq/bluez-alsa/issues/178","id":392811833,"node_id":"MDU6SXNzdWUzOTI4MTE4MzM=","number":178,"title":"Sound delay in raspberry pi midi keyboard project","user":{"login":"PJBrs","id":5177219,"node_id":"MDQ6VXNlcjUxNzcyMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/5177219?v=4","gravatar_id":"","url":"https://api.github.com/users/PJBrs","html_url":"https://github.com/PJBrs","followers_url":"https://api.github.com/users/PJBrs/followers","following_url":"https://api.github.com/users/PJBrs/following{/other_user}","gists_url":"https://api.github.com/users/PJBrs/gists{/gist_id}","starred_url":"https://api.github.com/users/PJBrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PJBrs/subscriptions","organizations_url":"https://api.github.com/users/PJBrs/orgs","repos_url":"https://api.github.com/users/PJBrs/repos","events_url":"https://api.github.com/users/PJBrs/events{/privacy}","received_events_url":"https://api.github.com/users/PJBrs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-19T23:00:30Z","updated_at":"2018-12-27T23:54:01Z","closed_at":null,"author_association":"NONE","body":"Hi, I'm trying to build a raspberrypi project where I play may midi keyboard and listen to the sound via bluetooth. Main reason for this: my children keep destroying my headphones by tripping over the wires. \r\n\r\nI've tried various combinations now of fluidsynth, timidity, bluealsa, and jackd, but I haven't found any way to reduce the delay between striking a key on my keyboard and hearing sound via bluealsa. I estimate the delay to be about 250ms, which unfortunately is way too long for playing the piano. I hope you can help me get rid of that delay!\r\n\r\nFirst, I did notice quite some open issues on github that mention delays with bluealsa:\r\nhttps://github.com/Arkq/bluez-alsa/issues/15\r\nhttps://github.com/Arkq/bluez-alsa/issues/124\r\nhttps://github.com/Arkq/bluez-alsa/issues/156\r\n\r\nHowever, I don't understand if, and how I can reduce it. I have the following questions:\r\nAre there tunables in the latest bluealsa code that I should try? Have any solutions been found already? I'm currently on raspbian stretch with bluealsa 1.3.0. Incidentally, I couldn't figure out what the \"defaults.bluealsa.delay\" setting was about, but it didn't seem to affect the delay... Really hope that I can get some advice!\r\n\r\nKind regards,\r\n\r\nPJBrs\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/comments/450256294","html_url":"https://github.com/Arkq/bluez-alsa/issues/178#issuecomment-450256294","issue_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/178","id":450256294,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDI1NjI5NA==","user":{"login":"nekarkedoc","id":10080270,"node_id":"MDQ6VXNlcjEwMDgwMjcw","avatar_url":"https://avatars2.githubusercontent.com/u/10080270?v=4","gravatar_id":"","url":"https://api.github.com/users/nekarkedoc","html_url":"https://github.com/nekarkedoc","followers_url":"https://api.github.com/users/nekarkedoc/followers","following_url":"https://api.github.com/users/nekarkedoc/following{/other_user}","gists_url":"https://api.github.com/users/nekarkedoc/gists{/gist_id}","starred_url":"https://api.github.com/users/nekarkedoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekarkedoc/subscriptions","organizations_url":"https://api.github.com/users/nekarkedoc/orgs","repos_url":"https://api.github.com/users/nekarkedoc/repos","events_url":"https://api.github.com/users/nekarkedoc/events{/privacy}","received_events_url":"https://api.github.com/users/nekarkedoc/received_events","type":"User","site_admin":false},"created_at":"2018-12-27T23:54:01Z","updated_at":"2018-12-27T23:54:01Z","author_association":"NONE","body":"Hi PJBrs,\r\n  I'm not one of the devs here, but I am quite interested in this project, and have spent quite some time with midi and PC/software synths. In my experience, bluetooth does introduce enough latency (time between controller midi on and audible sound produced) to make it unsuitable for live midi performance use. Latency is critically important for live performance because once it gets around 50ms or more, the delay between what the mind expects to hear at note press time and when the note is actually heard becomes great enough to make playing anything live virtually impossible as the ear/mind expect that instantaneous feedback of audible sound. On Windows or Linux, without bluetooth, I have been able to tweak an average of around 35-40ms latency, leaving very little headroom for addititional latency, and bluetooth, because of it's own buffering requirements, puts the latency very noticeably above 50ms. \r\nAdditional signal processing/effects each take their own toll on the overall latency experienced, like some of the reverb/chorus effects Qsynth provides, or external DSP software like Calf. \r\nI have actually successfully used a Pi3 as a midi soundsource for an maudio controller, with qsynth and Jackd, but had to use wired phones or speaker due to the latency. I found I had to tweak the audio buffers down in Jack to get the tolerable 30-4ms latency, but it would do a decent job as long as you didn't throw too many simultaneous notes at it, like a full run with the sus pedal on; It would become garbled, which is a sign you don't have enough buffers. But if you add buffers, your latency is diminished, making the Pi ok for practice, but not a performance. "}}
{"actor":{"display_login":"nekarkedoc"}}