Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37573

Re: Python to send Midi commands to iPad via USB

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet-fr.net!nerim.net!novso.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <mikprog@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.039
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'essentially': 0.04; 'root': 0.04; 'subject:Python': 0.05; 'python': 0.09; 'to:addr:comp.lang.python': 0.09; 'weak': 0.09; 'cc:addr:python- list': 0.10; '002': 0.16; '007': 0.16; '008': 0.16; '24,': 0.16; 'bindings,': 0.16; 'corp.': 0.16; 'decent': 0.16; 'first:': 0.16; 'one)': 0.16; 'pypi.': 0.16; 'subject:send': 0.16; 'utc,': 0.16; 'wrote:': 0.17; 'processor': 0.17; '(or': 0.18; 'app': 0.19; 'foundation': 0.20; 'keyboard': 0.22; 'cc:2**0': 0.23; 'installed': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'device': 0.24; 'linux': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'forgive': 0.27; "doesn't": 0.28; 'chris': 0.28; 'bus': 0.30; 'thursday,': 0.30; 'point': 0.31; 'file': 0.32; 'could': 0.32; 'received:google.com': 0.34; 'thanks': 0.34; '2.0': 0.35; 'open': 0.35; 'board': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'sure': 0.38; 'application': 0.40; 'where': 0.40; 'help': 0.40; 'think': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; 'link': 0.60; 'remove': 0.61; '(that': 0.62; 'success': 0.63; 'our': 0.65; 'where:': 0.65; 'integrated': 0.66; 'secure': 0.67; 'believe': 0.69; 'wish': 0.70; 'acts': 0.71; '001': 0.84; '005': 0.84; '2013': 0.84; 'cable': 0.84; 'hub': 0.84; 'seen?': 0.84; 'similar)': 0.84; 'subject:commands': 0.84; 'subject:via': 0.84; 'usb.': 0.84; 'mean.': 0.91; 'subject:iPad': 0.91; 'ipad': 0.95
X-Received by 10.50.191.131 with SMTP id gy3mr338737igc.1.1359028096980; Thu, 24 Jan 2013 03:48:16 -0800 (PST)
Newsgroups comp.lang.python
Date Thu, 24 Jan 2013 03:48:15 -0800 (PST)
In-Reply-To <mailman.954.1359024291.2939.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=94.197.127.40; posting-account=EvoLHwoAAAAe6MGgc84vdAuhA1J1BvTN
References <3612c184-28d6-4b58-9c70-fb83e103893e@googlegroups.com> <mailman.954.1359024291.2939.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 94.197.127.40
MIME-Version 1.0
Subject Re: Python to send Midi commands to iPad via USB
From mikprog@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.970.1359028105.2939.python-list@python.org> (permalink)
Lines 59
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1359028105 news.xs4all.nl 6901 [2001:888:2000:d::a6]:53526
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37573

Show key headers only | View raw


On Thursday, January 24, 2013 10:44:47 AM UTC, Chris Angelico wrote:
[..]
> 
> Are you able to hook into ALSA? I've had reasonable success driving a
> 
> USB-MIDI cable using ALSA. See if you can do it with the inbuilt
> 
> 'pmidi' app first:
> 
> 
> 
> $ pmidi -p 128:0 No.19.mid
> 
> 
> 
> (that uses port 128:0 which is a TiMidity-provided one)
> 
> 
> 
> If that works, you can then look for Python ALSA bindings, which I
> 
> believe are available on PyPI.
> 

Thanks for your help Chris!
forgive my ignorance, but I am not sure what you mean.
I've installed pmidi and what I get is:

~$ pmidi -p 128:0 No.19.mid
Could not open file No.19.mid

Doesn't that mean that the iPad is not seen?

where:
~$ lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp. Integrated Keyboard
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp. Integrated Touchpad / Trackstick
Bus 006 Device 002: ID 192f:0416 Avago Technologies, Pte. 
Bus 002 Device 003: ID 05ac:12a4 Apple, Inc. 


Essentially the reason to use the iPad is because we have to make a demo where with our hardware we send midi commands and the iPad has a very good DJ application that can be used with a USB midi controller.
So I wish to connect our hardware to a Raspberry Pi (or similar) via BLE and then the board (Raspberry Pi) to the iPad through USB cable.

I think the weak point is communication from the Raspberry Pi (or PC) to the iPad via USB. I could actually remove that if I find a decent Linux/Python application that acts as a DJ deck.

I am having a look at pygame.midi as well, but I am not sure how to link that with a USB cable.

mik

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python to send Midi commands to iPad via USB mikprog@gmail.com - 2013-01-24 02:31 -0800
  Re: Python to send Midi commands to iPad via USB Chris Angelico <rosuav@gmail.com> - 2013-01-24 21:44 +1100
    Re: Python to send Midi commands to iPad via USB mikprog@gmail.com - 2013-01-24 03:48 -0800
      Re: Python to send Midi commands to iPad via USB Chris Angelico <rosuav@gmail.com> - 2013-01-24 22:56 +1100
        Re: Python to send Midi commands to iPad via USB mikprog@gmail.com - 2013-01-24 04:25 -0800
          Re: Python to send Midi commands to iPad via USB Chris Angelico <rosuav@gmail.com> - 2013-01-24 23:36 +1100
        Re: Python to send Midi commands to iPad via USB mikprog@gmail.com - 2013-01-24 04:25 -0800
    Re: Python to send Midi commands to iPad via USB mikprog@gmail.com - 2013-01-24 03:48 -0800
  Re: Python to send Midi commands to iPad via USB rusi <rustompmody@gmail.com> - 2013-01-24 11:22 -0800

csiph-web