title: Problem (maybe on ALSA Config.) running jack.Client() on jackclient-python
body: <p>I am trying to read the MIDI Input from a <a href="https://www.cme-pro.com/proline/product-detail.php-product_id=3.htm" rel="nofollow noreferrer">MIDI Keyboard</a> on Ubuntu 18.04 64-bit.</p>
  
  <p>I decided to use <a href="https://jackclient-python.readthedocs.io/en/latest/" rel="nofollow noreferrer">JACK Audio Connection Kit (JACK) Client for Python</a>. After the installation I want to run <a href="https://raw.githubusercontent.com/spatialaudio/jackclient-python/master/examples/midi_monitor.py" rel="nofollow noreferrer">a simple program</a> to print all received MIDI events.</p>
  
  <p>But after running </p>
  
  <pre><code>client = jack.Client('MIDI-Monitor')
  </code></pre>
  
  <p>I received </p>
  
  <pre><code>ALSA: Cannot open PCM device alsa_pcm for playback. 
        Falling back to capture-only mode
  Cannot connect to server socket err = No such file or directory
  Cannot connect to server request channel
  </code></pre>
  
  <p>At first I checked if the MIDI Keyboard is working. I used <a href="http://kmidimon.sourceforge.net/" rel="nofollow noreferrer">Kmidimon</a>, and I saw events when I pressed the keys. So the MIDI Keyboard works.</p>
  
  <p>Then I searched the web and tried the following:
  Use that command and let it run in background <code>jackd -R -d alsa -d hw:0,3</code> (and all possible combinations, 0 means card number, 3 means device number, see also the response for command <code>aplay -l</code>)</p>
  
  <p>Source: 
  <a href="https://askubuntu.com/questions/320946/jackd-does-not-work-aplay-l-shows-two-instances-of-the-same-card-ubuntu-13-04">https://askubuntu.com/questions/320946/jackd-does-not-work-aplay-l-shows-two-instances-of-the-same-card-ubuntu-13-04</a></p>
  
  <p>But the python program did not response me the events, when I pressed the buttons on the MIDI Keyboard.</p>
  
  <p>Here is a part of response for command <code>aplay -l</code></p>
  
  <pre><code>card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  card 1: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  </code></pre>
  
  <p>Could you please help me point out where the problem is?</p>