Stream Pulse-Density-Modulation Sound on the Apple II
Go to file
2022-04-18 21:26:51 +02:00
converter.c Added PDM converter. 2020-05-10 00:11:03 +02:00
converter.exe Added PDM converter Win32 executable. 2020-05-16 15:40:52 +02:00
LICENSE Initial commit 2020-05-09 22:40:15 +02:00
linenoise.c Added Stream-PDM client. 2020-05-09 23:49:05 +02:00
linenoise.h Added Stream-PDM client. 2020-05-09 23:49:05 +02:00
README.md Changed a2retrosystems.com URL to use HTTPS. 2022-04-18 21:26:51 +02:00
stream-pdm.c Allow to read error messages. 2020-05-13 00:16:52 +02:00
stream-pdm.dsk Added a ready-to-run disk image. 2020-05-13 00:22:32 +02:00
stream.s Fixed comment typo. 2021-11-30 18:53:17 +01:00
The Ghost In Your Piano - Climb (Apple II).mp3 Added sample audio files. 2020-05-14 23:13:23 +02:00
The Ghost In Your Piano - Climb (Original).mp3 Added sample audio files. 2020-05-14 23:13:23 +02:00
The Ghost In Your Piano - Climb.a2stream Added sample audio files. 2020-05-14 23:13:23 +02:00
w5100_http.c Adjusted include path to external build. 2020-05-12 19:43:19 +02:00
w5100_http.h Added Stream-PDM client. 2020-05-09 23:49:05 +02:00
w5100.c Adjusted include path to external build. 2020-05-12 19:43:19 +02:00
w5100.h Added Stream-PDM client. 2020-05-09 23:49:05 +02:00

Stream-PDM

Stream-PDM simultaneously receives Pulse-Density-Modulation Sound from any HTTP server and plays it through the stock Apple II speaker in a consistent 13 cycle loop resulting in a stable 78671.3Hz pulse frequency. Those 13 cycles are feasible through aggressive loop unrolling resulting in 32kB of code. Those 32kB aren't loaded from disk but are generated on the fly.

Hardware requirements:

To built Stream-PDM:

  • Get cc65
  • Get IP65 and place it in a subdirectory ip65
  • Enter cl65 -t apple2enh -Or -I ip65 -D SINGLE_SOCKET stream-pdm.c stream.s w5100_http.c w5100.c linenoise.c ip65/ip65.lib ip65/ip65_apple2.lib

To create a PDM file:

  • Create a headerless *.raw file with 78670Hz mono 32-bit-float PCM data (e.g. with Audacity)
  • Convert the *.raw file into an *.a2stream file with converter.exe

To stream a PDM file:

  • Put the *.a2stream file onto any HTTP server
  • Run Stream-PDM and point it to the URL of the *.a2stream file

To config Stream-PDM:

  • Put the Uthernet II in slot 3 or
  • Create a file named ETHERNET.SLOT. Only the first byte of that file is relevant. This byte can either represent your Uthernet II slot as binary value (e.g. $04 for slot 4), as ASCII digit (e.g. $34 for slot 4) or as Apple TEXT digit (e.g. $B4 for slot 4).