How to set up smartphones and PCs. Informational portal

Sound card spectrum analyzer program.

What do you think girls do when they get together? Do they go shopping, take pictures, go to beauty salons? Yes, it is, but not everyone does it. This article will discuss how two girls decided to assemble an electronic device with their own hands.

Why Spectrum Analyzer?

After all, there are quite a few software solutions to this problem and there are also a lot of hardware implementation options. Firstly, I really wanted to work with a large number of LEDs (since we have already assembled a led cube, each for ourselves, but in small sizes), and secondly, to apply in practice the knowledge gained on digital signal processing and, in- third, once again practice working with a soldering iron.

Device development

Because taking a ready-made solution and doing it strictly according to the instructions is boring and uninteresting, so we decided to develop the circuit ourselves, relying only a little on the already created devices.

An 8x32 LED matrix was chosen as a display. It was possible to use ready-made 8x8 led matrices and assemble from them, but we decided not to deny ourselves the pleasure of sitting in the evening with a soldering iron, and therefore we assembled the display ourselves from the LEDs.

To drive the display, we did not reinvent the wheel and used a dynamic display control circuit. Those. they chose one column, lit it, the rest of the columns were extinguished at that moment, then they chose the next one, lit it, the rest extinguished, etc. Due to the fact that the human eye is not perfect, we can observe a static picture on the display.
Taking the path of least resistance, it was decided that it would be reasonable to transfer all calculations to the Arduino controller.

The inclusion of a particular row in a column is carried out by opening the corresponding key. To reduce the number of controller output pins, the column is selected through decoders (thus, we can reduce the number of control lines to 5).

The TRS connector (mini-jack 3.5 mm) was chosen as the interface for connecting to a computer (or other device capable of transmitting an audio signal).

Assembling the device

We start assembling the device by making a mock-up of the front panel of the device.

The material for the front panel was black plastic 5mm thick (since the diode lens diameter is also 5mm). According to the developed layout, we mark out, cut out the front panel to the required size and drill holes in the plastic for LEDs.

Thus, we get a ready-made front panel, on which you can already assemble the display.

Two-color (red-green) with a common cathode GNL-5019UEUGC were used as LEDs for the matrix. Before starting the matrix assembly, being guided by the rule “extra control will not damage” all LEDs, namely 270 pcs. (they took it with a margin just in case), were tested for operability (for this, a testing device was assembled, including a connector, a 200Ω resistor and a 5V power supply).

Then we unbend the LEDs as follows. We bend the anodes of the red and green diodes in one direction (to the right), bend the cathode in the other direction, while making sure that the cathode is lower than the anodes. And then bend the cathode down at 90 °.

We start the assembly of the matrix from the lower right corner, we assemble it by columns.

Remembering the rule “extra control does not hurt”, after one or two soldered columns, we check the performance.

The finished matrix looks like this.

Back view:

According to the developed scheme, we solder the row and column control circuit, we solder the loops and a place for the Arduino.

It was decided to display not only the amplitude-frequency spectrum, but also the phase-frequency spectrum, as well as select the number of samples to display (32,16,8,4). For this, 4 switches were added: one for choosing the type of spectrum, two for choosing the number of samples, and one for turning the device on and off.

Writing a program

Once again, we are guided by our rule and make sure that our display is fully operational. To do this, we write a simple program that completely lights up all the LEDs on the display. Naturally, according to Murphy's Law, several LEDs lacked current and needed to be replaced.

After making sure that everything works, we started writing the main program code. It consists of three parts: initialization of the necessary variables and data reading, obtaining the signal spectrum using the fast Fourier transform, displaying the obtained spectrum with the necessary formatting on the display.

Assembling the end device

At the end, we have a front panel, and under it are a bunch of wires that need to be covered with something, and the switches need to be fixed on something. Before that, there were thoughts to make the body out of the remains of plastic, but we did not quite imagine how it would look specifically and how to do it. The solution to the problem came quite unexpectedly. Walking through the hardware store, we found a plastic flower pot that was surprisingly perfect in size.

The matter remained small, mark the holes for connectors, cables and switches, as well as cut out two side panels from plastic.

As a result, putting everything together, connecting the device to the computer, we got the following:

Amplitude-frequency spectrum (32 counts):

Amplitude-frequency spectrum (16 counts):

Amplitude-frequency spectrum (8 samples):

Amplitude-frequency spectrum (4 counts):

Phase-frequency spectrum:

Rear panel view:

Video of device operation

For clarity, the video was filmed in the dark. The device displays the amplitude-frequency spectrum on the video, and then at 7 seconds we switch it to the phase-frequency spectrum mode.

List of required items

  1. LEDs GNL-5019UEUGC - 256 pcs. (For display)
  2. Transistors n-p-n KT863A - 8 pcs. (To manipulate strings)
  3. Transistors p-n-p С32740 - 32 pcs. (To manage columns)
  4. Resistors 1kOhm - 32 pcs. (To limit the base current of pnp transistors)
  5. Decoders 3/8 IN74AC138 - 4 pcs. (To select a column)
  6. Decoders 2/4 IN74AC139 - 1 pc. (For cascading decoders)
  7. Mounting plate 5x10cm - 2 pcs.
  8. Loops
  9. Arduino Pro micro - 1 pc.
  10. Mini-jack 3.5mm - 1 pc.
  11. Switch - 4 pcs.
  12. Black plastic 720 * 490 * 5 mm - 1 sheet. (For bezel)
  13. Flowerpot black 550 * 200 * 150 mm - 1 pc. (For the case)

The program is an Open Source real-time amplitude-frequency sound analyzer.

Frequency Analyzer works with any sound vibration, including the human voice, performing a fast Fourier transform on them and breaking them down into frequency components.

When the microphone converts sound into voltage, the sound card acts as a very fast digital voltmeter that measures voltage from 11025 to 44100 times per second (you can set the number of measurements per second in the program yourself). Each measurement is converted to an eight- or sixteen-digit number. Sixteen-digit numbers allow for more accurate analysis of weak signals. As a result of sampling, it is possible to obtain a series of numbers. They are recreated as a sinusoid in the working window of the program called "Wave". In addition, any sound can be shown as a combination of sine waves of different frequencies. Mathematically, this division into frequency components is called the Fourier transform. The best of all possible algorithms is called Fast Fourier Transform. Thus, the "Frequency Spectrum" window shows the spectral composition of the sound.

In the program, you can select the number of measurements that will be included in one Fourier transform. The more measurements are taken, the more frequencies can be found in the spectrum. When you change this value in Frequency Analyzer, the graph will change.

For those who would like to make such programs on their own, the developers presented the original Fast Fourier Transform algorithm, created in C + +. You can use it freely in any commercial software. Also, by popular demand, the distribution kit includes a tutorial on how to work with signals coming to a microphone using the Win32 API, the complete Frequency Analyzer source code, and a textbook on the physics of sound. This software package works without installation. For the program to work, you must have a microphone and sound card.

The number of calculations of Fourier transforms per second can be adjusted using the program parameter “Speed ​​(FFT“ s per sec). ”However, the developers warn that you should be very careful when changing these values, since slow processors may not be able to handle all the values ​​sent by the sound card. will freeze the computer.

Frequency Analyzer was developed by Reliable Software in 1996. It is a union of four independent programmers, two of whom live in Seattle, USA (Bartosz Milevsky and Debbie Erlich), and two in Gdansk, Poland (Wieslaw Kalkus and Piotr Troyanovski). The main goal of its activity is the company declares the fight against low quality software. Work on the creation of programs takes place remotely in real time via Skype. The authors have already created a number of Windows tutorials and an online programming book, a threading programming blog, and a Windows API reference.

The application interface is English, there is no localization. However, due to the minimal number of settings, it is not difficult to understand the program.

Frequency Analyzer runs on personal computers running Microsoft Windows operating systems starting from Windows 98.

Distribution of the program: Freeware (free)

Alexey Lukin

Spectrum analyzer - a device for measuring and displaying the spectrum of a signal - the distribution of signal energy over frequencies. This article discusses the main types of spectrum analyzers and illustrates their use for editing and restoring sound. Particular attention is paid to modern analyzers based onFFT- fast Fourier transform.

Why analyze a spectrum?

Traditionally, in digital audio recording, an audio track is represented in the form of an oscillogram that displays the shape of a sound wave (waveform), that is, the dependence of the amplitude of a sound on time. Such a representation is quite visual for an experienced sound engineer: the oscillogram allows you to see the main events in the sound, such as changes in volume, pauses between parts of a piece, and often even individual notes in a solo recording of an instrument. But the simultaneous sounding of several instruments on the oscillogram "mixes up" and visual analysis of the signal becomes difficult. However, our ear can easily distinguish between individual instruments in a small ensemble. How does this happen?

When a complex sound vibration hits the eardrum of the ear, it is transmitted through a series of ossicles to an organ called the cochlea. The snail is an elastic tube twisted into a spiral. The thickness and stiffness of the snail vary smoothly from the edge to the center of the spiral. When a complex vibration arrives at the edge of the cochlea, it causes vibrations in response from different parts of the cochlea. In this case, the resonant frequency for each part of the cochlea is different. Thus, the snail decomposes a complex sound vibration into separate frequency components. Each part of the cochlea is approached by separate groups of auditory nerves that transmit information about the vibrations of the cochlea to the brain (for more details on auditory perception, see the article "Fundamentals of psychoacoustics" by I. Aldoshina in the magazine "Sound Engineer" No. 6, 1999). As a result, the brain receives information about the sound, already decomposed into frequencies, and a person can easily distinguish high sounds from low ones. In addition, as we will see shortly, frequency decomposition helps distinguish individual instruments in a polyphonic recording, which greatly expands editing options.

Bandwidth analyzers

The first audio spectrum analyzers split the signal into frequency bands using a set of analog filters. The display of such an analyzer (Fig. 1) shows the signal level in many frequency bands corresponding to the filters.

Rice. 1. A third-octave Specan32 analyzer emulating the well-known KlarkTeknik DN60 device

In fig. 2 shows an example of frequency characteristics of bandpass filters in an analyzer that meets the GOST 17168-82 standard. Such an analyzer is called a one-third octave, since there are three bands in each octave of the frequency range. It can be seen that the frequency characteristics of the bandpass filters overlap; their slope depends on the order of the filters used.

Rice. 2. Frequency response of one-third octave spectrum analyzer filters

An important property of a spectrum analyzer is ballistics - the inertia of level meters in frequency bands. It can be adjusted by setting the rate of rise (attack) and fall of the level. Typical attack and fall times in such an analyzer are in the order of 200 and 1500 ms.

Bandwidth analyzers are often used to adjust the frequency response (frequency response) of acoustic systems at concert venues. If the input to such an analyzer is fed pink noise(having the same power in each octave), the display will show a horizontal line, possibly corrected for noise over time. If the pink noise, passing through the sound reinforcement system of the hall, is distorted, then changes in its spectrum will be visible on the analyzer. In this case, the analyzer, like our ear, will be insensitive to narrow dips in the frequency response (less than 1/3 octave).

Fourier transform

The Fourier transform is a mathematical apparatus for decomposing signals into sinusoidal oscillations. For example, if the signal x(t) continuous and infinite in time, then it can be represented as a Fourier integral:

The Fourier integral collects the signal x(t) from an infinite set of sinusoidal components of all possible frequencies ω having amplitudes X ω and phases φ ω .

In practice, we are more interested in the analysis of time-finite sounds. Since music is not a static signal, its spectrum changes over time. Therefore, in spectral analysis, we are usually interested in individual short signal fragments. To analyze such fragments of digital audio signal, there is discrete Fourier transform:

Here N discrete signal samples x(n) in the time interval from 0 to N-1 are synthesized as the sum of a finite number of sinusoidal oscillations with amplitudes X k and phases φ k... The frequencies of these sinusoids are kF / N, where F is the sampling rate of the signal, and N- the number of samples of the original signal x(n) on the analyzed interval. Set of coefficients X k called amplitude spectrum of the signal... As can be seen from the formula, the frequencies of the sinusoids, into which the signal is decomposed, are evenly distributed from 0 (constant component) to F/ 2 - the maximum possible frequency in a digital signal. This linear arrangement of frequencies differs from the bandwidth of a one-third octave analyzer.

FFT analyzers

FFT (fast Fourier transform) is an algorithm for fast computation of the discrete Fourier transform. Thanks to him, it became possible to analyze the spectrum of audio signals in real time.

Let's take a look at the operation of a typical FFT analyzer. It receives a digital audio signal at the input. The analyzer selects successive intervals from the signal ("window"), on which the spectrum will be calculated, and calculates the FFT in each window to obtain the amplitude spectrum X k... The calculated spectrum is displayed as a graph of the amplitude versus frequency (Fig. 3). Similar to band-pass analyzers, a logarithmic scale along the frequency and amplitude axes is usually used. However, due to the linear arrangement of the FFT bands in frequency, the spectrum may appear insufficiently detailed at low frequencies or excessively oscillatory at high frequencies.

Rice. 3. FFT analyzer display

Considering the FFT as a set of filters, then, unlike the bandpass filters of a one-third octave analyzer, the FFT filters will have the same width in hertz, not in octaves. Therefore, the pink noise on the FFT analyzer will no longer be a horizontal line, but an oblique one with a slope of 3 dB / oct. The horizontal line on the FFT analyzer will be White noise- it contains equal energy in equal linear frequency intervals.

Parameter N- the number of analyzed signal samples - is of decisive importance for the type of spectrum. The more N, the denser the frequency grid over which the FFT decomposes the signal, and the more frequency detail is seen in the spectrum. To achieve a higher frequency resolution, it is necessary to analyze longer sections of the signal. If the signal within the FFT window changes its properties, then the spectrum will display some averaged information about the signal from the entire window interval.

When you need to analyze fast changes in a signal, the window length N choose small. In this case, the analysis resolution increases in time and decreases in frequency. Thus, the frequency resolution of the analysis is inversely proportional to the time resolution. This fact is called uncertainty.

Weighing windows

One of the simplest sound signals is a sinusoidal tone. What will its spectrum look like on an FFT analyzer? It turns out it depends on the frequency of the tone. We know that the FFT does not decompose the signal into the frequencies that are actually present in the signal, but along a fixed uniform frequency grid. For example, if the sampling rate is 48 kHz and the FFT window size is 4096 samples, then the FFT decomposes the signal into 2049 frequencies: 0 Hz, 11.72 Hz, 23.44 Hz, ..., 24000 Hz.

If the tone frequency matches one of the FFT grid frequencies, then the spectrum will look "perfect": a single sharp peak will indicate the tone frequency and amplitude (Figure 4, white graph).

If the tone frequency does not coincide with any of the frequencies of the FFT grid, then the FFT will "collect" the tone from the frequencies available in the grid, combined with different weights. In this case, the spectrum graph is blurred in frequency (Fig. 4, green graph). This blurring is usually undesirable as it can mask weaker sounds at adjacent frequencies. You can also notice that the amplitude of the maximum of the green graph is lower than the real amplitude of the analyzed tone. This is due to the fact that the power of the analyzed tone is equal to the sum of the powers of the spectrum coefficients from which this tone is composed.

Rice. 4. Spectrum of a sinusoidal tone of various frequencies with and without weighting windows

To reduce the blurring effect, the signal is multiplied by weight windows- smooth functions, similar to a Gaussian, falling off to the edges of the interval. They reduce spectrum blur at the expense of some degradation in frequency resolution. Considering the FFT as a set of bandpass filters, the weighting windows regulate the mutual penetration of the frequency bands.

The simplest window is rectangular: it is constant 1, which does not change the signal. It is equivalent to the absence of a weighting window. One of the popular windows is the Hamming window. It reduces the smear level by about 40 dB from the main peak.

Weight windows differ in two main parameters: the degree of expansion of the main peak and the degree of suppression of spectrum blur ("side lobes")... The more we want to suppress the sidelobes, the wider the main peak will be. The rectangular window blurs the top of the peak least of all, but has the highest side lobes. The Kaiser window has a parameter that allows you to select the desired degree of sidelobe suppression.

Another popular choice is the Khan window. It suppresses the maximum sidelobe weaker than the Hamming window, but the rest of the sidelobes fall off faster with distance from the main peak. The Blackman window has more sidelobe suppression than the Khan window.

For most tasks, it is not very important which type of weighting window to use. The main thing is to have it. Popular choices are Khan or Blackman. The use of a weighting window reduces the dependence of the spectrum shape on a specific signal frequency and on its coincidence with the FFT frequency grid.

Figure 4 is made for sinusoids, however, based on it, it is easy to imagine how the spectrum of real sound signals will look like. Each peak in the spectrum will have some blurred shape, depending on its frequency and the selected weight window.

Longer FFT windows can be used to compensate for peak broadening when using weight windows: for example, not 4096, but 8192 samples. This will improve the resolution of the analysis in frequency but degrade in time.

Spectrogram

It is often necessary to trace how the signal spectrum changes over time. FFT analyzers help to do this in real time when playing back a signal. However, in a number of cases, it turns out to be convenient to visualize the change in the spectrum in the entire audio fragment at once. This signal representation is called spectrogram... To build it, use windowed Fourier transform: the spectrum is calculated from successive signal windows (Fig. 5), and each of these spectra forms a column in the spectrogram.

Rice. 5. Calculation of the signal spectrogram

The horizontal axis of the spectrogram is time, the vertical axis is frequency, and the amplitude is displayed in brightness or color. The spectrogram of the guitar note in Fig. 6 shows the development of sound: it begins with a sharp attack and continues in the form of harmonics, multiples of the frequency of the fundamental tone of 440 Hz. It can be seen that the upper harmonics have a lower amplitude and decay faster than the lower ones. Also, the recording noise can be traced on the spectrogram - a uniform background of dark blue color. On the right is the scale of the correspondence of colors and signal levels (in decibels below zero).

Rice. 6. Spectrogram of a guitar note with different FFT window sizes

If you change the size of the FFT window, you can clearly see how the frequency and time resolution of the spectrogram changes. As the window increases, the harmonics become thinner and their frequency can be determined more accurately. However, the moment of attack is blurred in time (on the left side of the spectrogram). When the window size is reduced, the opposite effect is observed.

The spectrogram is especially useful when analyzing rapidly changing signals. In fig. 7 shows a spectrogram of a vocal passage with vibrato. From it, it is easy to determine such characteristics of the voice as the frequency and depth of vibrato, its shape and evenness, the presence of a singing formant. By changing the pitch of the main tone and harmonics, the performed melody can be traced.

Rice. 7. Spectrogram of a vocal passage with vibrato

Spectrogram Applications

Modern means of sound restoration, such as the iZotope RX program, actively use the spectrogram to edit individual time-frequency regions in the signal. Using this technique, you can find and suppress unwanted overtones such as a mobile phone ringing during an important recording, the creak of a pianist's chair, a cough in the auditorium, etc.

Let us illustrate the use of a spectrogram to remove fan whistles from a live recording.


Rice. 8. Removing unwanted overtones using a spectrogram

In fig. 8 the whistle is easy to find: it is a light curved line in the 3 kHz region. If the whistle frequency were constant, then it could be suppressed using a notch filter. However, in our case, the frequency changes. It is convenient to use the “magic wand” tool from the iZotope RX II program to highlight the whistle on the spectrogram. Press once to highlight the main tone of the whistle, press again to highlight harmonics. After that, the whistle can be removed by simply pressing the Del key. However, a more accurate way is to use the Spectral Repair module: this will avoid "holes" in the spectrum after removing the whistle. After applying this module in the Attenuate vertically mode, the whistle almost completely disappears from the recording, both visually and aurally.

Another useful application of the spectrogram is to analyze the presence of traces of MP3 compression or other lossy codecs in a recording. Most recordings of original (uncompressed) quality have a frequency range of up to 20 kHz and above; in this case, the signal energy decreases smoothly with increasing frequency (as in Fig. 6, 7). As a result of psychoacoustic compression, the upper frequencies of the signal are quantized more than the lower ones, and the upper limit of the signal spectrum is zeroed (as in Fig. 8). In this case, the cutoff frequency depends on the content of the encoded signal and on the bitrate of the encoder. It is clear that the encoder strives to zero out only those frequencies in the signal that are currently not audible (masked). Therefore, the cutoff frequency, as a rule, changes over time, which forms a characteristic "fringe" on the spectrogram with islands of energy against a dark background.

A similar situation sometimes occurs with low frequency interference, such as wind blowing into the microphone or DC offset (DC offset). They can be located at infra-low frequencies and not detect themselves without the help of a spectrum analyzer or oscilloscope.

Conclusion

