W*ndows -> CV / Gate

Rene Schmitz uzs159 at ibm.rhrz.uni-bonn.de
Tue Oct 7 01:20:46 CEST 1997


Thanks all for the positive response :-)

Paul Perry wrote:

>what I wonder is, whether there is any standard for the use
>of a parallel port as a dac driver? there are devices on the
>market which are a resistor ladder built into a plug shell
>with a RCA connector on the other end for very cheap sound
>output...if there IS a standard of some kind it would be nice.

There seems to be a pseudo standard, since I found software 
that supported my homemade DAC (some MOD-players do!)
The standard is canonical in that way that d0 is the LSB and d7 is the MSB.
Different maximum output voltages can be cured by properly amplifiing.
(I have to do that anyway since the maximum output (at 0x7f) is 5V.)
The problem here is that you would still have to hack into the device, 
because you need to get a Gate pulse.

>are you adding DIN sync? ;)
>
Thats the next thing that I'll do...
...Yeah, my analog sequencer in Sync with software :-> ...

Mikko Helin wrote:

>Usual .DRV type drives should work as well with Windows 3.1x
>and Windows 95, as MM system is all 16-bit. You can indeed
>hack the device driver in MROUTER.ZIP, as there's the source
>code. 
Got me! That is exactly what I've done!
>It can be compiled with Borland and I guess with MSoft,
>C compiler. I have built a parallel port DAC around MAX7228,
>which is the same device Gene Stopp used, but it may be little
>different (no inverters for address decoding etc.), and
>there are maybe others with different design DACs, either
>simple R-2R ladders or multichannel DACs. So it would be nice
>to use a DLL for interface functions, so that different versions
>of MIDI drivers were not needed. A function like
>int UpdateDac(int Channel, int Value) is all that is needed
>in DLL, the name of DLL could be a string in SYSTEM.INI,
>like
>
>[MIDI2DAC]
>DACDLLName=C:\WINDOWS\SYSTEM\7228dac.dll
>(or DACDLLName=C:\WINDOWS\SYSTEM\r2rdac.dll)
>channels=8
>etc.
>
>This is just to keep the harware layer separated.

This sounds nice, since I don't want to support every type 
of DAC that possibly exists on the planet.
But I must say that I'm not very used to Windows programming.
So if someone on this list wants to help me ...
This driver is a DLL anyway, I had just to rename it into .drv .

For now I propose the following standard for monophonic use:

map d0 - d6 directly to a DAC (no inverters!)
d7 is the gate pulse 
strobe will be the sync 

amplify and bias the DAC output via an Opamp so that multiples of 
12 written to the port correspond to multiples of 1V (1V /Oct)

By the way:
A question to all that *have* already have build DACs for that
(monophonic) use, how is your mapping? 
I guess the mapping won't differ so much,
and the main difference is the use of inverters!
That could be implemented easily into the software!
So if you have info on that, please drop me a mail.
So I think that could get us arround the making of special
DLLs for different DACs. As long as they behave the same.

>If more control is needed, then there could be other
>calls to DLL functions (like when some cont. control
>messages are received from sequencer).

There sure will be.
Next thing I want is sync, and the problem with it is as follows:
I have the problem with the selection of the port address fixed
by simply mapping channels 1 & 2 to 0x278 (LPT 3) 3 & 4 to 0x378 (LPT 2)
and 5 & 6 to 0x3bc (LPT 1).
(Your LPT #'s may differ.)
It will be handled by program change messages in the future, but works for 
now.

The problem now with sync is thru which port to send the sync pulses?

The reason for two channels mapped to the same port is that on one channel
the Gate pulse is reset on a Note On, on the other not.
The behaviour is for now: last note played priority.

There will be other options like Hi/Lo Note priority.
Any suggestions?

And of course polyphony in the future.
I have an extension already in mind.

I'll be putting my current version of the driver on my webpage

http://www.uni-bonn.de/~uzs159/cvmidi.html

By the way: Anyone seen a windows *wave* driver that supports a LPT/DAC ?




More information about the Synth-diy mailing list