944,100 Members | Top Members by Rank

Ad:
Dec 5th, 2007
0

how to play wav file

Expand Post »
hi
well i have a program that can print wav data in a text file. Is it possible to make a wav file with the available data from the text file and play it in VB. Playing the file isn't that difficult, but i m still scratching my brains as to how to make the wav file.
Thank You!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ibeast is offline Offline
6 posts
since Dec 2007
Dec 7th, 2007
0

Re: how to play wav file

First tell abt
using what u have printed wav data to text file..???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dilip_singh3 is offline Offline
24 posts
since Oct 2007
Dec 7th, 2007
0

Re: how to play wav file

Quote ...
Is it possible to make a wav file with the available data from the text file and play it in VB.
In programming just about anything is possible. But if you're asking this question thinking that VB has a built in capability to do what you're asking, think again.

You're greatest chance of success of doing what you're asking comes from the program that is able to convert the wav file into a text file. Does that program have the capability to convert the text back into a wav file? And does that program offer any dll's or APIs that you can reference in VB to accomplish that goal.

The real person that you should be asking this question is the person who wrote the program that can convert a wav file into a text file.
Reputation Points: 49
Solved Threads: 44
Posting Pro in Training
hkdani is offline Offline
426 posts
since Nov 2007
Dec 9th, 2007
0

Re: how to play wav file

Now with the question ask what is the possible answer to the Question ask?
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
atplerry is offline Offline
58 posts
since Jul 2007
Dec 9th, 2007
0

Re: how to play wav file

Quote ...
what is the possible answer
I would say that you have two choices: (1) Check with the program that made the wave file. See if it comes with a dll that you can reference in your program to accomplish what you ask , or (2) Identify the wave file with the text file so that you know which text file represents which wave file.

If the first choice is a possibility, you will have to figure out how to use that program's dll in your program.

The second choice is easier and only requires a little imagination. I would just use the first 20 or so characters of the text file created from the wave file and use it to identify the wave file.

Make a one-to-one association between that text value and your wave file. Based on the identity of the text file, just play the wave file that corresponds to the text file. You don't have to convert the file from text to wave, you just play the appropriate file based on the value of the first 20 or so characters that the program produces.
Reputation Points: 49
Solved Threads: 44
Posting Pro in Training
hkdani is offline Offline
426 posts
since Nov 2007
Dec 11th, 2007
0

Re: how to play wav file

Click to Expand / Collapse  Quote originally posted by hkdani ...
In programming just about anything is possible. But if you're asking this question thinking that VB has a built in capability to do what you're asking, think again.

You're greatest chance of success of doing what you're asking comes from the program that is able to convert the wav file into a text file. Does that program have the capability to convert the text back into a wav file? And does that program offer any dll's or APIs that you can reference in VB to accomplish that goal.

The real person that you should be asking this question is the person who wrote the program that can convert a wav file into a text file.
Well the program that i have is actually a C program that can print data in a text file. It doesnt even print the numbers but makes a "wave-like" design using " * " (I compared the design to the design made in this software called Audacity and it is the same, which means that the text file is showing me the correct data in form of a vertical graph of asterisks). But what i want to do is to make a wav file from the data that is present in the text file so that i can create a new wav file, exactly the same as that from which the data was extracted and put in the text file.

anyways thnx hkdani for helping me...
i am eager for your next reply...
thnx
Last edited by ibeast; Dec 11th, 2007 at 4:19 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ibeast is offline Offline
6 posts
since Dec 2007
Dec 12th, 2007
0

Re: how to play wav file

Click to Expand / Collapse  Quote originally posted by ibeast ...
Well the program that i have is actually a C program that can print data in a text file. It doesnt even print the numbers but makes a "wave-like" design using " * "
Do you have the code for the C program?

If it's taking advantage of one of Microsoft's DirectX SDK APIs, a C programmer could probably take advantage of the same API's to produce a wave file from the text data. But more than likely a lot of the information about the original sound (texture, quality, resonance, etc.) would be lost.

The C program probably just extracts the frequency and the duration of the pitch and outputs a text character at a particular position. It's not that complicated. But I wouldn't bet the outhouse on being able to reproduce the same original sound from just the text data.

Hank
Reputation Points: 49
Solved Threads: 44
Posting Pro in Training
hkdani is offline Offline
426 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Getting an Item out of Listbox into a Textbox
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: need help convert c++ to vb6 serial port





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC