From: ki.ber.kom.uni.st <ki.ber@kom.uni.st>
To: alsa-devel@alsa-project.org
Subject: problems howto send simple 'noteon' event with pyalsa...
Date: Thu, 13 Mar 2008 12:58:06 +0100 [thread overview]
Message-ID: <95e4e4ce0803130458g7339fd65g7342f8a934db4a52@mail.gmail.com> (raw)
e,
i was happy user of PySeq [1] and it was easy to send directly
'noteon' event.. more or less in python interactoin session:
import pyseq
seq = pyseq.PySeq()
seq.createOutPort()
event = snd_seq_event()
event.setSource(0)
event.setSubscribers()
event.setNoteOn(ch, note, velocity)
event.sendAsIs(seq)
it seems that pyalsa will go along alsa development so i tried pyalsa.. but....
i tried this:
from pyalsa import alsaseq
seq = alsaseq.Sequencer()
seq.create_simple_port("myPort", alsaseq.SEQ_PORT_TYPE_APPLICATION,
alsaseq.SEQ_PORT_CAP_SUBS_READ | alsaseq.SEQ_PORT_CAP_READ |
alsaseq.SEQ_PORT_CAP_WRITE | alsaseq.SEQ_PORT_CAP_SUBS_WRITE)
event = alsaseq.SeqEvent(alsaseq.SEQ_EVENT_NOTE)
event.set_data({'note.note' : 0x40, 'note.velocity' : 127,
'note.duration' : 1, 'note.off_velocity' : 0})
event.dest = (20, 0)
seq.output_event(event)
seq.drain_output()
after drain it says:
"SequencerError: Failed to drain output: Invalid argument"
i can connect and disconnect ports around and (20,0) is functional
port where i send events with no problems from PySeq...
any ideas? do i have to use queues to be able to send 'noteon'.. for
my purposes it seems to me that that's overkill....
thanx..
[1] http://www.sci.ccny.cuny.edu/~brinkman/software/pyseq/
next reply other threads:[~2008-03-13 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 11:58 ki.ber.kom.uni.st [this message]
2008-03-13 12:34 ` problems howto send simple 'noteon' event with pyalsa Jaroslav Kysela
2008-03-13 18:07 ` Aldrin Martoq
2008-03-13 23:24 ` ki.ber.kom.uni.st
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95e4e4ce0803130458g7339fd65g7342f8a934db4a52@mail.gmail.com \
--to=ki.ber@kom.uni.st \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox