Clone wiki

File to audio file / Home


FileToAudioFile input-file output-file.aiff

If you're going to feed the file to Virtual ][, use the .cass extension instead of .aiff.

About the output

Apple II format

I've tried to match the format as described in this two-part TIL article:

The tool generates audio at a sample rate of exactly 20,000 Hz, which matches all of the tones expected by the Apple II. The output file format is uncompressed AIFF; if you want WAVE support, you're welcome to contribute a patch.

Apple I format

(Support status unknown.)

Appears similar if not identical to the Apple II format, but I haven't compared them fully.

Commodore format

(Not yet supported.)

Wikipedia has a description of the format. I have not attempted to implement support for it. A patch for this would be welcomed.

IBM 5150/PCjr format

(Not yet supported.)

I found this page that documents the format. I have not attempted to implement support for it. A patch for this would be welcomed.


Currently, the output is only compatible with the Apple II family of computers (primarily the II+ and IIe).

It is currently only able to generate raw-data audio; it does not support the Applesoft header for Applesoft's LOAD command (for loading BASIC programs). A patch for this would be welcomed.

A patch to add C64 support would also be welcomed.

A patch to add IBM 5150/PCjr support would also be welcomed.

Using the output

You have a real Apple II with a line-in jack

  1. Connect a 3.5mm to 3.5mm cable between your Mac's headphone jack and your Apple II's cassette-in jack.
  2. Boot the Apple II and reset it.
  3. At the BASIC (]) prompt, type CALL -151 to enter the Monitor.
  4. At the Monitor (*) prompt, type XXXX.YYYYR, where XXXX is the starting address, YYYY is the ending address, and R is the letter R. If you're on a IIe, case doesn't matter.
  5. Make sure nothing else is playing on your Mac—no background music, no movies, no sounds, etc. You should probably quit any IM clients and/or mail clients you're running.
  6. Play back the file.

If it doesn't work, you probably don't have your Mac cranked up high enough.

You have only Virtual ][

  1. In the Devices drawer, click on the “Load cassette” button (upper-right button among the four at the far left). Choose the .cass file you created with FileToAudioFile.
  2. Reset the Apple II, go to the Monitor, and enter the XXXX.YYYYR command as described above.