Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-17-2002, 09:10 PM   #1
Member (8 bit)
 
j009h33rM3's Avatar
 
Join Date: Sep 2002
Posts: 145
Binary > Modular Tone Conversion

I have this idea to store data on my MD player by creating a program that takes data files and converts them to tones. An A Tone for 0's and a B tone for 1'a. The tones would be as short as possible to conserve length.

There would be a problem though... I would be converting the raw data into ATRAC3, but it doesn't mean I would neccesarily lose the data, it would just have to be uncompressed. Right?

Once uncompressed (converted back to a wav file i suppose) I would need to find a way to scan the audio data and create a file with the same binary data as what is relayed.

However I need help:
What would I use to convert files to raw binary code.
Is there anything already built into C++ that could help me convert something into a dial tone?
How would I convert this series of tones into a wav file?
Do you think I would experience data loss with ATRAC3?
What is the best method of converting compressed audio into an uncompressed format?
What could I use to determine tones in a wav without having to monitor a live recording?

Yes, an MD player can really only store about 140MBs of uncompressed data, but if I can convert it to ATRAC3 without any problem, I should be able to get about 600MBs. Considering you can store up to about 74minutes of near perfect quality on an MD, about the same as a standard CD.

Is my logic flawed here??? I know I can only store data as ATRAC3 on the MD player, and they use a special TOC file system, and this is all integrated into the firmware.

Could I possibly change the file extension of a standard data file to .wav, and then convert it to ATRAC3. Possibly add some data at the end that would give me the original extension of the file. Uncompress it to a wav format and have the original file again???
j009h33rM3 is offline   Reply With Quote
Old 12-18-2002, 03:12 PM   #2
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
Well, consider this:

1) If you have 600 MB, this is 5,033,164,800 bits of data. To store this on 74 minutes, you'd need 1.1 million bits per second. This would mean each bit would be spaced only about 800 nanoseconds apart. Plus, you'd need to have audio sampled above 1.1 MHz. As you're probably looking at audio that's only sampled at approx. 44 kHz, you can only get a theoretical maximum of 44,000 bits/sec. In this fashion, you could store approx. 195 MB of information. That assumes you can actually store one bit as only a single sample. You'd probably be prone to errors in that kind of system. Data CDs are not the same as audio, they don't have any form of sampling, they just write binary data. If you're using an audio representation of a digital signal, you may have problems. You probably want to use amplitude modulation, not DTMF tones. I.e. you have a fixed frequency (something midband, say, 1 kHz) and boost the amplitude when it's a 1, drop the amplitude for a zero. It should be relatievly easy to modulate and demodulate like this.

You'd probably want to do something like what asynchronous serial connections do, which is to have one or two byte frames where each frame is:

[Start bit (0)] [Data bits] [Parity Bit (optional)] [Stop bit(1)].

That way, you don't have to perfectly time the signal to still be able to read it -- you look for a start bit -- a 1 to 0 transition -- and use that to synchronize your frame. You only need a reasonably accurate clock to do this. You read the first data bit 1.5 periods after you detect the transition (to sample in the middle), the second 2.5, etc. So minor timing errors are allowed, because you resynchronize the signal after every frame. You only need to have a clock that's accurate enough to read each frame without errors.
Paul Victorey is offline   Reply With Quote
Old 12-26-2002, 04:31 AM   #3
Member (8 bit)
 
j009h33rM3's Avatar
 
Join Date: Sep 2002
Posts: 145
okay I think I am understanding what you are saying.

Question, is there any modules I could include into a C++ project to make this easier... something I could download maybe?

Like:

#include

...

if (bit == 0)
{
tone(1000, 1000++,new.wav)
}
else
{
tone(1000, 1000--,new.wav)
}
j009h33rM3 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:27 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2