Warning

This signal generator generates audio tones of very high energy. Be careful with the volume. High volume levels can damage your hearing, as well as that of humans and animals in the surrounding area. Do not listen to the signals at a high volume with headphones. The signal generator is only intended to connect electrical signals from the headphone jack into a device under test. There is no liability taken on damaged hardware by improper use of the generator.


User Manual V1.1.8

To generate a voltage signal, the traditional analogue signal source adopts electronic components as oscillator in different ways. So both frequency accuracy and stability are not high enough. Besides, it is of the disadvantages of complicated technique, large devices, low resolution and inconvenient frequency setting. A better method of generating signals without any oscillator components is digital synthesizing, by which a series of data stream is calculated and then the pre-established analogue signal is generated from digital-analogue converter. Hobbyists can make use of computer programs which generate signals and use the sound card to output the signal as audio. The main limitations of PC based generators are the aural bandwidth of 22 kHz and the AC-only output. The hardware capabilities of the device and the built in sound optimization functionalities are other factors that can distort the output signal. This version of Hse Signal Generator and Analyzer runs on all Windows10 devices like PC, Tablet or Smartphone. For professional measurements it is recommended to plug the output jack of the device into an external amplifier to protect the output stage and to provide a defined amplitude and offset voltage.


1. Single Tones

On the single-tone page the basic generator is shown as a blue 6-digit number. The green plus symbols increment and the red minus symbols decrement the assigned digits by one. The signal with the given frequency and shape is calculated and the sound is played immediately. Use the pause/play-button to stop and start the sound. Select the shape and the audio channel with the radio buttons.
Use the keep-button to hold the current tone with the current volume while adding a second one. (try: sawtooth1, 400Hz, keep tone, 401Hz). Up to ten tones are played at the same time on independent channels and with independent volumes.
There is no control over the relative phase between each sound. It depends on the time when the sound is started and this is random. To reset all tones use the clear-button (X) on the application bar.
The frequency range is 0 Hz to the half of the selected sampling rate in the settings. The smallest step is 0.1 Hz below 1 kHz and 1 Hz over 1 kHz.


1.1 Technical Details

The signal shapes are calculated into an 8-, 16- or 24-bit wave format. To fulfill the Nyquist-Shannon sampling theorem, the highest frequency in the signal is the half of the selected sampling rate. For that reason the non-sine shapes with their wide spectrum are band limited otherwise alias frequencies occur. One consequence of the band limitation is that a square wave or a triangle wave at 12 kHz with a sampling rate of 48 kHz is a pure sine wave because the first harmonic frequency is out of range. For humans the sound of a square wave at 10 kHz is equal to a sine wave sound!


1.2 Signal Shapes (with 48kHz sampling rate)

Sine:



Square, 100Hz, duty-cycle 50%:



Square, 100Hz, duty-cycle 10%:



Square, 5kHz:



Triangle, 100Hz, duty-cycle 50%:



Triangle, 100Hz, duty-cycle 75%:



Dirac peaks:



Sawtooth1, 100Hz:



Sawtooth2, 100Hz:



Sawtooth2, 5kHz:


1.3 Signal Calculation Time

A conventional digital signal generator stores each signal shape only once in a ROM. The individual frequencies are generated by different sampling rates. In an audio player the sampling rate is fixed and the output signal has to be calculated for each output frequency. The generated signal is then played in an endless loop. To get an accurate frequency and a smooth transition from the signal end and signal start, usually more than one full period are calculated. The calculation time depends on the amount of samples and on the spectrum of the output signal.
Shapes other than sine need more time to calculate because of their wide harmonic spectrum especially at low frequencies. For that reason the non-sine shapes below 50 Hz are calculated in a fast geometric way without any low pass filter. This region is far enough from band limit and aliasing.
In order to get a smaller amount of samples the exact frequency value differs from the value selected in two cases:
- none-sine shapes below 1.5 kHz
- decimal sine shapes below 1 kHz.
However, the error is less than 0.025 Hz. The exact frequency is shown on the small display.


2. Volume

This volume control allows consistent amplitude values given in dB. I.e.: to half the signal amplitude reduce the volume by 6 dB. Use the main volume control of your device in a way to get the highest output level without distortion and use this volume slider to set the signal amplitude to consistent values. Note that for the single-tones only the current sound will be affected, while all keept tones retain their volume.


3. Duty-Cycle

You can reach the duty-cycle page when you press the duty-cycle button on the single tone page. This button is enabled, when the current signal shape is square or triangle. For the triangle a 1% duty-cycle is nearly sawtooth2, a 99% duty-cycle is nearly sawtooth1, a 50% duty-cycle is a symmetrical triangle and values between are ramp signals.



4. Sweep

On the sweep page select the start and stop frequency and duration. The calculation of the sweep will take a few seconds. The maximum duration is 99 seconds and this will take more than one minute to calculate. The sweep tone shape is sine. When the start frequency is higher than the stop frequency, the frequency sweeping is reversed. Once the sweep is calculated it can be played many times without recalculation.
Normally the sweep time is linear. Choose the log option for logarithmic sweeps that means that the frequency sweep time is constant from one octave to the next.


5. Noise

On the noise page select one of four noise types.
White noise contains equal power within a fixed bandwidth at any center frequency over the whole spectrum.
Pink noise has a frequency spectrum such that the power spectral density is inversely proportional to the frequency (~1/f). In pink noise, each octave carries an equal amount of noise power.
Brown noise has a spectral density that is inversely proportional to the frequency in square (~1/f2), it has most of the energy at the lower frequencies. In this application the crest factor for white and brown noise is 6 dB and for pink noise 12 dB.
1/3 octave noise is narrow band limited white noise. The bandwidth is one third of an octave around the center frequency. The transition steepness is infinity.
I.e.: for a center frequency of fc=1 kHz the lower corner frequency is fu=891 Hz, and the upper corner frequency is fo=1122 Hz. fc2=fu*fo. The bandwidth is always fo/fu=1.26.
In spatial stereo the left and the right channel contain independent noise.

5.1 Noise Mixing

It is possible to mix noise to every other sound.
First select a single tone or a sweep with a given volume. After that select a noise and set the volume for the noise.


5. Audio Spectrum Analyzer

The real time audio spectrum analyzer measures the magnitude of input signals versus frequency within the frequency range between 10Hz and 10kHz in normal mode and within the magnitude range between -100dB and 0dB. The input signals are acoustic pressure waves recorded by the built-in microphone. Note that most microphones in smartphones have a bandwith of only 8kHz. The acoustic signal is sampled, interpolated and then mathematically transformed with Fast Fourier Analysis into the frequency domain. Each point in the graph represents a single fundamental sine wave with a specific frequency and a specific amplitude. In normal mode the frequency resolution of this analyzer is 10Hz and the number of frequency points is 1024. I.e. a signal of 1010Hz is represented by a sharp spectral line on 1010Hz and a signal of 1015Hz is represented by two lines on 1010Hz and 1020Hz resulting in a lesser sharp peak. You can change the measuring mode on the settings page. In fine mode the frequency resolution is 2Hz with a bandwith from 2Hz to 2Khz. Fine mode allows a precise sub-bass detection. Note that the recording time for one measurement is half a second. Be sure that there is no other signal recorded outside the calculated bandwidth, otherwise alias frequencies will occur into the graph.
The peak detection shows three fundamental signals with the highest magnitude with their frequency, amplitude and their equal temperament note. This feature is helpful to tune a musical instrument or to determine the acoustic signature of a tone or to estimate the distortion of a loudspeaker.
For each measurement intervall the current total harmonic distortion (THD) is displayed. THD is calculated as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency. The fundamental frequency here is the frequency of the signal with the highest magnitude. So THD does not include any signal below the fundamental frequency.
Start the realtime detection by pressing the record button. Pressing the stop button terminates the recording. The recording will also stop on any frame covering like screen locks or incoming phone calls.


6. Settings

You can reach the settings page from the application bar (...) on the main page.

6.1 Warning on the start screen

If this item is checked, the warning does not appear on the start screen.

6.2 Sampling Rate

Choose one of twelve sampling rates. Note that high values increase the response time. The maximum output frequency depends on the selected sampling rate (and by the capabilities of the device).

6000 Hz: max. output f= 2999 Hz
8000 Hz: max. output f= 3999 Hz
11025 Hz: max. output f= 5512 Hz
16000 Hz: max. output f= 7999 Hz
22050 Hz: max. output f= 11024 Hz
32000 Hz: max. output f= 15999 Hz
44100 Hz: max. output f= 22049 Hz
48000 Hz: max. output f= 23999 Hz
64000 Hz: max. output f= 31999 Hz
88200 Hz: max. output f= 44099 Hz
96000 Hz: max. output f= 47999 Hz
192000 Hz: max. output f= 95999 Hz

6.3 Bit Depth

Select one of three bit depths. Note that high values decrease the response time. The theoretical signal to noise ratio (SNR) is:
8 Bit: 48.16 dB SNR
16 Bit: 96.33 dB SNR
24 Bit: 144.49 dB SNR

6.4 Analyzer Settings

Select one of three windows modes. Note that high values decrease the response time.
Quick:
Bandwith: 100 Hz - 20 kHz
Refresh rate: 100 fps
Resolution: 100 Hz
Normal:
Bandwith: 10 Hz - 10 kHz
Refresh rate: 10 fps
Resolution: 10 Hz
Fine:
Bandwith: 2 Hz - 2 kHz
Refresh rate: 2 fps
Resolution: 2 Hz

Select one of two scales:
- 8 Bit with a dynamic range of 48dB
- 16 Bit with a dynamic range of 96dB


7. Version History

v1.1.5.0
- first release for Windows10 UWP.

v1.1.6.0
- bit depth and more sampling rates.
- independent volume controls.

v1.1.7.0
- bugfixes for smartphone.

v1.1.8.0
- spectrum analyzer.

8. Preview

- screenlock switch off.
- multiple tone synthesizer.
- selectable input devices.