Some signal-analysis-related Python scripts:
I’m sort of intending to combine them all into one eventually.
Signal generator 1.0.2
- Outputs sine, pink noise, and white noise
- Volume and frequency sliders
- Controls are hard to grab at the edges
- Volume control is independent from the phone’s volume control
- Doesn’t go below 100 Hz
- Sine waves are distorted and badly aliased at high frequencies. THD+N measurements:
- 100 Hz 0.149%
- 1 kHz: 0.08%
- 10 kHz: 7.1%
- 20 kHz: 20.15%
- Spectrum for 997 Hz:
- Although the control says “1.00 kHz” at startup, it’s actually playing 765 Hz. Frequencies are correct after you start moving it around, though.
- White noise level is higher than sine wave — sine wave never reaches the peak output of the phone, even at “0 dB”
- There doesn’t seem to be any way to enter levels other than 0 dB manually, since it doesn’t let you type a minus sign.
- White noise sounds like it’s repeating every 1.4 seconds
- Noise is the same in both channels
Frequency generator 200909150
- Outputs sine, square, triangle, sawtooth
- Playing more than one sine wave causes clipping, but you can decrease the phone’s volume control
- Default setting is 440, 444, and 448 Hz, but when played together, the waveform changes abruptly once per second
- Sine wave THD+N:
- 40 Hz: 1.00%
- 440 Hz: 0.056%
- 10 kHz: 0.051%
- 20 kHz: 0.222%
- I don’t know how the square, triangle and sawtooth are generated, but it ain’t right.
- This is what the “square wave” looks like at 10 kHz:
- And this is the spectrum:
- Nooot even close
(Using ExtUSB headphone cable, Adobe Audition, Audio Precision.)