[LAD] SysEx data-conversion woes: nibbles and complements (Microwave 2)

Jeanette C. julien at mail.upb.de
Fri May 14 00:50:56 CEST 2021

May 13 2021, Fons Adriaensen has written:
>> Could it be as simple, as bluntly put: forget about the phase, only use
>> the amplitude/overall power of any harmonic from an FFT and reconstrcut
>> the signal from all sines at 0 phase?
> Absolutely right ! Except that for the FFT, sin() means the phase is
> +/- 90 degrees, remember than sin() components turn up in the imaginary
> part, with the real part zero.
> Now imagine the 128 samples generated by
> T [i] = sin (h * i * 2 * pi / 128), for i = 0...127, and fixed h
> (h = harmonic number, 0...64).
> For each h, and also for any waveform which is a sum of these sine
> waves, we will have
>  T [64+i] = -T [64-i] or equivalently
>  T [128-i] = -T [i]
> That means we have anti-symmetry w.r.t. samples 0 and 64.
> Now consider again the sysex format: to make up a cycle of 128 samples
> the first 64 samples are repeated in reverse order and negated.
> Now ask yourself: where is the symmetry point in that case ?
Considering added sines, I think there is no symmetry, only
anti-symmetry. Symmetry requires an extreme of the sine (samples 32 and
96 for the first harmonic). On even harmonics these points mark an
inflexion point for the sines. An added wave consisting only of odd
harmonics would be symmetric in these points. Otherwise to reach
symmetry one would have to build the wave of cosines, where the extremes
of each harmonic are alligned. Going further: alligning the extremes
would mean the maximum possible amplitudes of any sinoidal (sinesoid?) waves with the same amplitude. Thus reducing the maximum allowed amplitude for all sine waves and so degrading the quality of the resultant wave, given a fixed bit depth. Hm, good choice to do it like that after all. :) That was really instructive!



  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

More information about the Linux-audio-dev mailing list