News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_AMSDOS

Loading mp3 audio files.

Started by AMSDOS, 12:05, 02 January 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AMSDOS

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

sigh

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.

McKlain

You are talking about loading tape images converted to audio on mp3 format, right?

TotO

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

ralferoo

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.

AMSDOS

#5
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.
* 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

Token

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.

AMSDOS


Quote from: Token on 23:34, 02 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

Token

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.

Token

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

AMSDOS

Quote from: Token on 01:24, 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.

QuoteThe 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

Token


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.


AMSDOS

#12
Quote from: Token on 03: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.


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.
* 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

McKlain

Do you have an android device that you could use as a player?

AMSDOS

Quote from: McKlain on 09:02, 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

Executioner

Quote from: AMSDOS on 02:11, 03 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.

AMSDOS

Quote from: Executioner on 06:16, 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

AMSDOS

Quote from: Token on 01: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


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

ralferoo

Quote from: AMSDOS on 22: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.
Don't do the MP3 step at the end. The 8-bit WAV is the best quality output... :)

AMSDOS

#19
Quote from: ralferoo on 23:53, 09 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.



* 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

AMSDOS

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

AMSDOS

Quote from: AMSDOS on 00:23, 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

ralferoo

Quote from: AMSDOS on 00:23, 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.

AMSDOS


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

McKlain

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.

Powered by SMFPacks Menu Editor Mod