Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:Python': 0.05; 'linux,': 0.05; 'python': 0.09; '24,': 0.16; 'bindings,': 0.16; 'first:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'one)': 0.16; 'pypi.': 0.16; 'subject:send': 0.16; 'tweak': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'jan': 0.18; 'app': 0.19; 'example': 0.23; "i've": 0.23; 'connected': 0.24; 'external': 0.24; 'header:In-Reply-To:1': 0.25; 'message- id:@mail.gmail.com': 0.27; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'application': 0.40; 'think': 0.40; '(that': 0.62; 'success': 0.63; 'believe': 0.69; '2013': 0.84; 'cable': 0.84; 'commands.': 0.84; 'subject:commands': 0.84; 'subject:via': 0.84; 'subject:iPad': 0.91; 'ipad': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=KiBqGkkQBV4/7Th9nk/UDuGfU9N+1JUByKlK72AKGy8=; b=s37d3JLD30lK2EAWMETARM1NJ5NGwMToVBzTxd5dOyDj8Jm9ItScDi7O8Xoe4QFxi9 j8+WpN1F+eBDqn2Cop7Us1vriGTlE7QoU78+MrmfTCqdIMPgDT3A3tEIwChndI5IhCfn xpqHacJ6tiF81dQDPJwiubY3RS/iE6T1ic1/UHKcr+pAQmY19FJg7UZ4mvhuI9BUPSFA SjUzGsr9IPfA2u2No3b79oh8ozjRF2OxcMfrI3Ilt89yh+hdrvkWzMuBiJrgy29gDCiX seHBna4fbP0JZ03Kax3VR5H/BFyXsrUGeBsbTpc7lBVL7t7Ixx6cYfySFLpRt+MXf1PC QDVQ== MIME-Version: 1.0 X-Received: by 10.68.125.195 with SMTP id ms3mr3440292pbb.149.1359024287661; Thu, 24 Jan 2013 02:44:47 -0800 (PST) In-Reply-To: <3612c184-28d6-4b58-9c70-fb83e103893e@googlegroups.com> References: <3612c184-28d6-4b58-9c70-fb83e103893e@googlegroups.com> Date: Thu, 24 Jan 2013 21:44:47 +1100 Subject: Re: Python to send Midi commands to iPad via USB From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359024291 news.xs4all.nl 6948 [2001:888:2000:d::a6]:50839 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37554 On Thu, Jan 24, 2013 at 9:31 PM, wrote: > What I have to do is to write a Python application that will send MIDI commands to an iPad application. > All I know is that the iPad application can be connected to an external Midi deck through a usb cable and be controlled. > So I think I would connect the iPad via USB to my computer and... try to send midi commands. 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. My example is from Linux, so you may need to tweak things on other OSes. ChrisA