It is widely believed among experienced old-school sound engineers that signals should be analyzed and edited solely by ear, not relying on indicators and analyzers. Of course, analyzers are not a panacea for hearing loss. Hardly anyone seriously perceives the idea of ​​mixing the composition "by instruments".

Spectrum and spectrogram are ways of representing sound that are closer to auditory perception than an oscillogram. I hope that this article will open up new possibilities in the analysis and editing of sound for those who have not worked with these views before.

Each of you has probably come across sound analyzers whether he wanted it or not. On store shelves for more than ten years, every more or less decent music center has one. People usually call them "color music", "equalizer" and the like. On the computer, too, many players have spectrum analyzers and in some cases visualize sound very powerfully (plug-ins for Winamp). But now we will not talk about ordinary user, but about professional programs for analyzing the signal (in our case, sound). Let me explain why I write "signal". In fact, these programs allow you to analyze the signal arriving at the input of the sound card, but there are craftsmen who give non-audio signals and get something like an oscilloscope or multimeter, but again we don’t need that. In my review, I included 3 programs for signal (sound) analysis: PAS Analysis Center v3.5, 4Pockets PocketRTA PC v1.0 and Pinguin Audio Meter v2.2.

PAS Analysis Center v3.5

So, let's start in order: by running the program, we see several windows (Fig. 1). Here we will consider them further.

Figure 1. Windows in PAS Analysis Center v3.5

The first of the windows is Spectrum Analyzer, the spectrum analyzer itself. On the first tab (FFT Length), settings are made for the Fourier transform (in fact, the very process of representing a signal in a spectral form). Blackman, Hamming, Parzen, etc. are the so-called "windows", in other words, these are the names of mathematicians who each proposed their own weighting function to represent the spectrum of sound. If you want to feel the difference between them, then turn on the generator (Fig. 2) and generate a sine wave (Sine).

Figure 2. Turning on the generator

Since the sinusoid should ideally give one peak in the spectral region, you can switch the above "windows" and look at the result.

The next parameter is FFT Length... This is the number of samples in the Fourier transform. The larger this value, the more accurate the spectral response, but the slower the process. And vice versa.

The next tab is Scale... The scale settings of the spectrum analyzer are located here. All three characteristics govern the axial expansion / contraction.

Display... This tab contains settings for the type of spectrum analyzer.

Log Amplitude and Log Frequency- logarithmic or linear scales along the corresponding axes. Draw grid - drawing the grid. Draw inactive - highlighting spectral bands. Draw amplitude scale and Draw frequency scale - display the graduation of the level and frequency scales, respectively. Draw peaks - drawing peaks. Peaks hold - Displays the last peak value.

Kind- type of spectrum visualization. The Scroll mode is especially interesting here, because in this mode, the third dimension is still included - time.

Peaks- setting the display of peaks. Numbers - peak thickness. Peak delay - delay of peaks. Peak speed - the speed of the decay of the peaks.

Decay- setting the regeneration time of the spectral columns. Needed for speed correction, i.e. so that they do not jump at a breakneck speed or, on the contrary, barely toss and turn.


Figure 3. Oscilloscope

The next window is Oscilloscope (Fig. 3). It shows the waveform in the case of sound, and in general the change in voltage (or current, depending on the connection) of the analyzed signal.

FFT Length- as I said, this is the setting for the Fourier transform.

Scale- here is the setting of scale labels. Effect - select the split by color for the peaks or for the top / bottom (Splitt).

Display- view customization. Scroll is worth highlighting here - a significant compression in time, it is convenient for observing a more general picture.

Outfits- the type of drawing the wave.

Trigger mode- This function is similar to the trigger function in oscilloscopes. And it will hardly be useful for analyzing music. Up Flag and Down Flag - on which edge to synchronize (noticeable on sawtooth signals). Trigger level - trigger level.

And the last window - Spectrogram(Fig. 4) this is actually an inverted spectrum stretched over time. The amplitude (level) is displayed here in color.


Figure 4. Spectrograph

FFT Length - see earlier.

Scale- setting the scale and gain. Amp scale - gain. Sensitive - sensitivity. Freq scale - the degree to which the frequency axis is stretched. Freq base - fundamental (lower) frequency.

Display- Spectrogram display settings. Accelerate - acceleration in time. Embossed - changing the background of the spectrograph, it is especially effective with other adjustments (Black-White in Outfit). Scroll display - scroll the display as you pass or go back.

Outfit- color settings of the spectrogram.

This concludes the window overview.

Now I want to say a little about the basic principles of this program, and other similar ones (signal analyzers).

There are 3 modes of operation of such programs: 1. Live (analysis of sound in real time from the input of the sound card). Here see figure 5

Figure 5. "Live" mode

2. File player. Analyzes already recorded files (see fig. 6)

Figure 6. Player mode

3. Generator mode. I already mentioned it above (see fig. 2). Useful for tweaks and tweaks.

4Pockets PocketRTA PC v1.0

This product is interesting in that it is made for two platforms: PC and Pocket PC, i.e. for both desktop and pocket PCs. I will be looking at the desktop version.

So, turning on the program, we see the main window of the program (Fig. 7).


Figure 7. Main window of 4Pockets PocketRTA PC v1.0

