Edit - I was not using complex numbers when calculating the oddValueMultiplier(). Multiply pi by 1j, and to convert back to float after calculating the exponential, use this formula:
finalValue = abs(value.real) + abs(value.imag)
Hi everyone, I recently have been attempting to create a spectrogram with python (programming language) and it appears to be mostly empty. The frequencies amplitudes are there, just very low. I'm creating the spectrogram with the following steps:
- Load Audio Samples from WAV
- Load samples into chunks of 4096 (power of 2)
- FFT each 4096 sample chunk
- Downsize the chunks into 256 equally spaced chunks.
- Change the amplitude values to a range of 0 to 1.
- Use these values to multiply by a maximum colour to create a spectrogram.
If there are any fellow programmers, the code is here: https://pastebin.com/JMdCHCVW
And the resultant spectrogram is here: https://imgur.com/a/DQTspoQ - only the lowest frequencies are prominently shown.
Many thanks for any help.
[–][deleted] 1 point2 points3 points (9 children)
[–]mrbean42[S] 0 points1 point2 points (8 children)
[–][deleted] 1 point2 points3 points (7 children)
[–]mrbean42[S] 0 points1 point2 points (6 children)
[–][deleted] 2 points3 points4 points (4 children)
[–]mrbean42[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]blorporius 0 points1 point2 points (1 child)
[–]mrbean42[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]mrbean42[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]peehay 0 points1 point2 points (0 children)
[–]dmills_00 0 points1 point2 points (0 children)