[sdiy] New to list - and DSP development
KA4HJH
ka4hjh at gte.net
Mon Nov 29 10:03:43 CET 2004
>Two questions if anybody can point me in the right direction since I'm
>having no luck finding info on the web.
Looks like four questions to me. <smartass mode off>
I have no development experience in this area but I can partially answer
some of this...
>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?
OS 9--possibly but you'd be re-inventing the wheel. Almost all MIDI apps
are using OMS or FreeMIDI already so you might as well support them. I
remember some older apps having direct access to the MIDI port but they
were probably written back in the 7.5.x days.
OS X--use Core Audio MIDI and be done with it. OS X doesn't even support
the old serial ports except for the *internal* modem port.
>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?
Mac MIDI interfaces clock the serial port externally (there are some
schematics floating around the web--I have a collection of them around here
somewhere if you can't find one). 1MHz is the most common clock frequency
for simple interfaces. This had me baffled until I saw a schematic as I'd
never seen anything but simple RS-232 up to that point in time. And
remember that no Mac made in over five years even has a serial port in this
classic sense--you'll have to use USB or FireWire, or rely on a USB to
"serial" adapter. This is why using OMS or Core Audio is a really good idea
if you're talking about a serious product.
At some point back around the '020 and '030 period the modem port got
bumped up to 115k. LocalTalk was something like 282k or so.
>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?
Now that you ask I'd be interested to know myself. This is beyond my
experience.
>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?
Again this is beyond my experience. Sounds right but you'd have to ask a
real programmer.
>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.
This is what lists are for. This is all just off the top of my head. May
have missed something.
--
Terry Bowman, KA4HJH
"The Mac Doctor"
More information about the Synth-diy
mailing list