Re: [linux-audio-dev] disk-based sampler:

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] disk-based sampler:
From: Chris Baugher (baugher_AT_enteract.com)
Date: Fri Jul 14 2000 - 21:46:27 EEST


Hello,

I was just playing with your disk-sampler and I've run into two problems.
First, mlockall() returns an error. Second, the program immediately exits
after I hit the first note. Here is the output:

fluke:/home/cygnus/linuxsampler# ./disksamp ./sine.sam
main start ....
Instrument::load fd=3
header res=16400
LOAD: num_waves=61
WARNING, can't mlockall() memory ! mlockall: Cannot allocate memory
midi: start ....
WARNING, can't mlockall() memory ! mlockall: Cannot allocate memory
AUDIO: using STEREO output
using ALSA audio output ....
ALSA: fragmentsize=128
ALSA: numfragments=3
WARNING, can't mlockall() memory ! mlockall: Cannot allocate memory
ERROR in read_midi_bytes: read: Resource temporarily unavailable
fluke:/home/cygnus/linuxsampler#

The "ERROR in read_midi_bytes:" only appears when the first note is hit.
I tried putting a usleep(200000) in the MidiIn main loop. The error
doesn't apear and sometimes it makes noise but not always. Is it possible
this is an ALSA problem? What version are you using?
I tried the test program rawmidi.c in alsa-lib/test and it produces notes
so it seems midi is working. aplay works fine as well.
This is what my system looks like if it helps:

Pentium 250 (overclocked)
64MB ram
3.2 gig EIDE disk
SB AudioPCI (ens1371)
crappy old Yamaha keyboard
2.2.14 kernel patched for low-latency
ALSA 0.5.8b

Ideas?

BTW, I think this is a very cool project. I would someday like to get a
midi drumkit(I am a drummer and YES drummers are very latency sensitive:)
and if I could use my PC as the sound module that would be fantastic! I
don't know how much I could contribute to this project but I'll see what I
can do.

Chris|

On Thu, 13 Jul 2000, Benno Senoner wrote:

> Hi,
>
> I found a small (but nasty) bug in the playback engine:
> when the file reached EOF the diskstreamer disabled the stream
> but the voice was still active and so the associated ringbuffer.
> So in some rare cases a new Note-on reused the freed stream and
> interacted with the ringbuffer which that the audio thread still accessed.
> That caused two voices and one disk stream accessing the same buffer,
> causing nice audible glitches. You see that when designing async communication
> you have to be _VERY_ careful because all sorts of races are waiting around the
> corner.
>
> Regarding the sample generator , I added vibrato support ( HZ and amount)
> to make the sounds more interesting. (the README describes how to use vibrato)
>
> the new release is here:
>
> www.gardena.net/benno/linux/linuxsampler.tar.gz
>
> play with it and stress it as much as you can.
>
>
> still waiting for your comments ....
>
> Benno.
>


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jul 14 2000 - 22:56:18 EEST