Open KinMaynard opened 3 years ago
Try midside again and try putting negative values from left into right and vice versa.
So it's actually not that simple theoretically. I think the steps are like this:
When removing positive floats from the right array I need to leave something in their place that I can replace later with the-
i think this is simpler than I'm making it. What am I trying to do? I want to take the absolute value of the left array. I want to also turn all positive floats in the right array negative and all negative floats in the right array positive.
So I want to take the absolute value of the left array. and switch the sign of the values in the right array.
Okay I tried that and it doesn't look right. Need to try something else.
Okay I need some new pictures to see what's happening with the data and to help come up with the correct transform for the polar plot. I want to also compare my lissajous output with signalizer. I also want to implement lissajous figures instead of dot per sample on the lissajous plot.
separate issue now:
Just realized before I take these photos I need to auto limit the lissajous ax to the data max.
silence:
white noise:
chirp:
sin:
Out of phase sin:
song:
2 things are clear from this:
So one possible theory for the polar transform is:
Absolute value of values that share a sign with their row counterpart switch signs of values with opposite signs to their row counterpart
(possibly same result as midside encoding?) - Not the same result.
So for the former condition I want to use the where argument in np.absolute. I want to make a mask of all values that share a sign with their row-wise counterpart as true. I can use this same mask for the second condition by running np.negative's where argument on the False elements of the mask.
Tried this new transform and it doesn't look right.
Might shelve the polar vectorscope for now.
I believe I was trivializing phase in cases with complex waves. The sign of the amplitudes in an array of audio data only corresponds to phase in the case of a sin wave. Any complex wave can be transformed into a collection of signs and phase with an FFT of which the signs correspond to the phase. But for a complex waveform like most of my test data this is not the case. This means I want to perform a fast fourier transform on the data before trying to plot amplitudes and phase. I can either:
Try matplotlib's phase spectrum (as polar) and angle spectrum plots (as polar) or perform an FFT with numpy then plot as a polar plot with plot function or scatter
So it seems like matplotlib's phase and angle spectrum plots are plotting something I don't understand. I thought they were taking an FFT of the input and plotting the phase and wrapped phase. The plots look different than I would expect and so I feel like I can't use them for this.
I'm going to push fixing the polar vectorscope to a later release.
Logic
Originally posted by @KinMaynard in https://github.com/KinMaynard/DS5010Project/issues/37#issuecomment-937366704