Author Topic: Loading mp3 audio files.  (Read 3586 times)

0 Members and 1 Guest are viewing this topic.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Loading mp3 audio files.
« on: 13:05, 02 January 15 »
I was able to load a mp3 on my 6128 a few times using the 320kbps, without too many hassles, though I've had one "Read Error B" occur recently and was wondering if the readability will degrade?  ???
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline sigh

  • 6128 Plus
  • ******
  • Posts: 1.126
  • Liked: 427
  • Likes Given: 41
Re: Loading mp3 audio files.
« Reply #1 on: 13:49, 02 January 15 »
How did you achieve this? Do you have an example so we can here how it sounds?

It would be great if you tried classical music as they have alot of various sound ranges, so it would be interesting to hear how that translates to the AY.

Offline McKlain

  • 6128 Plus
  • ******
  • Posts: 867
  • Country: es
  • Programmable Sound Generator
    • www.mcklain.com
  • Liked: 338
  • Likes Given: 950
Re: Loading mp3 audio files.
« Reply #2 on: 14:44, 02 January 15 »
You are talking about loading tape images converted to audio on mp3 format, right?

Online TotO

  • 6128 Plus
  • ******
  • Posts: 3.452
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2628
  • Likes Given: 1552
Re: Loading mp3 audio files.
« Reply #3 on: 15:45, 02 January 15 »
I expect too!  ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 580
  • Likes Given: 222
Re: Loading mp3 audio files.
« Reply #4 on: 20:46, 02 January 15 »
Firstly, I'd strongly advise against mp3. The MP3 encoding process gets rid of frequencies that the human ear has difficulty hearing and sometimes that will include frequencies in the range that computer data will be recorded in.

And at 320kbps, you might as well use 1-channel 8-bit WAV at 44100Hz, which would be a similar size and actually far better for computer data.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #5 on: 23:03, 02 January 15 »
Ok, so I initially had a CDT file, converted that to WAV using TAPE2WAV which gives me that 1-channel 8-bit WAV at 44100Hz @ralferoo mentions and then I made it mp3 using Lame/Audacity.
When I created the mp3, the software asks me which version to use, there's more compatible v1 & more flexible v2, in this instance I went on compatibility, it also has information concerning it's title and any other details about the file itself, along with a pop down box for Genre. It probably doesn't matter what's in that box, but I selected  Other, just in case it wanted to play around with the tone.



I also had to do some editing. The first mp3 I created was loading fine up until the end of the 5th block of the program, when I got a Read Error A. I didn't have this problem when the file was in WAV format, but what happens when TAPE2WAV does it's job, the last block of the program ends abruptly, I simply copied some of that silence, lined up my cursor to the end of the last block (which displays itself as a solid block), and pasted it there to get the file loading on my 6128.


I also mention a Read Error B, which results when Data hasn't been correctly received to the computer, unfortunately I don't know if it's the result of some mp3 degeneration which the human ear could not pick up, or if it was because I was moving a monitor (with interference on it) towards the reader. Once I moved the monitor back to where it was, the file was loading fine again though. I just didn't want to find out that I could make all these mp3s and then they become unreadable. I since found out the interference from the monitor was coming from my disk drives.
« Last Edit: 23:10, 02 January 15 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Token

  • 464 Plus
  • *****
  • Posts: 375
  • Country: fr
  • Liked: 136
  • Likes Given: 360
Re: Loading mp3 audio files.
« Reply #6 on: 00:34, 03 January 15 »
I have some WAV's made from OTLA (8-bit mono 44.1) and a 2 Mo file compress to 84K. (ZIP)


Did you tried to reduce the signal, like -0.5 dB. Maybe the MP3 expect something accurate or it will create artifacts.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #7 on: 01:38, 03 January 15 »

I have some WAV's made from OTLA (8-bit mono 44.1) and a 2 Mo file compress to 84K. (ZIP)


Did you tried to reduce the signal, like -0.5 dB. Maybe the MP3 expect something accurate or it will create artifacts.


