Does anyone know how to modify the wavread and/or wavwrite function in MATLAB so we can work with 16 bits wav files without being clipped if the amplitude range is outside [-1,1] ?
Supposed that we read an audio file (*.wav) using wavread..
[audio,fs,nbits]=wavread('audio.wav'); % nbits=16
then we modify the "audio" data so that its amplitude is no longer between [-1,1]..
then we write it to wav files using wavwrite,,
wavwrite(audio_modify,fs,nbits,'audio2.wav');
when I use wavwrite function, with 8 or16 bits audio wav file, the data with amplitude outside the range will be clipped..
how can we work with 16 bits audio wav files, modify it,and write it to wav files and my data still intact,, not being clipped ?
thanks before for ur advices..
Supposed that we read an audio file (*.wav) using wavread..
[audio,fs,nbits]=wavread('audio.wav'); % nbits=16
then we modify the "audio" data so that its amplitude is no longer between [-1,1]..
then we write it to wav files using wavwrite,,
wavwrite(audio_modify,fs,nbits,'audio2.wav');
when I use wavwrite function, with 8 or16 bits audio wav file, the data with amplitude outside the range will be clipped..
how can we work with 16 bits audio wav files, modify it,and write it to wav files and my data still intact,, not being clipped ?
thanks before for ur advices..