digiconv - convert SDII to PCM or WAV

or: convert binary data from mac to pc

latest: 0.31b / 6.1.2002
this text: V0.22 / 28.11.2001


"quick download and use"


history

I usually work on a PT24Mix system that resides on G4 Macintosh. Some day I wanted to backup a session and the only way was to transfer all the files via ftp over local ethernet to a win95-machine and burn it on a CD-ROM there. But some weeks later I tried to reopen the session from that CD and it did not work at all. Later I found out that the so called ressource-fork each file on a Mac has besides its normal file-data got lost during the ftp-transfer. Unfortunately ProTools stores all the header info of sample-files in that mystic ressource-fork and is without it unable to open it. Moreover the session-files are destroyed as well.

So after trying to reconstruct the ressource-fork without any real success I thought probably there is another way. That time it happened that I installed PTFree on my Intel-PC at home. Of course it was not able to import any of the files from that CD as well. Even WaveLab was not able to import the files as PCM-data. But it gave me the opportunity to test the format of the sample-data out. So after a little programming I got a tool that converted my pure SD2-data-files to the right format either PCM- or even WAV-files - what by the way is somehow just PCM-data with a header. But you should be aware that any additional information that PT stores in the ressoucre-fork is lost forever, just the pure sample data is recoverable.

In order to lift the secret: the binary format of the two platforms is different. Although both work on a basis of 8-bit-words a Mac stores a value with 16bits in the human-logical way: first the high and then the low 8-bit-words. The PC-platform does it vice-versa: first the low and then the high 8-bit-word. The magic is to simply change the order of the bytes.

The first version was created using an old Pascal-Compiler for DOS. This turned out to just a quick command-line tool. But during testing I realized that it was awful slow. So I tried to find out why. I got a Pascal Compiler for Linux and without any change in the code it worked about 4 times faster on the same machine. (see below) If you're interested you may download the sourcecode and the two compiled binaries as well, although the linux-version did not produce a correct wave-header!

For the speed reason and of course it is common nowadays to have a graphical user interface I wanted to have a version for Windows in 32bit-mode, what means to have a real application window and so on. The easiest way to do so was to port the existing code to Delphi and give it a user interface. That was not the problem. But it wasn't really faster than the old DOS-version. So I tried around some other conversion routines and finally found a way to do it amazingly quick. Of course I could now change the code for the DOS and linux-tools as well. But for now I see no reason for doing that.


complete instructions (hopefully)

Please be informed that I see the actual version more as an early beta-release than a complete application!

input files: SD2 files from a Mac, 16 or 24 bits (not both at the same time!)
output files: PCM-data or .WAV-files for PC

Besides: Of course you may convert any type of binary data in either direction, as long as you do not add the .wav-header. Since it simply changes the order of the bytes you can do the conversion as often as you like until it suites your needs or perhaps to do some kind of benchmarking :-)

To add a file to the list click on "add file" and select the file(s) to add. You may do that as often as you like.

To remove a file from the list select it and press "remove selected". When there is no file selected the uppermost is removed.

After selecting the source file(s) you have to select the bitrate. That is necessary to know in order to correctly changing the bytes around. In case you don't know or you're unsure you may try to use my nice little "guess"-button. The secret: the size of 16bit-files has to be divisible by 2 the size of 24bit-files by 3. Unfortunately your file might be devisable by 2 and 3, then you still may try both settings :-) If you have more than one file in the list you may select one after another. The "guess"-function always checks the selected entry. If there is none selected it takes the first one. Be sure to only have source files of the same bitrate, as the setting gets applied to all files processed.

If you want to convert to a .wav-file select the checkbox and enter or choose a samplerate and select whether it is mono or stereo. Those values only get written into the header of the wave-file and they are not necessary for the conversion. But any application using .wav-files relies on the information in the header. Again the setting gets applied to all files processed.

"use Output path": if checked ALL! processed files go into the specified folder. That's if you're converting directly from a CD-ROM (remember that the ROM stands for read-only-memory). You may change it using the "browse"-Button or by editing the edit-field. It is initially taken from the 1st added file. If left unchecked each output file will be created in its source's directory.

"Output extension": If you want to change the extension of the created files. Anything in here simply gets appended to the sourcefile's name. Defaults are .pcm or .wav. If left empty an error message appears, as you better don't write to the same file you're reading.

Pressing "Do it!" starts the conversion. The button is grayed out and shows the number of the file processed and the conversion progress in bytes down to zero. All buttons and input-elements are disabled, except the former Bye-Button that may be used to interrupt the conversion. A progress bar informs you of the progress (what else?). When finished all the little buttons and fields are enabled again.

To quit press "Bye"...

As far as I know there should be no more functions. No drag&drop, no registry, no eastereggs...

and finally here is a nice screenshot:screenshot

As you see it is not meant to win a design award (yet).


download

Version 0.22

exe for Win32 in zip-format (199kB) 28.11.2001
added:

  • progress bar :-)
  • conversion now is interruptable
  • the ouput path is now a choice
  • some internal modifcations
Version 0.21

exe for Win32 in zip-format (190kB)
added:

  • mono/stereo - switch for wav-output
  • selectable output-path, but now the same for all files
Version 0.2

exe for Win32 in zip-format (170kB)
changed:

  • new conversion routine, extremely quicker
  • GUI
Version 0.1

zip-file (95kB) including: (09/2001)

  • Pascal source
  • DOS-exe
  • Linux-ELF (read above!)

I don't recommend getting these files, except you want to look at the source and know what you are doing! No further documentation yet!

I only tested it on Windows 9x. A quick testrun on Win2000pro was successful. If there are issues on other versions please tell me!

There is NO readme or documentation included yet. So better read this page carefully!


performance

Some examples in case someone is interested. The bitrate does not really matter, but the filesize. I guess the performance of Version 0.2 could easily be further improved. Perhaps later...

System: AMD Athlon 600 MHz, 196MB Ram, UDMA-66 HD
Version 0.2x Win98, 4 files, total approx. 95MB, 16bit 30 sec
  Win98, 1 file, 25MB, 16bit 6 sec
  Win98, 2 files, total approx. 53MB, 16bit, from CD-ROM to HDD 30 sec
     
Version 0.1 DOS, 1 file, 1.4MB, 24bit 14 sec
  DOS, 1 file, 25MB, 16bit 4 min 40 sec
  Linux, 1 file, 1.4MB, 24bit 4 sec
  Linux, 1 file, 25MB, 16bit 1 min 40 sec
     
System: PentiumPro 350 MHz, 128MB Ram, SCSI-UW HD
Version 0.2 Win95, 4 files, total approx. 95MB, 16bit 40 sec
     
System: Cyrix M200MX (Pentium 150MMX), 32MB Ram, UDMA-33 HD
Version 0.1 Linux, 1 file, 1.4MB, 24bit 24 sec

...any additional experiences?


contact & feedback & issues

The software is provided as it is. I will neither charge anything for using it nor take any guarantee that it does what you expect it to. Especially I'm not to be held responsible for any damage to your system or your data. Always have a backup copy of all your important stuff! Use at your own risk!
In case you like it or you even want to copy and publish it I would really like you to always name the original source (that's me). If you would like to donate some money for my great work you're always welcome :-).

As you see the little version-number you guess that the software is at developing stage. So if you would like to give me some feedback or you even want to contribute to the development please do that!

contact me via email: digidesign@guessmer.de
But please read this page before asking silly questions :-).

hope you like it after all,
regards from Leipzig, Germany

nach oben

Viel Spaß!
Christian Güssmer 2001