Haven't reduced the signal or anything like that. Ok I edited the mp3 so the last block didn't come to an abrupt ending, which worked.   I just used the process I mention above to generate the appropriate mp3. Unfortunately I'm unfamiliar with OTLA and was unable to find the appropriate program. The program I used TAPE2WAV I got from World of Spectrum can handle CDTs, CSWs & a few other of those Tape Images and create a WAV.


To get the file loading on my CPC, I'm using a DVD player to feed the sound through to, unfortunately I brought the cheaper DVD player which only plays back mp3 or wma  :o  Had I spent a few more dollars, I could of played WAV files without hassle.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Token

  • 464 Plus
  • *****
  • Posts: 375
  • Country: fr
  • Liked: 136
  • Likes Given: 360
Re: Loading mp3 audio files.
« Reply #8 on: 02:24, 03 January 15 »
I also made some MP3, I didn't have any problem with but it's best to avoid lossy compression.


The MP3 is a little louder than the original audio. Noise is added. If there's a peak at -2 dB the MP3 will peak arround -0,5dB. And arround 0dB there's some distortion. Clipping that is hard to hear but that could be bad for the datas.

Offline Token

  • 464 Plus
  • *****
  • Posts: 375
  • Country: fr
  • Liked: 136
  • Likes Given: 360
Re: Loading mp3 audio files.
« Reply #9 on: 02:32, 03 January 15 »
Otla:
Downloads - otla - Tool for loading programs into vintage computers via their


I mainly used it with snaphots and it takes less than 30s to load on my 464 (I did a little soldering to avoid tape head, direct line input)
I converted few stand alone files packed with exomizer, Boulderdash loaded in 11s  ;D

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #10 on: 03:11, 03 January 15 »
I also made some MP3, I didn't have any problem with but it's best to avoid lossy compression.


Unsure if lossy compression has been applied, is there a way of telling? I was just assuming that if the audio was at 320kbps, no compression is being applied, the resulting mp3 is nearly the size of the WAV file.

Quote
The MP3 is a little louder than the original audio. Noise is added. If there's a peak at -2 dB the MP3 will peak arround -0,5dB. And arround 0dB there's some distortion. Clipping that is hard to hear but that could be bad for the datas.


It didn't appear to be a problem, TAPE2WAV seems to produce a low but solid, though I could check it out in Audacity to see if anything has changed. When I play the sound through my 6128 it sounds soft in the same manner as to when I was loading audio CDs.



Quote
Otla:
Downloads - otla - Tool for loading programs into vintage computers via their&


I mainly used it with snaphots and it takes less than 30s to load on my 464 (I did a little soldering to avoid tape head, direct line input)
I converted few stand alone files packed with exomizer, Boulderdash loaded in 11s  ;D


I've only been playing around with Speed Write 1. I was experimenting in CPCE and producing CSW file with 3500/3600 Baud Rate (using an old Type-in from AA & JL-Copy), and using TAPE2WAV & reading it back in Winape, but Read Errors seem to be creeping in with it. I wasn't able to determine what the problem was, but it looked as if the Emulator wasn't receiving the information in time to process, probably due to the lag of my computer occasionally messing up the timing of the emulator I was guessing. I haven't tried it on the 6128 though.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Token

  • 464 Plus
  • *****
  • Posts: 375
  • Country: fr
  • Liked: 136
  • Likes Given: 360
Re: Loading mp3 audio files.
« Reply #11 on: 04:25, 03 January 15 »

You can make a null test (phase inversion, phase cancellation) between the WAV and the MP3. There's at least a modulated noise. If the WAV is badly setted then artifacts are also added. I'm mainly using 320kbps, it's really good. This bit rate is still not a lossless. It's not perfect, the noise can result in brain fatigue (in the mastering world).




