Stories
Slash Boxes
Comments

SoylentNews is people

posted by chromas on Friday March 30 2018, @05:17PM   Printer-friendly
from the help!-the-bots-are-colluding-on-submissions dept.

As readers of these pages know, I've always been obsessed with audio and video compression for humble machines. My game Planet Golf for the Commodore 64 even includes Full Motion Video running from a floppy disk. The problem with this stuff, though, is that, as much as it's interesting to see these experiments run on such a limited piece of HW, and as much as it feels like an achievement to the programmer, that doesn't change their gimmicky nature. In other words, let's be honest, no person in their right frame of mind would waste a second of their time listening to those scratchy sounds, unless deafened by unconditional love for the machine. Spoiled as we are with high quality sound coming from all kinds of devices around us, poor Commodore 64 cannot be our to-go solution for our aural pleasure.

Or can it?

Mission

To build a C64 software player that can play a whole song at 48Khz (higher frequency than CDs' 44.1Khz) using a stock Commodore 64 and a regular ROM cartridge, which is your typical 80s setup.

Now, there are all kinds of devilish pieces of hardware available for your Commodore 64 nowadays, such as 16Mb RAM Expansion Units, or even mp3 hardware players. Of course, this stuff was not around in the 80s, and it therefore does not appeal to purists. In other words, any reliance on these monstrosities would get me disqualified. You might as well run a marathon riding a motorbike. The largest "legitimate" ROM Cartridges are those that Ocean used for their games. You can store a whopping one megabyte of data onto them. We are going to need all of it!

Original URL: https://brokenbytes.blogspot.com/2018/03/a-48khz-digital-music-player-for.html

-- submitted from IRC


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by turgid on Friday March 30 2018, @05:45PM (4 children)

    by turgid (4318) Subscriber Badge on Friday March 30 2018, @05:45PM (#660449) Journal

    I had a Sinclair Spectrum 128 (Z-80A CPU). I wasn't wealthy enough to have a C64 or an Amiga or ST when they came out. The Spectrum 128 had an AY-3-81923-channel sound chip but it also had the old "beeper" for backwards compatibility with the original Spectrums. You could have four channels going at once like that.

    There were some games, though, from the budget label Mastertronic that had a cool gimmick where they had "multu-channel" sound played back through the beeper. On the original Spectrums the beeper was a small internal loudspeaker about 30-40mm in diameter controlled via a single bit on one of the Z-80's output ports. By toggling the value of this bit at varying rates you got different musical notes.

    I have no idea how they did it, but they had games with this amazing music that fit into the RAM of an old 48k Spectrum. The music sounded very fuzzy, but the tunes were cool and seemed to last a long time. I dare say they used some sort of compression algorithm on the data. I'd love to know how it worked. I had a couple of those games. I think they were called Chronos and Agent X II.

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2, Informative) by Anonymous Coward on Friday March 30 2018, @06:13PM (1 child)

    by Anonymous Coward on Friday March 30 2018, @06:13PM (#660455)

    PWM as explained here [ntmusic.org.uk]

    You could do interesting enough stuff using beep from basic, I used to spend hours fiddling with udg sprite maps and the beep command as a child.

  • (Score: 1) by istartedi on Friday March 30 2018, @09:31PM (1 child)

    by istartedi (123) on Friday March 30 2018, @09:31PM (#660543) Journal

    I don't know much about music theory, but a lot
    of music could compress well because the basic tune
    stays the same but you just change the key signature,
    tempo, instruments, etc. Then of course lots of sheet
    music has several verses that you just repeat. Subtle
    variations in timbre, volume, tone, etc--that's the nuance that's
    harder to compress. That's where the musician really
    matters. In this case the "musician" is a very simple machine
    and we were impressed that it could do what it did, even
    without the nuance.

    --
    Appended to the end of comments you post. Max: 120 chars.
    • (Score: 2) by turgid on Saturday March 31 2018, @12:00PM

      by turgid (4318) Subscriber Badge on Saturday March 31 2018, @12:00PM (#660806) Journal

      Yes, from my days of music lessons, sheet music is effectively a program to render a piece of music. There are repeated patterns and phrases, and this does compress very well. If you have a machine play the music all notes are identical with minimal variation, and would compress very well at the audio level. However, that sort of music isn't much fun to listen to. It's devoid of expression and nuance. That's why humans still play musical instruments.