Page 2 of 2

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Mon Jul 25, 2016 4:30 pm
by pan
Hi everyone, I'm new here, anybody help?
I have Focusrite Saffire Pro 24 sound card and use UbuntuStudio 16.04 Xenial Xerus LTS. I was surprised when I saw, that the new OS supports my sound card. I had to set the snd_dice module to blacklist on boot system, so as the sound card was accepted via firewire. My midi controller M-Audio Oxygen 88 is connected to sound card through midi cable, but if I play something, the sound card (or QJackCtl?) is unstable. The QSynth (also instruments in Ardour) not reproduce all tones that I play, only some. Sometimes when i pressed on midi keyboard high tone, Qsynth, Yoshimi or Ardour played very low tone. It is like in my audio sample.
phpBB [audio]
I have Xruns in JACK. When I set in JACK "Frames/Period:" - 1024 or 2048, there are no xruns, but there are big latency - 64 msec for example.
Sorry for my english. I hope that you understand me :)

Messages from JACK:

Code: Select all

18:16:24.054 Statistics reset.
18:16:24.058 ALSA connection change.
18:16:24.060 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = Adresár alebo súbor neexistuje
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
18:21:05.383 D-BUS: JACK server is starting...
Mon Jul 25 18:21:03 2016: Starting jack server...
Mon Jul 25 18:21:03 2016: JACK server starting in realtime mode with priority 10
Mon Jul 25 18:21:03 2016: self-connect-mode is "Don't restrict self connect requests"
Cannot connect to server socket err = Adresár alebo súbor neexistuje
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
18:21:05.454 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Mon Jul 25 18:21:05 2016: Saving settings to "/home/pan/.config/jack/conf.xml" ...
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:01 (Anlg/In:03)_in'
Mon Jul 25 18:21:05 2016: New client 'firewire_pcm' with PID 0
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:02 (Anlg/In:04)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:03 (Anlg/In:01)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:04 (Anlg/In:02)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:05 (SPDIF/In:01)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:06 (SPDIF/In:02)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:07 (ADAT/In:01)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:08 (ADAT/In:02)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:09 (ADAT/In:03)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:10 (ADAT/In:04)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:11 (Mute:00)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/Out:12 (Mute:00)_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_midi 0_in'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:01 (Line/Out:03)_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:02_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:03_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:04_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:05_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:06_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:07_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_1394/In:08_out'
Mon Jul 25 18:21:05 2016: graph reorder: new port 'firewire_pcm:00130e0401c07901_midi 0_out'
Mon Jul 25 18:21:05 2016: New client 'PulseAudio JACK Sink' with PID 3619
Mon Jul 25 18:21:05 2016: Connecting 'PulseAudio JACK Sink:front-left' to 'firewire_pcm:00130e0401c07901_1394/In:01 (Line/Out:03)_out'
Mon Jul 25 18:21:05 2016: Connecting 'PulseAudio JACK Sink:front-right' to 'firewire_pcm:00130e0401c07901_1394/In:02_out'
Mon Jul 25 18:21:05 2016: New client 'PulseAudio JACK Source' with PID 3619
Mon Jul 25 18:21:05 2016: Connecting 'firewire_pcm:00130e0401c07901_1394/Out:01 (Anlg/In:03)_in' to 'PulseAudio JACK Source:front-left'
Mon Jul 25 18:21:05 2016: Connecting 'firewire_pcm:00130e0401c07901_1394/Out:02 (Anlg/In:04)_in' to 'PulseAudio JACK Source:front-right'
18:21:07.674 JACK connection change.
18:21:07.674 Server configuration saved to "/home/pan/.jackdrc".
18:21:07.675 Statistics reset.
18:21:07.677 Client activated.
18:21:07.677 Patchbay deactivated.
18:21:07.683 JACK connection graph change.
Mon Jul 25 18:21:07 2016: New client 'qjackctl' with PID 7815
18:21:22.964 JACK connection graph change.
18:21:22.981 XRUN callback (1).
Mon Jul 25 18:21:22 2016: New client 'qsynth' with PID 7858
Mon Jul 25 18:21:22 2016: Connecting 'qsynth:l_00' to 'firewire_pcm:00130e0401c07901_1394/In:01 (Line/Out:03)_out'
Mon Jul 25 18:21:22 2016: Connecting 'qsynth:r_00' to 'firewire_pcm:00130e0401c07901_1394/In:02_out'
Mon Jul 25 18:21:22 2016: ERROR: JackEngine::XRun: client = qsynth was not finished, state = Running
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackEngine::XRun: client = qsynth was not finished, state = Triggered
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Jul 25 18:21:22 2016: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
18:21:23.143 JACK connection change.
18:21:23.747 XRUN callback (1 skipped).
18:21:31.447 JACK connection change.
Mon Jul 25 18:21:31 2016: Connecting 'firewire_pcm:00130e0401c07901_midi 0_in' to 'qsynth:midi'
Mon Jul 25 18:21:32 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:32 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:32 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:32 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:32 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:36 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 2 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:36 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:36 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:36 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 1 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.
Mon Jul 25 18:21:36 2016: ERROR: JackMidiRawInputWriteQueue::HandleIncompleteMessage - Discarding 2 MIDI byte(s) of an incomplete message.  The MIDI cable may have been unplugged.

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Mon Jul 25, 2016 9:56 pm
by folderol
Those last messages are very revealing, and would explain both the loss of notes, and the wrong pitch ones. Something is seriously corrupting the incoming MIDI.

Have you checked the previous messages on this thread?

Have you tried a different keyboard and lead? Do they work OK on a different system?
Is it a proper MIDI lead, and not just a 5 pin audio one, or are you picking up MIDI over USB?

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Tue Jul 26, 2016 8:47 am
by pan
Yes, I checked previous messages, but I have not tried downgrade firmware so I'm going to contact focusrite support for downgrade software. I have not any other keyboard. I tried other midi cable but there the same result. On Windows 7 works all perfectly. I play MIDI through 5pin cable, not through USB, even though M-audio Oxygen 88 can be connected via USB (but the same problem in linux).

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Wed Jul 27, 2016 1:55 pm
by pan
Focusrite support wrote, that is wrongly configured DAW for midi communication. So why does it also in other programs like Qsynth, Yoshimi..? Hmmm.. :?

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Wed Jul 27, 2016 2:42 pm
by folderol
OK, back to basics - but using only stuff I know well! You will need to work from a terminal window.

First, *don't* start jack in any form.

Start yoshimi with the following command:
yoshimi -a -A
No matter what version or settings you have for Yoshimi that will ensure it is using ALSA for both MIDI and audio
Next type the following two commands
aconnect -i
aconnect -o

The first command should show your keyboard with a number in front of it (I get 'client 20: Hua Xing')
The second command should show Yoshimi's client number and name (I get 'client 128: yoshimi')

Then use aconnect to connect these - input client number first.

In my case that is:
aconnect 20 128

If you now play your keyboard you should get sound from yoshimi. If that works OK it is something related to Jack that is the problem. If it's still giving missing or wrong notes then it really is a system failure of some kind, and my thought is you'd be best of starting from scratch again with the latest version of (say) mint.

If you see blue level bars in Yoshimi but get no sound, it's the audio side that has a problem - I really don't think that's likely unless pulse audio is screwing up.

If you get no response at all from Yoshimi, confirm that it can produce *something* by clicking on 'virtual Keybd and then clicking on some keys. You should see the blue level bars and get sound.

Also you can try running something like VkeyBd and using aconnect to connect that to yoshimi. This will confirm that internally MIDI is working correctly, and would suggest it's a hardware issue of some sort (although it could still be some sort of interrupt contention).

Hope this helps.

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Thu Jul 28, 2016 3:59 pm
by pan
HI,
here it is:

Code: Select all

pan@pan-All-Series:~$ yoshimi -a -A
Yoshimi is starting
Error, alsa audio: alsa audio mmap not possible: Invalid argument
March little endian = 1
Format = Signed Little Endian 32 Bit 2 Channel
Using alsa_audio for audio and alsa_midi for midi
Yoshimi 1.3.8.2
Clientname: yoshimi
Config: Audio: alsa -> 'default'
Midi: alsa -> 'default'
Oscilsize: 512
Samplerate: 44100
Period size: 256

Yay! We're up and running :-)
/home/pan/.yoshimi_history: No such file or directory
yoshimi> Alsa xrun recovery good
aconnect -i
Unrecognised
yoshimi > aconnect -o
Unrecognised
yoshimi > 
I connect my firewire card through ALSA driver in qJACK and when I started yoshimi, everything went well, yoshimi played every tones which I played with midi controller but lowest latency with ALSA driver was about 11ms. There was no xruns. Interesting.. Why it doesn't work properly over FireWire.

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Thu Jul 28, 2016 6:49 pm
by folderol
That latency is about right for a period size of 256.

Apologies for not letting you know that you needed to run the aconnect commands in a different terminal. There are ways to do it in the same window, but I don't want to complicate things!

At least you have now proved that the basic subsystem is working. Maybe also try with jack running, in which case you should use:
yoshimi -a -J -K
This should still use alsa midi but jack audio, and should auto-connect to the main audio L/R outputs.

Beyond that I can't help I'm afraid. I don't have any firewire kit and use either PCI cards or USB

Re: [SOVLED] Saffire Pro 40 - Errors in MIDI stream

Posted: Mon Aug 01, 2016 8:31 pm
by pan
I solved it differently, not the way I wanted to, but it works. I connected my midi keyboard via usb to computer, started JACK with firewire driver and connected to yoshimi. Yoshimi played every tones correctly at the same time when I pressed any key. I wanted connection through midi cable, but will be USB.