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


Groups > comp.lang.python > #37574

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!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.070
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'subject:Python': 0.05; 'column': 0.07; 'work!': 0.07; 'currently,': 0.09; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lower-case': 0.16; 'luck,': 0.16; 'subject:send': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'jan': 0.18; 'file.': 0.20; 'tells': 0.22; 'installed': 0.23; "i've": 0.23; 'device': 0.24; 'header:In-Reply- To:1': 0.25; 'looks': 0.26; 'forgive': 0.27; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'case,': 0.29; 'file': 0.32; 'could': 0.32; 'mixed': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'thanks': 0.34; 'open': 0.35; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'list.': 0.35; 'but': 0.36; 'test': 0.36; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'help': 0.40; 'your': 0.60; 'most': 0.61; 'first': 0.61; 'more': 0.63; '2013': 0.84; 'ipad,': 0.84; 'seen?': 0.84; 'subject:commands': 0.84; 'subject:via': 0.84; 'mean.': 0.91; 'opera': 0.91; 'subject:iPad': 0.91; 'ports': 0.93; '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=bVOMNOBm3zn8SZ3DPPTbd/zVj0Hr1SkMqO7CfMhCdnU=; b=JmEy6bPXxJZR7RzjdbkrbfVVnkGDoifAkdLm8goDHNH8zgPvuDCSPwOBQemA5l/NzM 2YJWXQkOKAsuqxS2/Zvc6zfgV9/MggtqQImHt7LhKRAWPJ8pvmTr08rdCqlhY/U2/qf6 971JPR3MAB4GoibUP6J7A1dYzm8E8w3rmTFvRqgR+3j5+Z1RskoAUHNXn906pTIRfDDq WpXDaRGszHhPUvcrPE+M0B47v4z2Wa+mWBtrWyW8gwN0U0mBytplAjFb9q70jHRz6dNc s1o0w7o6xnJkjLrpc/o8BVYPqoW/r6+5bgaXvWU4/YCBPV4tbKLzCt4EmI1he1KIgJ6F bJYQ==
MIME-Version 1.0
X-Received by 10.66.9.2 with SMTP id v2mr4033864paa.18.1359028602278; Thu, 24 Jan 2013 03:56:42 -0800 (PST)
In-Reply-To <9793e716-4026-4465-b706-9fbe59358cae@googlegroups.com>
References <3612c184-28d6-4b58-9c70-fb83e103893e@googlegroups.com> <mailman.954.1359024291.2939.python-list@python.org> <9793e716-4026-4465-b706-9fbe59358cae@googlegroups.com>
Date Thu, 24 Jan 2013 22:56:42 +1100
Subject Re: Python to send Midi commands to iPad via USB
From Chris Angelico <rosuav@gmail.com>
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.971.1359028605.2939.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1359028605 news.xs4all.nl 6950 [2001:888:2000:d::a6]:59539
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37574

Show key headers only | View raw


On Thu, Jan 24, 2013 at 10:48 PM,  <mikprog@gmail.com> wrote:
> 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?

Heya! That was just an example; I used track number 19 from the opera
"Iolanthe" as my test file. Pick any other MIDI file you have handy.
Though, I may have my commands mixed up; aplaymidi may be more what
you want.

In any case, the key is the port number. Try this to enumerate ports:

$ aplaymidi -l

That's lower-case l for list. If that tells you about something that
looks like your iPad, you're in luck, ALSA has already done most of
the work! And you should be able to play any file with:

$ aplaymidi -p X:Y some-file.mid

where X:Y is from the first column of aplaymidi -l output.

On my system currently, I have 128:0 through 128:3 from TiMidity, and
14:0 "Midi Through". When my USB device is connected, I get a couple
more ports from it.

ChrisA

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