[music-dsp] What features does a good soft-sampler need ?
Olli Niemitalo
oniemita at mail.student.oulu.fi
Sat Jul 15 11:27:09 EDT 2000
On Sat, 15 Jul 2000, Benno Senoner wrote:
> we are currently designing an opensource MIDI software-sampler and wish
> to know what features a good (eg suitable for professional use) sampler
> would need. [...]
>
> For example how does the patch structure of good MIDI expanders like
> the roland JV 1080 etc look like ?
>
> any good webpointers which describe these structures ?
If you haven't yet done so, check out the SoundFont 2 specs at:
ftp://ftp.creaf.com/pub/emu/
> Where do we have to draw the line between a good sampler and a
> synthesizer ?
Volume, panning, filter. Those are the things i think you should implement
in your sampler. There! I put a resonant lowpass filter just perfect for
you at the end of this mail. (Made it for a friend's SoundFont 2
softsynth)
> Do you know any good mailinglists/newsgroups about these topics ?
There most certainly are people on this mailing list who are interested
in what you are doing, and i wouldn't say the subject is *that* far
from music-dsp. :) No idea how many ppl here are midi experts (i'm not).
alt.music.midi?
-olli
------------------------------------------------------
/* Resonant IIR lowpass filter 12dB/oct, maximally steep if amp = 1
*
* resofreq = pole frequency
* amp = magnitude at pole frequency (approx)
*
*/
double pi = 3.141592654;
/* Parameters. Change these! */
double resofreq = 5000;
double amp = 1.0;
DOUBLEWORD streamofs;
double w = 2.0*pi*resofreq/samplerate; // Pole angle
double q = 1.0-w/(2.0*(amp+0.5/(1.0+w))+w-2.0); // Pole magnitude
double r = q*q;
double c = r+1.0-2.0*cos(w)*q;
double vibrapos = 0;
double vibraspeed = 0;
/* Main loop */
for (streamofs = 0; streamofs < streamsize; streamofs++) {
/* Accelerate vibra by signal-vibra, multiplied by lowpasscutoff */
vibraspeed += (fromstream[streamofs] - vibrapos) * c;
/* Add velocity to vibra's position */
vibrapos += vibraspeed;
/* Attenuate/amplify vibra's velocity by resonance */
vibraspeed *= r;
/* Check clipping */
temp = vibrapos;
if (temp > 32767) {
temp = 32767;
} else if (temp < -32768) temp = -32768;
/* Store new value */
tostream[streamofs] = temp;
}
-----------------------------------------------------
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
More information about the music-dsp
mailing list