Maybe you can check the stats (I don't have Audacity, but other tools)
http://forum.audacityteam.org/viewtopic.php?f=42&t=38134
It's not something you'll hear.


Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #12 on: 09:36, 03 January 15 »
You can make a null test (phase inversion, phase cancellation) between the WAV and the MP3. There's at least a modulated noise. If the WAV is badly setted then artifacts are also added. I'm mainly using 320kbps, it's really good. This bit rate is still not a lossless. It's not perfect, the noise can result in brain fatigue (in the mastering world).




Maybe you can check the stats (I don't have Audacity, but other tools)
http://forum.audacityteam.org/viewtopic.php?f=42&t=38134
It's not something you'll hear.


Unsure if this is of any help. I've attached Screenshots from Audacity between the mp3 (top) and wav (below) of Spectrum & Pitch. That reveals that there are slight variations between the mp3 & wav. You will also notice the mp3 has got 32-bit Float as the Sample Rate where's the WAV is 16-Bit. I tested this on my original mp3 and ran into loading problems midway through produced file, seems to work better with 32-Bit float.


I've attached wav & mp3 versions of Worm. Again the mp3 for this program works on my 6128, didn't test the wav in Winape, but suspect it'll work without any hassle.


There there if anyone wants to play around with them.
« Last Edit: 09:39, 03 January 15 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline McKlain

  • 6128 Plus
  • ******
  • Posts: 867
  • Country: es
  • Programmable Sound Generator
    • www.mcklain.com
  • Liked: 338
  • Likes Given: 950
Re: Loading mp3 audio files.
« Reply #13 on: 10:02, 03 January 15 »
Do you have an android device that you could use as a player?

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #14 on: 10:38, 03 January 15 »
Do you have an android device that you could use as a player?


DVD Player with USB. To get the audio to the 6128 I have a 2 RCA to 3.5mm Stereo Lead with a 3.5mm Female plug on the end of that which becomes my EAR plug Jack.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: Loading mp3 audio files.
« Reply #15 on: 07:16, 06 January 15 »
I was experimenting in CPCE and producing CSW file with 3500/3600 Baud Rate (using an old Type-in from AA & JL-Copy), and using TAPE2WAV & reading it back in Winape, but Read Errors seem to be creeping in with it. I wasn't able to determine what the problem was, but it looked as if the Emulator wasn't receiving the information in time to process, probably due to the lag of my computer occasionally messing up the timing of the emulator I was guessing. I haven't tried it on the 6128 though.

WinAPE can't get the WAV file (or CDT) out of synch with emulation, it's file reading position is directly affected by the cpu clock cycle count, not the displayed frames per second etc.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #16 on: 10:14, 06 January 15 »
WinAPE can't get the WAV file (or CDT) out of synch with emulation, it's file reading position is directly affected by the cpu clock cycle count, not the displayed frames per second etc.


My old computer seems to have moments when it will affect CPU Clock Cycle, especially when other routines want to kick in. I've removed a number of them because I've retired the computer from the Internet, though could do some more spring cleaning.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #17 on: 23:50, 09 January 15 »
Otla:
Downloads - otla - Tool for loading programs into vintage computers via their


I mainly used it with snaphots and it takes less than 30s to load on my 464 (I did a little soldering to avoid tape head, direct line input)
I converted few stand alone files packed with exomizer, Boulderdash loaded in 11s  ;D


I tried using this program, but I seem to be coming up with Reading Access Violations when I was using the Add Blocks Button when loading the CDT. I'm unable to view the help file because I don't have the Internet on my PC. I downloaded v2.2 twice just to make sure it wasn't my browser, but twice the same problem occurred. It doesn't seem to be working properly cause even the Sample BATMAN.CDT isn't working. I can only guess the problem is emerging because I'm using XP or the original ZIP file is bugged, though I'm unsure.  :(
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 580
  • Likes Given: 222
Re: Loading mp3 audio files.
« Reply #18 on: 00:53, 10 January 15 »
Ok, so I initially had a CDT file, converted that to WAV using TAPE2WAV which gives me that 1-channel 8-bit WAV at 44100Hz @ralferoo mentions and then I made it mp3 using Lame/Audacity.
Don't do the MP3 step at the end. The 8-bit WAV is the best quality output... :)

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #19 on: 01:23, 10 January 15 »
Don't do the MP3 step at the end. The 8-bit WAV is the best quality output... :)


I'd like to do it like that, unfortunately my setup doesn't support WAV :( 


I'm unsure though where your argument is against mp3, I'm assuming your saying the quality will degrade over time, but you seem to be saying that there's stuff we cannot hear that the computer will pickup. My screen dumps (which I could probably improve), showed differences between wav & mp3, but haven't presented any issues with the end BASIC listing. Binary maybe a different story though, will only know by testing.

I can play CD Sound files through the DVD player, but I don't know if it's possible to produce an Audio file without Burning a CD, I maybe able to playback "cda" through USB, but again I'm unsure.


I've still been able to load my mp3s I produced earlier for the BASIC programs which are recorded in Speed Write 1. I only seem to run into problems when the speed of the program is increased (even on my 6128), so perhaps mp3 is limited to speed write 0 or 1, other loaders may cause problems (headerless/speedlock), I've only kept it to BASIC.



« Last Edit: 01:31, 10 January 15 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #20 on: 01:39, 10 January 15 »
I just checked and my DVD player supports WMA, though I think that will be worse for Data files unless someone knows different.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #21 on: 01:51, 10 January 15 »

I can play CD Sound files through the DVD player, but I don't know if it's possible to produce an Audio file without Burning a CD, I maybe able to playback "cda" through USB, but again I'm unsure.


Nope, doesn't look like it since cda is only a shortcut to tell the computer where the track is on a CD. This site mentions the possibility of programs collecting the audio data for an user to listen to, though there probably aren't too many programs that do that for free I'd imagine.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 969
  • Country: gb
  • Liked: 580
  • Likes Given: 222
Re: Loading mp3 audio files.
« Reply #22 on: 17:31, 10 January 15 »
I'd like to do it like that, unfortunately my setup doesn't support WAV :( 
You're storing this data on a DVD right? You should be able to record PCM data on the disc as DVD only supports PCM (which will get passed through the DAC and out through the analogue audio sockets) or a "multichannel bitstream" where the format isn't specified and is passed out raw through the optical or coax SPDIF socket.

Quote
I'm unsure though where your argument is against mp3, I'm assuming your saying the quality will degrade over time, but you seem to be saying that there's stuff we cannot hear that the computer will pickup.
It won't degrade over time, it degrades instantly when you convert into MP3 format. MP3 isn't lossless, it's specifically designed to discard frequencies that the human ear can't easily detect, that's how it achieves its good compression results. It's nothing to do with just cutting out high frequencies (although it does that too), it can and will cut out frequencies in the range needed for computer data if it thinks it won't make a audible (to a human) difference.

You can google for "psychoacoustic model" if you want to know more about it, but I really cannot recommend using MP3 for this application whatever quality settings you choose.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.707
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 949
  • Likes Given: 1661
Re: Loading mp3 audio files.
« Reply #23 on: 01:08, 11 January 15 »

I can read an audio CD through the DVD player to my Amstrad, but what I'm doing is using the USB on the DVD and reading the file from an mp3 player or flash drive (saving a hassle of burning a CD for the sake of a file) and it's this player which won't display wav files to select for loading.


I could perhaps try and disguise a wav file with a mp3 extension, but I think I tried this already and found the player simply doesn't support it.


My player also supports avi, wma & divx, though are also forms of compression & a lot harder for me to produce.


I'm not ruling out that mp3 will cause problems, at the moment all I have is 2 BASIC programs which are loading (1 of those I attached on the 1st page), though I'm not exactly using a standard connection to get the sound to my Amstrad which is loading them files normally.
If I was using a mp3 player to get the sound via the Ear plug to the Amstrad then sound quality is poor in that case I doubt the Amstrad could read it properly, but in my case I'm reading the sound through the USB port and converting the Left & Right Audio Output into an Earplug jack and in that case none of the noise gets carried through.


But I can carry out more tests just to see if I find limitations.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline McKlain

  • 6128 Plus
  • ******
  • Posts: 867
  • Country: es
  • Programmable Sound Generator
    • www.mcklain.com
  • Liked: 338
  • Likes Given: 950
Re: Loading mp3 audio files.
« Reply #24 on: 10:03, 11 January 15 »
If you use foobar2000 you can follow this tutorial: http://www.hydrogenaud.io/forums/index.php?showtopic=47759 to create wma files, wich I think would give better results than m3p files on your player.