Boray's SD2IEC music player V2.1
Better sampled music for your Vic-20.

Requirements: Unexpanded Vic-20 + SD2IEC card reader (or alternatively VICE emulation). I hope it will work on NTSC but it's only tested on PAL.

Right after I released the first version I started to experiment on how to increase the sound quality. I started with higher frequencies on the old player, then made a new player using a hardware timer and buffering, then went on and made one without buffering. I also experimented with 1.5 x oversampling.

Because of how long it takes for SJLOAD to fetch a byte, it just isn't possible to increase the sampling frequency much above 4kHz. You should actually go lower to get a totally synced playback, but then the quality decreases because of the lower frequency, so I decided to stay with 4kHz and accept a some pulsating interference from SJLOAD. All three new players as well as the original player are selectable in the new version. And all three new players definitely sound better than the old one. (Note: The selected player will still be selected if your runstop-restore and re-run the program so that you easily can switch song without having to re-select the player.)

That was one side to the matter. Regarding the audio encoding I've tried a lot of things there as well; Different low-pass filters and settings, different conversion algorithms, different dithering algorithms etc. I have included my final convert program (for Windows) in the archive and below is a description on how to use it.

All songs were replaced (to give you something new to listen to) and there are more Commodore commercials included. Total playing time is 1 hour and 17 minutes. And this time you can play them all in one go if you like, which also will loop the program forever too. (I hope someone will do this on a Retro meeting somewhere some day ;-).

Download:


New in V2.1

You can now use the joystick during playback: Up = Fast forward (playing fast with audio), Down = Play slow, Fire = Skip to the next song/return to the menu if you play a single song. This only works with the default playback routine. Note that these speeds are not at all as synced as normal playback speed. The fast forward mode plays every second sample and the slow mode just puts in an extra delay. I also replaced one of the songs, "Nothing to say" because I thought it didn't sound very good. I replaced it with a tune called "Time Traveler".


Compare the quality of V1 and V2

Listen to this mp3: v1vsv2.mp3

The first part is from one song in V1.0. The second part is the same song converted and played with V2. I hope you can hear the improvement, or two weeks of work has been for nothing! hahaha...


The different player routines

Normal 4 kHz player
This is the best player in my opinion and that's why it's the default one.

6 kHz oversampling
Oversampling is a widely used technique in CD players etc. It calculates fake samples in between the real ones. It's often a question of 64 or 128 times oversampling, but here, it's just 1.5 times! As sjload takes time to load a byte, I could just put in one extra calculated sample. Think of it as playing in 8kHz where sample 1 is real, sample 2 is calculated, sample 3 is real and sample 4 is missing. This player maybe reduces some overtones but it introduces another tone instead because of the missing sample I think.

Buffered 4 kHz
This is like the default player, but buffers the samples in the color ram. Makes a nice side effect I think. But the problem is that the routine probably is too slow to work well and that sjload turns interrupts off while loading a byte making buffering more or less pointless.

Original V1 routine
This sounds the worst. Period. Here you can compare. But concider that the audio conversion was worse in the first version as well.



Converting your own favourite music to the Vic-20

You are welcome to use my player if you want to convert some music of your own. Here is how to do it:

Use some kind of audio software to convert your audio into 4000 Hz 8 bit unsigned mono WAV. I used
Reaper. Make sure that the software you use cut away frequencies above 2 kHz. Here is the render window in Reaper:



And then, use my program "8 to 4 bit II.exe" (included) to get it into 4 bit. The default setting is what I used.



Now for every WAV you convert, a d-file is created. Put those d-files in the iecplay2 folder. Then load my basic player and replace the data lines at the end of the program. LIST 900- will show them. Write in your song names and end with "slut". I know... slut... it actually means "end" in swedish.

Here is a demonstration on how this is done:



Well this has been a fun project. It combines so many of my interests: Music and sound recording, programming and... the Vic-20! I hope you will have fun with it too!


Added:
Here is a later version of the conversion tool which lets you cut away the wav header:
8to4bit_always.exe

It was used for the next step in this project:
Always the same, never the same



home