Re: Direct Delivery of NoteOn events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Clemens!

This applies only to note events, not to note on events.
Note events are split into a note on and a note off event.

Gotcha. That is what I meant. :)

int queue = snd_seq_alloc_queue( our_parcel->seq );

You must create the queue before you try to send events through it.

I attempted this which still does not work correctly.  >>> indicates changes.

//Queue
snd_seq_queue_tempo_t *tempo;
>>> int queue = snd_seq_alloc_named_queue( our_parcel->seq, "Q1" );
snd_seq_queue_tempo_alloca( &tempo );
snd_seq_queue_tempo_set_tempo( tempo, 1000000); 
snd_seq_queue_tempo_set_ppq( tempo, 48 );
snd_seq_set_queue_tempo( our_parcel->seq, queue, tempo );
>>> snd_seq_start_queue( our_parcel->seq, queue, NULL );

snd_seq_ev_clear( &event );
snd_seq_ev_set_source( &event, our_parcel->out_port );
//snd_seq_ev_set_subs( &event );
snd_seq_ev_set_dest( &event, dest.client, dest.port );
snd_seq_ev_schedule_tick(  &event, queue, 0, 20000 );
snd_seq_ev_set_note( &event, 1, 67, 127, 800 );

Note, that above I have tried both using subscriptions and directly sending to the destination port. Neither works correctly when i am sending the alsa event to another process, but snd_seq_ev_set_dest() does work when sending to another port in the SAME process/client.  I verified this using another thread listening on the 2nd port. Pretty odd.  Finally, I output the event and drain the output...

>>>snd_seq_event_output( our_parcel->seq, &event );
snd_seq_drain_output( our_parcel->seq );

I've read thru a couple of small programs now which seem to do just this but actually work.  Any idea what i am missing?
thanks a bunch ,
-paul


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux