how to play wav file

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2007
Posts: 3
Reputation: ibeast is an unknown quantity at this point 
Solved Threads: 0
ibeast ibeast is offline Offline
Newbie Poster

how to play wav file

 
0
  #1
Dec 5th, 2007
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!
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 24
Reputation: dilip_singh3 is an unknown quantity at this point 
Solved Threads: 0
dilip_singh3 dilip_singh3 is offline Offline
Newbie Poster

Re: how to play wav file

 
0
  #2
Dec 7th, 2007
First tell abt
using what u have printed wav data to text file..???
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 218
Reputation: hkdani is an unknown quantity at this point 
Solved Threads: 24
hkdani's Avatar
hkdani hkdani is offline Offline
Posting Whiz in Training

Re: how to play wav file

 
0
  #3
Dec 7th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 55
Reputation: atplerry is an unknown quantity at this point 
Solved Threads: 3
atplerry atplerry is offline Offline
Junior Poster in Training

Re: how to play wav file

 
0
  #4
Dec 9th, 2007
Now with the question ask what is the possible answer to the Question ask?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 218
Reputation: hkdani is an unknown quantity at this point 
Solved Threads: 24
hkdani's Avatar
hkdani hkdani is offline Offline
Posting Whiz in Training

Re: how to play wav file

 
0
  #5
Dec 9th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 3
Reputation: ibeast is an unknown quantity at this point 
Solved Threads: 0
ibeast ibeast is offline Offline
Newbie Poster

Re: how to play wav file

 
0
  #6
Dec 11th, 2007
Originally Posted by hkdani View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 218
Reputation: hkdani is an unknown quantity at this point 
Solved Threads: 24
hkdani's Avatar
hkdani hkdani is offline Offline
Posting Whiz in Training

Re: how to play wav file

 
0
  #7
Dec 12th, 2007
Originally Posted by ibeast View Post
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC