MiniDisc Community Diese Anleitung in Deutsch: Diese Anleitung in Deutsch:
Minidisc FAQNEW: see my FAQ !!(answers and questions about the hardware/software and the system behind ...

What's the Problem ?

It's absolutely easy to record MD's. You can record a CD or using the Winamp record playlists.

Long time ago I used my Toshiba-CDROM with the build-in digial SPDIF-output to record CD's. Therefore I connect an optical SPDIF-transmitter (TOTX173) directly on the digital output at this CDROM. So it was very easy to record digital (optical) onto my MZ-R50. The absolut nicest thing was: the CDROM interrupted the SPDIF-datastream for a very short time between each track - so I had track markers - automatically !

Since some time I compress my CD collection with the program CDex onto my PC and use the Winamp to play - create playlists and record onto my MD. I recognized that there were no trackmarkers from now on... The reason therefor is the SBlive-Value. The digital output always send a valid data stream - even if there is no program using the playback capabilities. So I looked for a solution !


What is already done, what has to be improved ?


Getting the SPDIF-data out from the SBlive-VALUE

There are four (probably) similar outputs for the SPDIF-data available:

SBlive-Connector pinnaming

To find the right connection now the connector pinout of the Sblive-Value:

SBlive-Connector pinout


Connecting the optical transmitter TOTX173

I use the Toshiba optical transmitter TOTX173. This part is commonly used for soundcards and should be available in various electronic stores...

the TOTX173-pinout


The schematics

Now it's time to connect all the parts together. The control signal will be derived from one serial COM-port, which is neccessary for a simple programming. One serial connection should be usually unused - so it should be ok. Th control signal has to be adapted to TTL-levels, therefore we use the series resistor and the diode.

Don't forget the capacitors, and never leave unused inputs on the 74HC08 open ! We connect all unused inputs to GND, but they coul'd also tied to GND or VCC trough an small resistor, eg. 100Ohms.

The control signal for controlling the SPDIF datasream is the serial DTR signal (Data Terminal Ready). Following a small table describing the pin table for 9-pin and 25-pin SUB-D serial port connectors:

Name        25-pin         9-pin
---------------------------------------------------------
TxD           2             3       transmit data
RxD           3             2       receive data
RTS           4             7       request to send (here: power source)
CTS           5             8       clear to send
DSR           6             6       data set ready
GND           7             5       ground
DCD           8             1       data carrier detect (here: signal line)
DTR          20             4       data terminal ready

SBlive-to-MD-Schematics


The software

At the Winamp-Homepage there exist a developer page, where the API documentation and Visual-C++ programming will be described well. Thats why I will only describe the mainly used API's for my program. My program can be used and modifies according the GPL (GNU Public License). If someone has an usefull/special improvement - i woul'd be lucky to present the improved version here !

At first we look for the active WINAMP-application:

HWND hwnd_winamp = FindWindow("Winamp v1.x",NULL);

Now we're waiting for the 'is playing' status:

IPC_ISPLAYING returns the status of playback.
If it returns 1, it is playing. if it returns 3, it is paused,
if it returns 0, it is not playing.

int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING);

With the following API I try to catch the 'end of song' point to interrupt the SPDIF- datastream for at least 1..5msec:

IPC_GETOUTPUTTIME returns the position in milliseconds of the
current song (mode = 0), or the song length, in seconds (mode = 1).
Returns -1 if not playing or error.

int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME);

An interruption of 1msec seems to be enough and can be increased upto infinite. This is very usefull, because the MD recorder waits endless until the SPDIF-datastream returns.

The program itself (including all sources) can be downloaded here: MD-Track SoftwareMD-Track Software (24kByte)


If there's something unclear,or you need more informations don't hesitate to email me:


Copyright ©2002-2003 Tobias Schirmer