At the top we see the input signal levels. Slightly below is a section showing the level of the loudest frequency in the spectrum in the form of, in fact, a numerical value in hertz, as well as approximately a note corresponding to this frequency. The analyzer window is located even lower. At the very bottom is the settings section. Here we will consider it in more detail.

Scale- choice of accuracy and type of analyzer. In addition, there is an oscilloscope (Sample), a spectrograph (Spectrograph) and such an unusual function as the sound pressure level (SPL). SPL is used to determine the signal-to-noise ratio and some characteristics of the hardware.

Average- a function for the convenience of observing the spectrum (slows down / speeds up)

Mon- (Monitor channel) selection of the type of analyzed channels (mono, stereo, left, right)

Trace- keeps peak levels on the screen. Convenient when tuned to octave.

Weight- according to the developers, at frequencies below 500 Hz and above 4 kHz, the auditory sensitivity drops, which means that outside these frequency limits a person hears sounds quieter. To compensate for this effect, professional equipment uses weight curves. There are 4 types of weight curves available.

Decay is the decay rate of the spectral columns.

Gain- gain control. An increase of 3 dB is like a multiplication of 2 times.

Pause- pause (and who doubted).

Tone- generator. 8 sinusoidal presets of different frequencies and 2 noise presets are available.

I also want to draw your attention to the fact that in the spectral analyzer mode we can see in the section below the levels the frequency, note and level at the point where we click with the mouse. Sometimes useful.

Pinguin Audio Meter v2.2

This product is not as flexible as its siblings. But I liked it for its simplicity and design, because not always and not everyone needs to use a lot of all complex settings.

Program Pinguin Audio Meter has a total of 4 windows (fig. 8)


Figure 8. Pinguin Audio Meter v2.2 main window

The convenience of this program is that each window can be expanded and so it is much more pleasant to observe. When you right-click the mouse, a menu pops up with settings for each window.

PPM Meter- level indicator (fig. 9). The available settings are horizontal / vertical, peak hold, peak decay, decay time, and color.


Figure 9. PPM Meter - Level Meter in Pinguin Audio Meter

Stereo meter - indicator of phase correlation and the width of the stereo base in X-Y coordinates (Fig. 10).


Figure 10. Stereo meter in Pinguin Audio Meter

The following settings are available:

Visible points- the number of visible points to adjust the clarity of the picture.

Thick points- bold or small dots.

Samples- sampling time. Adjusts to reduce processor load.

Spectrum analyzer- spectrum analyzer (as you might guess) (fig. 11).


Figure 11. Spectrum analyzer in Pinguin Audio Meter

In the settings menu, the same ones are available as for the level indicator, but there are a couple more of their own.

Windowing- weighting functions of the Fourier transform (see above, about Spectra Lab). 7 functions are available. The creators of the program find the Welch function interesting.

Input mode- display mode of analyzed channels. Here, unlike the previously reviewed programs, you cannot display multiple channels at once.

Correlation meter- correlometer. Displays the phase difference (correlation) between two channels (Fig. 12). This is a kind of test for the "quality of the stereo picture". It only has two settings - On and Horizontal.

Figure 12. Correlometer in Pinguin Audio Meter

That's all for our "penguin analyzer". Yes, there are a couple more settings on the toolbar, such as sample rate, device selection and priority.

Well, in the end, I decided to summarize the main data in a table, i.e. compare the above analyzers.

Parameter PAS Analysis Center v3.5 4Pockets PocketRTA PC v1.0 Pinguin Audio Meter v2.2
spectrum analyzer + + +
spectrograph + + -
oscilloscope + + -
phase correlation indicator (X-Y) - - +
correlometer - - +
FFT settings + + -
signal generator + + -
file analysis + + -
number of "windows" (types of spectrum display) 7 4 7
appearance (5-point scale) 3 2 4

As seen from the pivot table Pinguin Audio Meter v2.2 it is rather weak in functions, but it has several "chips" that its more powerful brothers cannot boast of - a correlometer and a phase correlation indicator. Appearance - my personal assessment, i.e. quite subjective. I rated it on a 5-point scale. 5 did not deliver to anyone, because, you see, it could have been done more abruptly in terms of graphics (remember the same Winamp plugins). Still, I liked the "penguin" by the look.

Note:

The programs described in this article:


SoundCard Oszilloscope - software that turns a computer into a dual-channel oscilloscope, dual-channel low frequency generator and spectrum analyzer

Good day, dear radio amateurs!
Every radio amateur knows that in order to create more or less complex radio amateur devices, it is necessary to have at your disposal not only a multimeter. Today in our stores you can buy almost any device, but - there is one "but" - the cost of a decent quality of any device is not less than several tens of thousands of our rubles, and it is no secret that for most Russians this is a lot of money, and therefore these devices are not available at all, or a radio amateur buys devices that have been in use for a long time.
Today on the site , we will try to equip the radio amateur's laboratory with free virtual instruments -digital two-channel oscilloscope, two-channel audio frequency generator, spectrum analyzer... The only drawback of these devices is that they all work only in the frequency range from 1 Hz to 20,000 Hz. The site has already given a description of a similar radio amateur program:“ “ - a program that turns a home computer into an oscilloscope.
Today I want to bring to your attention another program - “SoundCard Oszilloscope“. I was attracted by this program for its good characteristics, thoughtful design, ease of study and work in it. This program is in English, there is no Russian translation. But I do not consider this a disadvantage. Firstly, it is very easy to figure out how to work in the program, you will see it yourself, and secondly - someday you will acquire good devices (and they have all the notation in English, although they are Chinese) and immediately and easily get used to them.

The program was developed by C. Zeitnitz and is free, but only for private use. The license for the program costs about 1,500 rubles, and there is also a so-called "private license" - about 400 rubles, but this is rather a donation to the author for further improvement of the program. Naturally, we will use the free version of the program, which differs only in that every time it is launched, a window appears with an offer to buy a license.

Download the program (latest version for December 2012):

(28.1 MiB, 51,272 hits)

First, let's understand the “concepts”:
Oscilloscope- a device designed for research, observation, measurement of amplitude and time intervals.
Oscilloscopes are classified:
according to the purpose and method of displaying information:
- oscilloscopes with a periodic sweep for observing signals on the screen (in the West they are called oscilloscop)
- continuous-sweep oscilloscopes for recording the signal curve on a photographic tape (in the West they are called oscillograph)
by the method of processing the input signal:
- analog
- digital

The program works in an environment not lower than W2000 and includes:
- a two-channel oscilloscope with a bandwidth (depending on the sound card) not less than 20 to 20,000 Hz;
- two-channel signal generator (with the same generated frequency);
- spectrum analyzer
- and it is also possible to record a sound signal for its subsequent study

Each of these programs has additional features, which we will look at in the course of their study.

We'll start with a Signalgenerator:

The signal generator, as I said, is two-channel - Channel 1 and Channel 2.
Let's consider the purpose of its main switches and windows:
1 buttons for turning on generators;
2 output waveform setting window:
sine- sinusoidal
triangle- triangular
square- rectangular
sawtooth- sawtooth
white noise- White noise
3 output signal amplitude regulators (maximum - 1 volt);
4 frequency adjustment knobs (the desired frequency can be set manually in the windows under the knobs). Although the maximum frequency on the regulators is 10 kHz, in the lower windows you can register any allowed frequency (depending on the sound card);
5 windows for setting the frequency manually;
6 switching on the “Sweep - generator” mode. In this mode, the generator output frequency periodically changes from the minimum value set in the “5” boxes to the maximum value set in the “Fend” boxes during the time set in the “Time” boxes. This mode can be enabled either for any one channel or for two channels at once;
7 windows for setting the final frequency and time of the Sweep mode;
8 software connection of the generator channel output to the first or second input channel of the oscilloscope;
9 - setting the phase difference between the signals from the first and second channels of the generator.
10 -at Setting the duty cycle of the signal (effective only for a square wave).

Now let's take a look at the oscilloscope itself:

1 Amplitude - adjusting the sensitivity of the vertical deflection channel
2 Sync- allows (by checking or unchecking) to make separate or simultaneous adjustment of two channels in terms of signal amplitude
3, 4 allows you to spread signals along the height of the screen for their individual observation
5 setting the sweep time (from 1 millisecond to 10 seconds, with 1000 milliseconds in 1 second)
6 start / stop oscilloscope operation. When stopped, the current state of the alarms is saved on the screen, and the Save button appears ( 16 ) allowing you to save the current state on the computer in the form of 3 files (text data of the signal under study, black and white image and color image of the picture from the oscilloscope screen at the time of stopping)
7 Trigger- a software device that delays the start of the sweep until certain conditions are met and serves to obtain a stable image on the oscilloscope screen. There are 4 modes:
on / off... When the trigger is off, the image on the screen will look “running” or even “blurry”.
auto mode... The program itself chooses the mode (normal or single).
normal mode... In this mode, a continuous sweep of the signal under investigation is carried out.
single mode... In this mode, a one-time sweep of the signal is carried out (with a time interval set by the Time knob).
8 active channel selection
9 Edge- signal trigger type:
- rising- on the front of the signal under investigation
falling- by the decay of the investigated signal
10 Auto Set- automatic setting of the sweep time, the sensitivity of the vertical deflection channel Amplitude, as well as the image is driven to the center of the screen.
11 -Channel Mode- determines how the signals will be displayed on the oscilloscope screen:
single- separate output of two signals to the screen
- CH1 + CH2- output of the sum of two signals
CH1 - CH2- output of the difference of two signals
CH1 * CH2- output of the product of two signals
12 and 13selection of the display of channels on the screen (or either of the two, or two at once, the value is displayed next to Amplitude)
14 waveform output of channel 1
15 waveform output of channel 2
16 already passed - recording a signal to a computer in the oscilloscope stop mode
17 time scale (we have a regulator Time stands at 10 milliseconds, so the scale is displayed from 0 to 10 milliseconds)
18 Status- shows the current state of the trigger and also allows you to display the following data on the screen:
- HZ and Volts- displaying the current frequency of the voltage of the signal under investigation
cursor- turning on vertical and horizontal cursors to measure the parameters of the signal under investigation
log to Fille- per second recording of the parameters of the signal under study.

Taking measurements on an oscilloscope

First, let's set up the signal generator:

1. Turn on channel 1 and channel 2 (green triangles light up)
2. Set the output signals - sinusoidal and rectangular
3. Set the amplitude of the output signals equal to 0.5 (the generator generates signals with a maximum amplitude of 1 volt, and 0.5 will mean the amplitude of the signals equal to 0.5 volts)
4. Set the frequency to 50 Hertz
5. Go to the oscilloscope mode

