From: Sacher Khoudari <alsa-devel@craesh.net>
To: Mailing list for ALSA developers <alsa-devel@lists.sourceforge.net>
Subject: Need some help for a metronome
Date: Sat, 31 Jul 2004 01:31:48 +0200 [thread overview]
Message-ID: <410ADA64.6020006@craesh.net> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
I need some help to get my litle metronome to work. I'm an Alsa-Newbie,
so I'm sorry for this - probably - stupid question. I've copied some
code from tutorials and other Alsa-programs, so probably I've forgotten
some details. But I don't know what.
The error has to be in this function, it gets called every time a "tick"
has to be played, but it doesn't send any MIDI-events. At least,
fluidsynth doesn't play anything (nor prints any events in verbose mode).
- --snip--
void schedule_event( guint8 i_velocity, guint i_ticks ) {
guint i_channel = 10;
guint i_note = 33;
guint i_duration = 1;
snd_seq_event_t ev;
snd_seq_ev_clear( &ev );
//ev.type = SND_SEQ_EVENT_USR0;
//ev.type = SND_SEQ_EVENT_NOTE;
snd_seq_ev_set_source( &ev, my_port );
snd_seq_ev_set_subs( &ev );
//snd_seq_ev_set_dest( &ev, i_dest_client, i_dest_port );
snd_seq_ev_set_note( &ev, i_channel, i_note, i_velocity, i_duration );
snd_seq_ev_schedule_tick( &ev, my_queue, 0, i_ticks );
printf( "channel: %d, note: %d, velocity: %d, duration: %d, i_ticks
%d", i_channel, i_note, i_velocity, i_duration, i_ticks );
snd_seq_event_output( handle, &ev );
snd_seq_drain_output( handle );
}
- --snap--
The printf gets called, and the values are ok. I've also tried the
things which are commented out. Whats wrong, or missing? Can anyone help me?
Thanks!
Sacher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBCtpjdiWjuQmpvxoRApCaAKCtqGGsUeu3/ubPDbHR2WiHKBcr5QCg7SQY
XtvpXQYgTP/Tzs7gttVgpHo=
=xmct
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
reply other threads:[~2004-07-30 23:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=410ADA64.6020006@craesh.net \
--to=alsa-devel@craesh.net \
--cc=alsa-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.