April 18, 2024, 05:51:28 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


FFT Audio tones ripper

Started by sapero, July 09, 2009, 07:47:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

July 09, 2009, 07:47:49 PM Last Edit: July 23, 2009, 04:29:19 PM by sapero
This is a project i always wanted - put in a mp3, and it will show you how to play it. Maybe it is working not perfectly, but I was able to play most of my piano mp3's.

You can iport any file supported by DirectShow. The file will be decompressed to raw PCM mono 16-bit format, then loaded to memory, so you need 50-100MB or free ram.
I have found a bug in one of the DirectShow filters - ACM Wrapper (compressor) used to ensure the output mono format. It outputs the sum of two channels, but does not divide it by two, so I had to insert a second SampleGrabber filter to divide all audio samples by the number of channels before putting the samples to compressor.

There is a spectrum analyser (again, you need FFTW v3 binaries), a oscilloscope, peak meter, simple player and piano keyboard (read only).

Haim

Hello,
When I try to build the project I receive "error compiling resource"
what did I do wrong?

Haim

sapero

July 11, 2009, 11:47:56 AM #2 Last Edit: July 11, 2009, 05:49:21 PM by sapero
Hello,
You can add the .res file to project (and rename the .rc file), or update your old resource compiler gorc.exe to 0.9.0.4 :) http://www.jorgon.freeserve.co.uk/
Some headers have been updated and this project relies on the updated vesrion. I'm now ready to upload the new sdk pak Updated headers uploaded, follow the link in my signature.

I have uploaded it again with bugfix in audio recompressor module. Added simple spectrum dumper (Menu/export) and save/restore settings module. Piano keys can be toggled by mouse click, and saved in combo box or file.

Haim

Thanks Sapero for your advice.
Everythings works just fine now!

Haim

sapero

July 17, 2009, 03:15:27 PM #4 Last Edit: July 22, 2009, 01:04:50 PM by sapero
I have updated it again.
* If a video file contains multiple audio streams (avi, matroska) you'll be prompted to choose one. For avi files, the code computes the number of audio renderers and removes all but the selected. For matroska like files, each DirectShow filter is queried for IAMStreamSelect interface.
* If the application finds bass.dll, the audio filter (menu/open) will be updated to support all files acceptable by bass - xm, mod and other.
* If DirectShow importer code fails to load the file, bass.dll will be used, if possible.
* Tone detecting level can be adjusted by arrow keys, or with the mouse.
* Wave selection can be resized with the mouse.
* Added .ogm, 3gp and .mkv extensions to the fileopen box.
* Piano tones are generated from the base tone (sine) plus second and third harmonics.
* Changed FFT precision from doubles to floats, cpu usage decreased.
July 22 - build 11
* Added export option. If you have lame_enc.dll, export to mp3 (still mono) will be enabled.
* Fixed crash on minimize
* Fixed waveform zooming with mouse wheel. The sample under mouse will not move.
* The reference amplitude is now computed this way: m_inputSize/2 (in CFFT::ComputeMaximumLevel)
* bass and lame_enc can be installed with other programs, like klite codec pak or gordian knot, so if simple LoadLibrary fails, the program will search in known locations.

Brian

July 29, 2023, 04:50:22 AM #5 Last Edit: July 29, 2023, 06:39:20 AM by Brian
Thought this was an interesting program to download from our long-lost friend, Sapero, but it was missing a DLL. Took some finding, as there were quite a few versions. Just put the DLL into the same folder as the supplied exe. Works great! You don't need an installation of Aurora, unless you want to re-compile it

Download Sapero's ToneRipper11 from the first post on this page

Brian

Egil

Thanks Brian!
Never found the correct DLL when Sapero posted this example. It works great with the DKLL you supplied though. Aurora somehow dissapeared from my mind a couple of computers ago, so maybe I should install it again to study this example. In 2009 I was deeply into decoding digital radio transmissions and SDR (software defined Radio), but never got the hang of it so mybe its time for a second look now?.
BTW, tried to enclose a collection of MIDI files with piano music to go with this software, but it was not allowed due to size (13MB).

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

Egil,

Could be a RAM issue, as Sapero points out in his first post, you need plenty of it. Just tested, and I loaded a 35,515 mb MP3 file in successfully (I have 16gb)

Brian


Egil

Brian,
I did not express myself clearly, so you misunderstood.... sorry.
Tried to post the a zip file containing these piano tunes here on the forum, but could not upload it due to size.

After downloading "your" dll file, Sapero's software plays fine on both my computers.

Honestly, decoding shortwave digital transmissions still sounds very tempting to me. There are tons of SDR software out there, but none of them really suits my needs... yet.
So maybe I'll study the source files to see how difficult it can be to make my own version?

Egil
Support Amateur Radio  -  Have a ham  for dinner!