[sdiy] New to list - and DSP development

Kenneth Elhardt elhardt at worldnet.att.net
Mon Nov 29 07:12:50 CET 2004


This is Ken Elhardt.  Many already know me from other lists.  Since I'm
working on a possible future product I figured I'd sign up to get possible
tips and parts suggestions.  Since I haven't seen any past messages on this
list I'm not really sure how much is on topic.  For instance, before I write
the asm dsp code for the device I need to get the data and algorithms
working in C on a Mac (or PC if need be).  That involves reading Midi input
from a music keyboard and also synthesizing sound to be played in real-time.
As a game programmer I already know how to program multichannel sound both
in Mac's Sound Manager and PC's DirectSound.  But that only involves playing
back sampled sounds and manipulating those sounds about 30 times a second,
not having to worry about my place in time samplewise or reading Midi input.
Two questions if anybody can point me in the right direction since I'm
having no luck finding info on the web.

1)  I have an old Apple Midi interface that connects to my Mac serial port.
I don't need to install drivers for it to work.  So the question is, anybody
know if I can just read from it through the regular Mac Device Manager
serial port routines?

2)  Related to the above.  I sometimes see Midi setup dialogs refering to
0.5, 1, 2 megabits per second.  Since Midi is only about 31K baud and the
computer's serial ports only go to 57K baud, what the hell is that number
refering to?

3)  If anybody has any soft synth programming experience, what is the normal
way to keep a softsynth generating data at 44.1KHz.  Since Mac's and PC's
usually only have 1ms clocks it's not like I can sync up to a 44.1KHz clock.
Do you simply wait for the current sound buffer to finish playing and that
acts as your limit?  Or do you set up some kind of 44.1KHz interrupt?  Or is
there some other better way?

4)  Also I assume I generate sound in one buffer while another plays.  On
the Mac it's possible to jump to a call back routine when the buffer
finishes playing.  Is that the method used to switch to the 2nd buffer to
start playing and is that fast enough so no glitches occur?


Thanks for any tips.  I hope this isn't too far off topic, but it's part of
the initial process of getting out products that are more on topic.

-Elhardt




More information about the Synth-diy mailing list