| 1 | Spectrum analyser demo app
|
|---|
| 2 | ==========================
|
|---|
| 3 |
|
|---|
| 4 | Introduction
|
|---|
| 5 | ------------
|
|---|
| 6 |
|
|---|
| 7 | This application is a demo which uses the QtMultimedia APIs to capture and play back PCM audio. While either recording or playback is ongoing, the application performs real-time level and frequency spectrum analysis, displaying the results in its main window.
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | Acknowledgments
|
|---|
| 11 | ---------------
|
|---|
| 12 |
|
|---|
| 13 | The application uses the FFTReal v2.00 library by Laurent de Soras to perform frequency analysis of the audio signal. For further information, see the project home page:
|
|---|
| 14 | http://ldesoras.free.fr/prod.html
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | Quick start
|
|---|
| 18 | -----------
|
|---|
| 19 |
|
|---|
| 20 | Play generated tone
|
|---|
| 21 | 1. Select 'Play generated tone' from the mode menu
|
|---|
| 22 | 2. Ensure that the 'Frequency sweep' box is checked
|
|---|
| 23 | 3. Press 'OK'
|
|---|
| 24 | 4. Press the play button
|
|---|
| 25 | You should hear a rising tone, and see progressively higher frequencies indicated by the spectrograph.
|
|---|
| 26 |
|
|---|
| 27 | Record and playback
|
|---|
| 28 | 1. Select 'Record and play back audio' from the mode menu
|
|---|
| 29 | 2. Press the record button, and speak into the microphone
|
|---|
| 30 | 3. Wait until the buffer is full (shown as a full blue bar in the top widget)
|
|---|
| 31 | 4. Press play, and wait until playback of the buffer is complete
|
|---|
| 32 |
|
|---|
| 33 | Play file
|
|---|
| 34 | 1. Select 'Play file' from the mode menu
|
|---|
| 35 | 2. Select a WAV file
|
|---|
| 36 | 3. Press the play button
|
|---|
| 37 | You should hear the first few seconds of the file being played. The waveform, spectrograph and level meter should be updated as the file is played.
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | Things to play with
|
|---|
| 41 | -------------------
|
|---|
| 42 |
|
|---|
| 43 | Try repeating the 'Play generated tone' sequence using different window functions. These can be selected from the settings dialog - launch it by pressing the spanner icon. The window function is applied to the audio signal before performing the frequency analysis; different windows should have a visible effect on the resulting frequency spectrum.
|
|---|
| 44 |
|
|---|
| 45 | Try clicking on one of the spectrograph bars while the tone is being played. The frequency range for that bar will be displayed at the top of the application window.
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 | Troubleshooting
|
|---|
| 49 | ---------------
|
|---|
| 50 |
|
|---|
| 51 | If either recording or playback do not work, you may need to select a different input / output audio device. This can be done in the settings dialog - launch it by pressing the spanner icon.
|
|---|
| 52 |
|
|---|
| 53 | If that doesn't work, there may be a problem either in the application or in Qt. Report a bug in the usual way.
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
|
|---|