Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. so I wanted to make an audio file of a #ZXSpectrum program today as part of a gag for a future event announcement.step one.

so I wanted to make an audio file of a #ZXSpectrum program today as part of a gag for a future event announcement.step one.

Scheduled Pinned Locked Moved Uncategorized
zxspectrum
1 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ksixty is onlineK This user is from outside of this forum
    ksixty is onlineK This user is from outside of this forum
    ksixty is online
    wrote last edited by
    #1
    so I wanted to make an audio file of a #ZXSpectrum program today as part of a gag for a future event announcement.

    step one. you need a compiler. thanks to @boriel@mastodon.social, there is ZX Basic that just works. it's awesome. you just do ../zxbc.py -f tap -a --BASIC jingle.bas and that's it.

    step two. you need an emulator. yay—I thought—retroarch has libretro-fuse that's even packaged for Alpine. it worked strange, displayed a lot of weird stuff and looked too complicated. so I resorted to JSSpeccy3, which runs in a browser. it was okay, but I got tired of switching between the compiler and my browser, uploading the file, checking it out, etc.

    I gave retroarch one more shot, spent some time researching why on earth the audio was not working, even though the retroarch menus had it. one strace later it became clear that libretro-fuse does not use retroarch's sound system, but the ALSA sequencer. okay, modprobe snd_seq, done. now i can iterate much faster, by compiling my program and loading it into the emulator with a single command. neat!

    step three. you need a way to convert your tape image to an audio file. the original FUSE emulator (not to be confused with FUSE-the-filesystem-in-userspace-thing! damn it, google) contains some utilities, and among them there is tape2wav, which does exactly what you need. to get tape2wav you just need to compile libspectrum, then fuse-utils. sources are available for both, it's really almost as simple as: ./configure && make && doas make install. alas, tape2wav won't build without a warning, if your system's libaudiofile is broken. Alpine's package seem to be exactly this, so I had to check out the original source code, figure out the exact way to build the thing, since READMEs were updated almost never it seems, and, finally I've built everything and had my tape2wav working.

    step four. you may want to check that your audio file can be loaded correctly. I thought the audio2tape program from the same fuse-utils suite would do exactly that. alas, it does not support the turbo-encoded tapes that it's sibling tape2wav produces, and there's no way to turn the turbo encoding off in the latter. the retroarch's libretro-fuse won't load wav files either, it just ignores them. so I thought to give the original fuse a shot. after doing apk add gtk+2.0-dev and having some pleasant nostalgic flashbacks, fuse compiled successfully, and — finally — i got my wav played and loaded.

    step five. you may want to make the audio file sound like a real tape recording. for this I went to my studio computer, loaded the wav in Logic Pro, applied my favourite tape emulation, some compression, normalized the volume et voila.

    soon the announcement will go live, and I'll post the result.

    it was fun! nothing much, really, but a deep dive nonetheless.
    1 Reply Last reply
    1
    0
    • R ActivityRelay shared this topic
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups