473,800 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

downgrade wav file

Anyone knows how to downgrade wav file? For example downgrade from 22k
16-bit wav file to 8k 8-bit wav file ?

May 3 '06 #1
2 3360
First of all, by "22k" and "8K" I'm going to assume that you are
referring to the sampling rate, and not the file size.

To change the sampling rate, changing to a factor of the current rate
is much easier. To go from 22k to 11k, you just skip every other one.
22k->5.5k, skip 3 of every 4.

To go from 22k to 8k, you want to keep 4 out of every 11 samples. The
trick is that 3 of those four sample don't align with existing samples,
so you'll have to interpolate to find out what they should be.
Basically, you have to mathematically recreate the wave form that the
samples represent, and then resample the wave at the new rate.
For example, the first 8k sample is 2/3rds the way from the 2nd to
the 3rd sample. The second is half-way between the 5th & 6th. The
third is 1/3rd the way from the 8th to the 9th. And finally, the fourth
is exactly the 11th.
So, given 22k samples of :
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110
The translated 8k samples would be:
26, 55, 83, 110

Changing for 16-bit to 8-bit is simpler. 16-bit samples describe the
height of the wave form using numbers in the range of -32767 to +32767.
8-bit samples do the same thing, using numbers in the range -127 to
+127. To convert 16bits to 8bit, you must convert the ranges, which is
basically dividing by 256, which comes down to simply taking the
high-order byte of the 16-bit sample.

May 3 '06 #2
Heidi,
Ianier Munoz, an MVP from Belgium, has some excellent C# code to manipulate
Wav streams and the Wav headers to change / resample a wav file.
You can find some of his stuff on codeproject.com
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"he******@gmail .com" wrote:
Anyone knows how to downgrade wav file? For example downgrade from 22k
16-bit wav file to 8k 8-bit wav file ?

May 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1795
by: Richard Shea | last post by:
Hi - I have just installed ZODB for the first time. However after I'd finished I realised that I'd installed a development release and not a stable release so I'd like to downgrade or remove the current installation and start again. I installed via a Windows installer from which I could extract a list of files and then manually remove (there are 290 files) but is there some less labourious way of removing a module ? Thanks
3
2523
by: joshsackett | last post by:
Hi all, I was running an MSDN version of SQL 2000 Developer Edition on a server until I accidentally upgraded it to Enterprise Edition while attempting to install some Management Tools. Is it possible to downgrade it back to Dev Edition? Thanks, Josh
1
1510
by: Matt S | last post by:
Does the liscense for the VC++.Net 2003 allow the user to purchase a downgrade to VC++.NET 2002? DO I need to buy a standard version of VC++.NET to downgrade? I need to get VC++ 2002, but I can't find it locally. Downgrading is an option, but if the DLE licesnse doen't allow me to downgrade I will have to keep looking for a standard version.
4
1326
by: Hyo-Han Kim | last post by:
Hi.. someone built app. with VC++.NET .. But It cause error on Windows 98 SE .. No one can correct the error. So I would like to downgrade the app to VC++ 6.0 .. The application should be complied with VC++6.0 again..
0
3156
by: Eric | last post by:
I have downgrade discs from MS that are no longer available. Downgrade legally from VB.net to VB6. eric3@bigfoot.com
7
1851
by: Sharon | last post by:
Hey. Any of you know a tool that can help downgrade a 2.0 application to 1.1? Thanks, Sharon.
0
3109
by: rdraider | last post by:
Does anyone know more details about "downgrade rights". Do you need to ask MS for this right? How do you get a CD key (a legit key) for SQL 2000 if you urchase SQL 2005. From MS Licensing FAQ at: http://www.microsoft.com/sql/howtobuy/faq.mspx Q. How do I downgrade to SQL Server 2000?
5
1895
by: incrediblesuperdude | last post by:
Hi everybody, I have a problem with a bug in the sp1 of .Net 2.0 which is reported on this page: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx... Because of this a program I am using is not functioning well because of it: mscorlib.dll 2.0.50727.832 on the system without the service pack is
0
1244
by: Garima12 | last post by:
Can I downgrade dbase 7 to dbase 4 file using command line?
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.