Hi,
I've been developing a simple realtime bassline softsynth (osc, adsr, lp filter) for ALSA (controlled using midi ports in alsa sequencer). The idea is to ultimately build a system that allows one to connect MIDI controlled virtual devices using cables. I'm hoping that I can skip writing a sequencer and use an external one (written by someone else). The simple synth is currently working pretty well with 2x128 samples of buffering and using snd_pcm_writei to write the samples (takes about 2% cpu with my sincm blit bandlimited oscillators, no optimization on a 450 Mhz machine) I've wrapped the parts of ALSA I'm using in C++ classes, which throw exceptions at every error so I shouldn't miss a single one. The midi implementation reads a midi event by testing snd_seq_event_input_pending and then using snd_seq_event_input to get the event. Seems I have a number of problems with the ALSA sequencer (and MUSE but I don't know if that's relevant) points 1 and 2 occur when I'm just running the synth by itself and connect the keyboard port to the synth with aconnect. 1) Playing frantically on the keyboard I sometimes get notes that are impossible to play on the keyboard (e.g. key 3) without error. The keyboard is a Roland PC-200 mk II. 2) Sometimes ALSA just plain crashes during playing, pcm seems to work but I get no input from the sequencer (the sequencer just stops giving events) After quitting the program even pcm stops working. I have to restart the driver to get it working. This happens even when I'm just writing zeroed data to the driver and dumping the midi events, no synth running, just to rule out a bug in the synth. 3) Running MUSE concurrently works fine when recording midi, playback breaks my synth (running as root and SCHED_FIFO/REALTIME). Is it possible it suspends the audio even when my synth supposedly owns it ? I'd expect xruns but seems that something else happens (configured so that it doesn't use audio ports at all). 4) The soundfont banks (.sf2) sound muffled (very low volume, all treble gone) in MUSE but the older banks (.sbk) work. The .sf2-banks sound ok when just using alsa (with aconnect) (This is probably a MUSE issue) This is no biggie, but it seems that snd_seq_event_input returns 1 on succesful read, not the number of bytes remaining as stated in the doxygen documentation or maybe I misread the source. -Timo _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel