Framework for dealing with wave files
  • Objective-C 100%
Find a file
2017-06-03 00:12:58 -04:00
WaveTools check for the correct padding 2017-06-02 10:36:32 -07:00
WaveTools.xcodeproj Start with file level objects. 2012-07-27 00:18:22 -04:00
WaveToolsTests Start with file level objects. 2012-07-27 00:18:22 -04:00
README.markdown Add link to Wave Explorer and some comments 2012-07-17 23:22:24 -04:00

WaveTools

WaveTools is a framework for manipulating audio files; WAVE files (.wav) in particular.

DWTWaveChunk

The DWTWaveChunk family of classes provides information about the chunks in a RIFF WAVE file. To read a WAVE file, use

NSData* fileData = [NSData dataWithContentsOfFile:@"myfile.wav"];
NSArray* chunks = [[DWTWaveChunk class] processChunksInData:fileData];
NSAssert([chunks count] == 1, @"A valid WAV file has only one chunk");
DWTWaveChunk* firstChunk = [chunks objectAtIndex:0];
NSAssert([firstChunk.chunkID isEqualToString:@"RIFF"], @"expected a RIFF chunk");

You can then use the RIFF chunk (which is firstChunk in the above code snippet) and its subchunks to explore the contents of the WAVE file.

See the Wave Explorer application for an application using the framework DWTWaveChunk classes.

Math functions

There are a few miscellaneous math functions available in DWTMath.h.

Future Functionality

I plan to add sample rate conversion, dithering, and more chunk types. The goal of the chunk types is to be able to read region definitions from the file, and possibly adjust them when sample rate converting the file.