Questions tagged [spectrum]

The frequency domain of a wave-like function.

Spectrum refers to the full range of all frequencies of electromagnetic radiation. Spectrum has since been applied by analogy to topics outside of electromagnetic radiation. For a complete discussion, see the Wikipedia Spectrum article

389 questions
111
votes
4 answers

Analyze audio using Fast Fourier Transform

I am trying to create a graphical spectrum analyzer in python. I am currently reading 1024 bytes of a 16 bit dual channel 44,100 Hz sample rate audio stream and averaging the amplitude of the 2 channels together. So now I have an array of 256…
user19745
  • 3,499
  • 8
  • 25
  • 21
72
votes
5 answers

Units of a Fourier Transform (FFT) when doing Spectral Analysis of a Signal

My question has to do with the physical meaning of the results of doing a spectral analysis of a signal, or of throwing the signal into an FFT and interpreting what comes out using a suitable numerical package, Specifically: take a signal, say a…
Assad Ebrahim
  • 6,234
  • 8
  • 42
  • 68
33
votes
1 answer

How to generate the audio spectrum using fft in C++?

I want to generate an audio spectrum (as seen in this video) of a mp3 audio file. Basically this problem requires calculating the fft of the audio signal. How do I program this in C/C++? I've looked at a couple of open source libraries such as FFTW…
MRashid
  • 472
  • 1
  • 5
  • 13
24
votes
4 answers

Spectrogram C++ library

For my current project in C++ / Qt I need a library (LGPL is preferred) which can calculate a spectrogram from a signal ( basically an array of doubles ). I already use Qwt for the GUI part. Any suggestions? Thanks.
gregseth
  • 12,952
  • 15
  • 63
  • 96
24
votes
1 answer

Generating a spectrogram for a sequence of 2D movie frames

I have some data that consists of a sequence of video frames which represent changes in luminance over time relative to a moving baseline. In these videos there are two kinds of 'event' that can occur - 'localised' events, which consist of luminance…
ali_m
  • 71,714
  • 23
  • 223
  • 298
22
votes
4 answers

Why do I need to apply a window function to samples when building a power spectrum of an audio signal?

I have found for several times the following guidelines for getting the power spectrum of an audio signal: collect N samples, where N is a power of 2 apply a suitable window function to the samples, e.g. Hanning pass the windowed samples to an FFT…
Nuno Santos
  • 1,476
  • 3
  • 17
  • 34
21
votes
3 answers

iOS - Smooth Color Change Transition/Animation

I want to have a smooth color transition that goes across the entire spectrum (i.e. red, blue, green, yellow, orange, etc.) Also want to be able to have smooth transitions of colors in specific spectrum (i.e. all reds). Are there any simple…
JimmyJammed
  • 9,598
  • 19
  • 79
  • 146
19
votes
5 answers

Sorting a list of RGB triplets into a spectrum

I have a list of RGB triplets, and I'd like to plot them in such a way that they form something like a spectrum. I've converted them to HSV, which people seem to recommend. from PIL import Image, ImageDraw import colorsys def…
Jason Sundram
  • 12,225
  • 19
  • 71
  • 86
19
votes
3 answers

Clojure/Java: Java libraries for spectrum analysis of sound?

I am looking for a library that can accept a chunk of audio data and return the average amplitude over time within a given frequency band. I've already asked this question over at comp.dsp, but it's clear to me that acquiring the know-how to build…
jkndrkn
  • 4,012
  • 4
  • 36
  • 41
15
votes
2 answers

scipy.signal.spectrogram compared to matplotlib.pyplot.specgram

The following code generates a spectrogram using either scipy.signal.spectrogram or matplotlib.pyplot.specgram. The color contrast of the specgram function is, however, rather low. Is there a way to increase it? import numpy as np from scipy import…
14
votes
2 answers

Creating audio spectrum of youtube stream HTML5

createMediaElementSource in HTML5 (Draw visualization of youtube video). Is that possible? Could you show me a example if it is? I just want to add a traditional youtube player and under it the spectrum/visualization, I found a mp3 version on the…
Kavvson Empcraft
  • 445
  • 7
  • 32
14
votes
1 answer

iOS FFT Accerelate.framework draw spectrum during playback

UPDATE 2016-03-15 Please take a look at this project: https://github.com/ooper-shlab/aurioTouch2.0-Swift. It has been ported to Swift and contains every answer you're looking for, if you cam here. I did a lot of research and learned a lot about FFT…
benjamin.ludwig
  • 1,575
  • 18
  • 28
12
votes
3 answers

Get a spectrum of frequencies from WAV/RIFF using Linux command line

How to generate a file that contains the spectrum of frequencies of a WAV/RIFF sound file? I would like to use the Linux command line. I know the cool SoX function to generate PNG spectrograms: sox sound.wav -n spectrogram But I do not need a…
zsedc
  • 141
  • 1
  • 1
  • 7
11
votes
1 answer

iOS FFT Draw spectrum

I've read these question: Using the Apple FFT and Accelerate Framework How do I set up a buffer when doing an FFT using the Accelerate framework? iOS FFT Accerelate.framework draw spectrum during playback They all describe how to setup fft with the…
user2173177
  • 111
  • 1
  • 1
  • 4
10
votes
1 answer

Normalizing FFT spectrum magnitude to 0dB

I'm using FFT to extract the amplitude of each frequency components from an audio file. Actually, there is already a function called Plot Spectrum in Audacity that can help to solve the problem. Taking this example audio file which is composed of…
WangYudong
  • 4,335
  • 4
  • 32
  • 54
1
2 3
25 26