Hi, I'm looking for a freeware tool that can smooth and clean sound files that are saved with a low sampling rate. I got some 8 kHz Samples and I'd like them with a bit better quality. I know, some of the loss can hardly be undone, but I guess with some half-intelligent interpolation it may be at least a bit better in the end. Any ideas?
Sound cleaner?
Miscellaneous Forums/Content Creation Tools/Sound cleaner? Well, i dont know....
I could code one for you if you want? WOuldnt be that difficult :D
Hell, it wont be a great UI interface thing, probably just a blitz program, but i'll let the source out as itl not be more than a few lines of code + .wav include....:)
I could code one for you if you want? WOuldnt be that difficult :D
Hell, it wont be a great UI interface thing, probably just a blitz program, but i'll let the source out as itl not be more than a few lines of code + .wav include....:)
uh, do you got the wav code somewhere? When I got the sample in a bank then it's easy, of course and also fun. But until then it's a lot of searching etc. and this is sometimes a matter of a good google-karma. Which I don't have these days.
Besides - I am sure someone else did it already,so why should I reinvent the wheel? especially since I'm not a specialist.
Sometimes it's worth to search for existing solutions because they ore usually better thatn what you can do in one hour.
Not so long ago I started a greenscreening App for Videos because my Video Editor from MAGIX has bad greenscreening support. I spent a lot of hours to realize that it isn't that easy. Now I have found "Zwei-Stein", a freeware video editor that has nice greenscreening built in.
Well at least I still can utilize the code for reading and saving Avis for special fx apps, that's where the power of Blitz3D comes in anyway.
Besides - I am sure someone else did it already,so why should I reinvent the wheel? especially since I'm not a specialist.
Sometimes it's worth to search for existing solutions because they ore usually better thatn what you can do in one hour.
Not so long ago I started a greenscreening App for Videos because my Video Editor from MAGIX has bad greenscreening support. I spent a lot of hours to realize that it isn't that easy. Now I have found "Zwei-Stein", a freeware video editor that has nice greenscreening built in.
Well at least I still can utilize the code for reading and saving Avis for special fx apps, that's where the power of Blitz3D comes in anyway.
Yeah i have it, i thought it was with my Soft-Synth but looks like i stripped it.
I'll post it up later,
ive got a full no audio compression thingy at home that failed due to my bad maths... but the wav reading bit works.
Wrote a softsynth in blitz too (another, real synth, not the one in my sig..) with the UI made in VB. lost that code :'(
For now at least, you can be half-way there, Check out my softsynth in the sig for an easy modable wav-writer that i scrounged the base from somewhere...
I'll get da codez off my drive later, if someone else hasnt posted here by then.
I'll post it up later,
ive got a full no audio compression thingy at home that failed due to my bad maths... but the wav reading bit works.
Wrote a softsynth in blitz too (another, real synth, not the one in my sig..) with the UI made in VB. lost that code :'(
For now at least, you can be half-way there, Check out my softsynth in the sig for an easy modable wav-writer that i scrounged the base from somewhere...
I'll get da codez off my drive later, if someone else hasnt posted here by then.
As far as I know, fixing low quality samples isn't easy. An 8khz sample doesn't actually have any of the higher frequencies, so you can't exactly recover them.
I looked for such a program a while back because I bought a sound CD with lots of poor quality samples, but I never found anything better than what I could do manually with sound forge, and I wasn't exactly doing a great job on them.
The best you can probably do is convert the sample to 44khz and 16 bit, and then try to use the equalizer on it. You'll be trying to get back some of the higher frequency sounds so the sample doesn't sound like it has so much bass. I don't think you'll ever get anything approaching a clean sounding sample with good frequency range though. At least, not with my level of sound editing expertise or less. I don't know what an expert sound designer could do with such a sound, but I suspect they wouldn't even bother with it and would just buy a better sound or make their own.
Btw, there was a sound cleaning plugin I had for sounf forge at one time. It was intended for removing noise in a sample. The idea was you would select a blank section of your recorded sound, which had static, and it would remove those frequencies from the main recording, thus canceling out noise. But this only really worked if you had a sample which had blank space so you could build the noise profile. And if I remember correctly it didn't really do anything for low bitrate sample "noise".
I looked for such a program a while back because I bought a sound CD with lots of poor quality samples, but I never found anything better than what I could do manually with sound forge, and I wasn't exactly doing a great job on them.
The best you can probably do is convert the sample to 44khz and 16 bit, and then try to use the equalizer on it. You'll be trying to get back some of the higher frequency sounds so the sample doesn't sound like it has so much bass. I don't think you'll ever get anything approaching a clean sounding sample with good frequency range though. At least, not with my level of sound editing expertise or less. I don't know what an expert sound designer could do with such a sound, but I suspect they wouldn't even bother with it and would just buy a better sound or make their own.
Btw, there was a sound cleaning plugin I had for sounf forge at one time. It was intended for removing noise in a sample. The idea was you would select a blank section of your recorded sound, which had static, and it would remove those frequencies from the main recording, thus canceling out noise. But this only really worked if you had a sample which had blank space so you could build the noise profile. And if I remember correctly it didn't really do anything for low bitrate sample "noise".
Good info there Swift. Fixing Low Quality samples is not easy at all. Music technology eh, :)
My intention was to play with the samples inside the WAV.. Blitz seems to bring in artifacts in low samplerate sounds, so upping them to 44.1khz and interpolating yourself will likely fix this issue. The source code to this is what i was going to release.....
Thats what I was looking into.
My intention was to play with the samples inside the WAV.. Blitz seems to bring in artifacts in low samplerate sounds, so upping them to 44.1khz and interpolating yourself will likely fix this issue. The source code to this is what i was going to release.....
Thats what I was looking into.
Global ss_channelcount% Global ss_bpsample% Dim wavdata(0,0) Function Writewav(wavdatalen,filename$) samples=wavdatalen ;Function Writewav(nosamples,filename$) ;wavdatalen=(ss_channelcount*nosamples*(bitspersample/8))/4 bitspersample=ss_bpsample fs=WriteFile(filename$) If fs=0 Then Return 0 WriteBinString fs,"RIFF" wavlen=36+((wavdatalen*2)*ss_channelcount) WriteInt fs,wavlen Writebinstring fs,"WAVE" Writebinstring fs,"fmt " WriteInt fs,16 WriteShort fs,1 WriteShort fs,ss_channelcount WriteInt fs,samplerate bitspersample=16 byterate=SampleRate * ss_channelcount * bitspersample/8 WriteInt fs,byterate WriteShort fs,ss_channelcount * bitspersample/8 WriteShort fs,bitspersample Writebinstring fs,"data" WriteInt fs,samples*ss_channelcount * BitsPerSample/8 ;WriteInt fs,wavdatalen*4 For p=1 To wavdatalen If ss_bpsample=8 Then Midr=128 If ss_bpsample=16 Then Midr=Midbit/2.0 If ss_bpsample=32 Then Midr=(Midbit*255)/2.0 For chan=0 To ss_channelcount-1 rval=wavdata(chan,p) rval=rval-Midr If rval<0 Then rval=rval+(Midr*2) If rval<0 Then rval=0 Else If rval>(Midr*2)*2 Then rval=(Midr*2) Plot o,320+rval ;If ss_bpsample>16 Then rval=rval/2.0;WriteShort fs,rval WriteShort fs,wavdata(chan,p);rval Next Next If ss_channelcount=1 Then ster$="Mono" Else ster$="Stereo" debugprint"Created "+filename$+" as "+ss_bpsample+" bit, "+samplerate+"hz, "+ster$+" wave file." CloseFile fs End Function Function Writebigend(filehandle,number) base=number f1=base Mod 256 f2=Int(base/256) Mod 256 f3=Int(base/(256*256)) Mod 256 f4=Int(base/(256*256*256)) Mod 256 If f1<0 Then f1=256+f1 If f2<0 Then f2=256+f2 If f3<0 Then f3=256+f3 If f4<0 Then f4=256+f4 debugprint Hex(f1)+" "+Hex(f2)+" "+Hex(f3)+" "+Hex(f4) WriteByte filehandle,f4 WriteByte filehandle,f3 WriteByte filehandle,f2 WriteByte filehandle,f1 End Function Function readbigend(filehandle) num1=ReadByte(filehandle) num2=ReadByte(filehandle) num3=ReadByte(filehandle) num4=ReadByte(filehandle) base=num1 base=base+num2*256 base=base+num3*(256*256) base=base+num4*(256*256*256) Return base End Function Function WriteBinString(filehandle,dat$) For p=1 To Len(dat$) WriteByte filehandle,Asc(Mid$(dat$,p,1)) Next End Function Function ReadbinString$(filehandle,bytes) Local n,ret$ For n=1 To bytes ret$=ret$+Chr$(ReadByte(filehandle)) Next Return ret$ End Function Function Readwav(name$) fs=ReadFile(name$) If fs=0 Then RuntimeError "Cannot open "+name$ head$=Readbinstring(fs,4) If head$<>"RIFF" Then RuntimeError name$+" is not a valid wave file!" chunksize=ReadInt(fs) debugprint "chunk 1 size:"+chunksize Format$=Readbinstring(fs,4) If Format$<>"WAVE" Then RuntimeError name$+" Is not in the standard PCM format" Format2$=Readbinstring(fs,4) If Format2$<>"fmt " Then RuntimeError name$+" Is not in the standard PCM format" chunksize2=ReadInt(fs) debugprint "Chunk2 size:"+chunksize2 compFormat=ReadShort(fs) If compformat<>1 Then RuntimeError name$+" Is not in PCM format" ss_channelcount=ReadShort(fs) debugprint ss_channelcount+" ss_channelcount" samplerate=ReadInt(fs) debugprint "at "+samplerate/1000.0+" Khz" byterate=ReadInt(fs) blockalign=ReadShort(fs) ss_bpsample=ReadShort(fs) debugprint ss_bpsample+" Bits Per channel" Format3$=Readbinstring(fs,4) If Format3$<>"data" Then RuntimeError "Data Alignment Error" debugprint "Header Valid! extracting data" ;debugprint ( chunksize=chunksize+8 chunksize=chunksize-FilePos(fs) debugprint chunksize+" bytes" samples=(ss_bpsample/8)*ss_channelcount samples=chunksize/samples debugprint "("+samples+" Samples)" ;Redimention Arrays Dim wavdata(1,samples) bread=ss_bpsample/8 If ss_bpsample=8 Then Midr=128 If ss_bpsample=16 Then Midr=Midbit/2.0 If ss_bpsample=32 Then Midr=(Midbit*255)/2.0 For n=1 To samples For o=1 To ss_channelcount If bread=1 Then rval=ReadByte(fs) If bread=2 Then rval=ReadShort(fs) If bread=4 Then rval=ReadInt(fs) ;If KeyDown(1) Then End If rval>Midr Then rval=rval-Midr*2 rval=rval+Midr If o=1 Then wavdata(0,n)=rval:wavdata(1,n)=rval If o=2 Then wavdata(1,n)=rval Next Next debugprint "File Read In Successfully!" End Function Function debugprint(St$) Print st$ End Function
If these work well, let me know :)
Wow, thanks a lot!!! Gonna test it asap.
or goldwave
Goldwave is an invaluable tool for audio manipulation and conversion. Well worth the money if you are into music\audio.
Russell
Russell
Converting from 8kHz to 44.1kHz in goldwave won't do the trick. a simple interpolation is nice. Using bezier curves even better. There may be even better practices. EG. when you assume that the file was converted from 44.1 kHz to 8kHz, you can use this to predict missing information, using a reverse moire pattern resolver (or something).
Hey jfk, Hows the code?