Signal amplitude measurement:

1. The button under the inscription Measure select the mode HZ and Volts, put a check mark next to the labels Frequency and Voltage... At the same time, the current frequencies for each of the two signals (almost 50 hertz) appear from above, the amplitude of the total signal Vp-p and effective signal voltage Veff.
2. The button under the inscription Measure select the mode Cursors and put a tick next to the inscription Voltage... In this case, we have two horizontal lines, and at the bottom of the inscriptions, showing the amplitude of the positive and negative components of the signal ( A), as well as the total signal amplitude swing ( dA).
3. We expose the horizontal lines in the position we need relative to the signal, on the screen we will receive data on their amplitude:

Measurement of time intervals:

We do the same operations as for measuring the signal amplitude, except in the mode Cursors put a tick at the inscription Time... As a result, instead of horizontal, we will get two vertical lines, and the time interval between the two vertical lines and the current frequency of the signal in this time interval will be displayed below:

Determination of signal frequency and amplitude

In our case, there is no need to specially calculate the frequency and amplitude of the signal - everything is displayed on the oscilloscope screen. But if you have to use an analog oscilloscope for the first time in your life and you do not know how to determine the frequency and amplitude of the signal, we will consider this issue for educational purposes.

We leave the generator settings as they were, with the exception that the signal amplitude is set to 1.0, and the oscilloscope settings are set as in the picture:

We set the signal amplitude regulator to 100 millivolts, the sweep time regulator to 50 milliseconds, and we get the picture on the screen as from above.

The principle of determining the signal amplitude:
Regulator Amplitude we stand in position 100 millivolts, which means that the vertical division of the grid on the oscilloscope screen is 100 millivolts. We count the number of divisions from the bottom of the signal to the upper (we get 10 divisions) and multiply by the price of one division - 10 * 100 = 1000 millivolts = 1 volt, which means that the amplitude of the signal from the top to the bottom is 1 volt. In the same way, you can measure the signal amplitude at any part of the oscillogram.

Determination of signal timing:
Regulator Time we stand in position 50 milliseconds... The number of horizontal divisions of the oscilloscope scale is 10 (in this case, we have 10 divisions on the screen), divide 50 by 10 and get 5, which means that the price of one division will be equal to 5 milliseconds. We select the desired section of the signal oscillogram and calculate how many divisions it fits (in our case - 4 divisions). Multiply the price of 1 division by the number of divisions 5*4=20 and determine that the period of the signal in the investigated area is 20 milliseconds.

Determination of the signal frequency.
The frequency of the signal under investigation is determined by the usual formula. We know that one period of our signal is equal to 20 milliseconds, it remains to find out how many periods will be in one second- 1 second / 20 milliseconds = 1000/20 = 50 Hertz.

Spectrum analyzer

Spectrum analyzer- a device for observing and measuring the relative distribution of the energy of electrical (electromagnetic) oscillations in the frequency band.
Low frequency spectrum analyzer(as in our case) is designed to work in the audio frequency range and is used, for example, to determine the frequency response of various devices, when studying the characteristics of noise, tuning various radio equipment. Specifically, we can determine the frequency response of the assembled audio amplifier, adjust various filters, etc.
There is nothing difficult in working with the spectrum analyzer, below I will give the purpose of its main settings, and you yourself, already empirically, will easily figure out how to work with it.

This is what the spectrum analyzer looks like in our program:

What is here - what:

1. View of the vertical scale of the analyzer
2. Selecting the displayed channels from the generator often and the type of display
3. Working part of the analyzer
4. Button for recording the current state of the waveform when stopped
5. Mode of increasing the working area
6. Switching the horizontal scale (frequency scale) from linear to logarithmic form
7. Current signal frequency when the generator is in sweep mode
8. Current frequency at cursor position
9. Signal harmonic distortion indicator
10. Setting the filter for signals by frequency

Viewing Lissajous figures

Lissajous figures- closed trajectories, drawn by a point performing simultaneously two harmonic oscillations in two mutually perpendicular directions. The type of figures depends on the relationship between periods (frequencies), phases and amplitudes of both oscillations.

If you apply to the inputs " X" and " Y»Oscilloscope signals of close frequencies, then on the screen you can see the figures of Lissajous. This method is widely used to compare the frequencies of two signal sources and to match one source to the frequency of the other. When the frequencies are close but not equal to each other, the figure on the screen rotates, and the period of the rotation cycle is the reciprocal of the frequency difference, for example, the rotation period is 2 s - the difference in signal frequencies is 0.5 Hz. With equal frequencies, the figure freezes motionless, in any phase, however, in practice, due to short-term signal instabilities, the figure on the oscilloscope screen usually shakes slightly. It is possible to use for comparison not only the same frequencies, but also those in a multiple ratio, for example, if a reference source can only produce a frequency of 5 MHz, and a tunable source - 2.5 MHz.

I'm not sure that this function of the program will be useful to you, but if you suddenly need it, then I think that you can easily figure out this function on your own.

Sound recording function

I have already said that the program allows you to record any sound signal on a computer for the purpose of its further study. The signal recording function is not difficult and you can easily figure out how to do it:

Computer-oscilloscope software

Top related articles