Patate91 Posted July 20, 2020 Share Posted July 20, 2020 6 hours ago, Audiophile Neuroscience said: I can only suggest that this is part and parcel of what I would consider validation. If the software uses an invalid model (not saying it does) then the software is not valid. These are all things I would expect independent validation tests would consider. So you and Sandyk are asking for a DBT of a VIRTUAL mathematicaly induced simulation?? Comon...... kumakuma 1 Link to comment
SoundAndMotion Posted July 20, 2020 Share Posted July 20, 2020 19 minutes ago, opus101 said: Let's assume for a moment that this is true. Then it would follow that all preamp and power amplifier distortions could be compensated for by digitally pre-distorting the DAC's output. At least down to the noise floor of the DAC in question. Seems too easy. Too easy is fine with me... I'm interested in the "is it true" part? Either it's not true (why?) or perhaps you think it's true but unimportant because there's so much more than harmonic distortion that's important to an amp's flaws... Link to comment
opus101 Posted July 20, 2020 Share Posted July 20, 2020 To the extent that removing all the static distortion components of downstream gear makes a subjective improvement, why not license your pre-distort code to PC audio software vendors (Roon perhaps or HQPlayer)? Probably a lot of work to characterize the most popular equipment though. Excuse the OT. Link to comment
opus101 Posted July 20, 2020 Share Posted July 20, 2020 23 minutes ago, SoundAndMotion said: I'm interested in the "is it true" part? Either it's not true (why?) or perhaps you think it's true but unimportant because there's so much more than harmonic distortion that's important to an amp's flaws... I think it isn't true but was interested in the 'reductio ad absurdam' argument. One reason I think its not true is there exists a modelling technique called 'Volterra Series' which ISTM would have no reason to exist were it true. Link to comment
pkane2001 Posted July 20, 2020 Author Share Posted July 20, 2020 9 minutes ago, opus101 said: To the extent that removing all the static distortion components of downstream gear makes a subjective improvement, why not license your pre-distort code to PC audio software vendors (Roon perhaps or HQPlayer)? Probably a lot of work to characterize the most popular equipment though. Excuse the OT. Also OT: that may just be one of the apps I have planned I've put together a simple measurement app that will extract the transfer function from any device (or even a complete system). The measurement part is done, the correction part still needs work. opus101 1 -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
SoundAndMotion Posted July 20, 2020 Share Posted July 20, 2020 2 hours ago, SoundAndMotion said: Hi Paul, You and I both create software to answer questions, but I'm impressed that you go the extra mile to try to make it useful to others besides yourself. DISTORT is an example. Nice! A handful of random stuff: Why ALL CAPS? Is DISTORT an acronym or just intended to annoy old people. Former?:What's it mean? Latter?:It works! When I see graphs, I have an uncontrollable urge to jump in... zoom, pan, change axis limits, zoom out, find the value at a given point, either by click or zoom-zoom-zoom. I want to set up camp, build a bonfire and roast some data... If you think I'm fit to be tied, I'm fine with that. Ignore me. Otherwise, graph tools would be nice. Does the scale for the sliders on the right mean anything? Does 1000 mean 100%? @opus101 and others mention the nature of your nonlinearity. opus asked: I'm going to assume that for many situations, I can assume that the bandwidth of my signal is well within the flat amplitude, zero-phase region of the electronics, and that other non-static things like temperature have stabilized. Then, yes, I would want a purely static non-linearity, and I think all analog electronics would exhibit this behavior (to some extent: selectable in DISTORT). But then I want to ask if your non-linear transfer function is unique for a given set of harmonics: the answer is no. You need the phase of each harmonic. I doubt phase differences of a few degrees matter, but what about 180°? And I'm going to go out on a limb here, but I believe if you have the magnitude and phase of each harmonic, then the transfer function is unique, and therefore the model has no degrees of freedom for error (with the stated assumptions). Is this true? It "feels" true, but I have to work through it a bit more... So, would entering mag and phase of harmonics be interesting in DISTORT? Cheers, SAM Hi @pkane2001 I like the discussion of the nonlinear model, but I had other questions/comments too. ...when you get a chance. Link to comment
pkane2001 Posted July 20, 2020 Author Share Posted July 20, 2020 3 hours ago, SoundAndMotion said: Hi Paul, You and I both create software to answer questions, but I'm impressed that you go the extra mile to try to make it useful to others besides yourself. DISTORT is an example. Nice! A handful of random stuff: Why ALL CAPS? Is DISTORT an acronym or just intended to annoy old people. Former?:What's it mean? Latter?:It works! When I see graphs, I have an uncontrollable urge to jump in... zoom, pan, change axis limits, zoom out, find the value at a given point, either by click or zoom-zoom-zoom. I want to set up camp, build a bonfire and roast some data... If you think I'm fit to be tied, I'm fine with that. Ignore me. Otherwise, graph tools would be nice. Does the scale for the sliders on the right mean anything? Does 1000 mean 100%? @opus101 and others mention the nature of your nonlinearity. opus asked: I'm going to assume that for many situations, I can assume that the bandwidth of my signal is well within the flat amplitude, zero-phase region of the electronics, and that other non-static things like temperature have stabilized. Then, yes, I would want a purely static non-linearity, and I think all analog electronics would exhibit this behavior (to some extent: selectable in DISTORT). But then I want to ask if your non-linear transfer function is unique for a given set of harmonics: the answer is no. You need the phase of each harmonic. I doubt phase differences of a few degrees matter, but what about 180°? And I'm going to go out on a limb here, but I believe if you have the magnitude and phase of each harmonic, then the transfer function is unique, and therefore the model has no degrees of freedom for error (with the stated assumptions). Is this true? It "feels" true, but I have to work through it a bit more... So, would entering mag and phase of harmonics be interesting in DISTORT? Cheers, SAM Hi SAM, sorry, missed your questions earlier. Why all caps? Mostly to make it easier to notice it and to distinguish from the more common use of the word "distort". It's not an acronym, but I'm sure I can come up with something, if pressed Graphs are actually very much zoomable and scrollable. They are based on an open source OxyPlot package. Some of the more common commands: Move: Click-and-drag the mouse in the plot moves the X and/or Y scale up and down. Just click-down anywhere in the plot and move the mouse. You can do this with just one axis, also, if you click and drag outside the main plot area, somewhere on the axis labels. Zoom: You can zoom-in on any point in the plot by first clicking on it, then using mouse scroll-wheel to zoom in or out. This will zoom both axes simultaneously. If you click on individual axis labels outside the plot area, you'll be able to zoom just on that axis (X or Y). You can also hold down the scroll wheel and click while dragging a rectangle around the desired area. This will zoom in on that area only. Labeling: If you hold down the shift key while dragging the mouse, you'll paint an arrow with a data value label attached to it. Right click the mouse to remove the last label. You can add as many as you want: I'll follow-up on your other questions in a separate post. SoundAndMotion 1 -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
pkane2001 Posted July 20, 2020 Author Share Posted July 20, 2020 53 minutes ago, SoundAndMotion said: Hi @pkane2001 I like the discussion of the nonlinear model, but I had other questions/comments too. ...when you get a chance. SAM, of course! Go ahead and post your questions here or contact me off-line. Either way works. I'll respond whenever I can. SoundAndMotion 1 -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
SoundAndMotion Posted July 20, 2020 Share Posted July 20, 2020 1 hour ago, pkane2001 said: SAM, of course! Go ahead and post your questions here or contact me off-line. Either way works. I'll respond whenever I can. Thanks Paul. I do have more questions, but you answered most of what I had in mind 2 posts up. I'm going to have to steal a mouse from another computer (one of my Pi's looks willing), since I don't know how to "scroll wheel" with the trackpad of my Mac. I shoot more questions to you after I've played some more. p.s. I'll soon qualify for a senior discount... can I call it Distort or distort? Link to comment
pkane2001 Posted July 20, 2020 Author Share Posted July 20, 2020 3 hours ago, SoundAndMotion said: Does the scale for the sliders on the right mean anything? Does 1000 mean 100%? @opus101 and others mention the nature of your nonlinearity. opus asked: I'm going to assume that for many situations, I can assume that the bandwidth of my signal is well within the flat amplitude, zero-phase region of the electronics, and that other non-static things like temperature have stabilized. Then, yes, I would want a purely static non-linearity, and I think all analog electronics would exhibit this behavior (to some extent: selectable in DISTORT). But then I want to ask if your non-linear transfer function is unique for a given set of harmonics: the answer is no. You need the phase of each harmonic. I doubt phase differences of a few degrees matter, but what about 180°? And I'm going to go out on a limb here, but I believe if you have the magnitude and phase of each harmonic, then the transfer function is unique, and therefore the model has no degrees of freedom for error (with the stated assumptions). Is this true? It "feels" true, but I have to work through it a bit more... So, would entering mag and phase of harmonics be interesting in DISTORT? Cheers, SAM The sliders on the right are designed to produce a simple, configurable non-linearity that produces some of the more common harmonic distortion patterns. The two sliders control the two independent variables in a transfer function of the general form: α is a value between 0..1 and is controlled by the first slider (the top setting of the slider, 1000 = 1.0) β is a value between 0..1 and is controlled by the second slider This is designed to help quickly adjust the shape and level of the produced harmonics without having to type individual amplitude values in in the Custom Harmonics section. Amplitude of the harmonic is already configurable today. Phase setting per harmonic is more complicated, because it involves time and not just amplitude in generating the nonlinearity. I've simulated the common case of this by providing the setting for negative/positive feedback, and while this will generate different phases for harmonics, it does not allow phase values to be specified directly. I've been asked to provide phase setting before, so I'll have think about how to make this work. SoundAndMotion 1 -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
SoundAndMotion Posted July 20, 2020 Share Posted July 20, 2020 2 minutes ago, pkane2001 said: The sliders on the right are designed to produce a simple, configurable non-linearity that produces some of the more common harmonic distortion patterns. The two sliders control the two independent variables in a transfer function of the general form: α is a value between 0..1 and is controlled by the first slider (the top setting of the slider, 1000 = 1.0) β is a value between 0..1 and is controlled by the second slider This is designed to help quickly adjust the shape and level of the produced harmonics without having to type individual amplitude values in in the Custom Harmonics section. Amplitude of the harmonic is already configurable today. Phase setting per harmonic is more complicated, because it involves time and not just amplitude in generating the nonlinearity. I've simulated the common case of this by providing the setting for negative/positive feedback, and while this will generate different phases for harmonics, it does not allow phase values to be specified directly. I've been asked to provide phase setting before, so I'll have think about how to make this work. Excellent. Thanks! I intentionally didn't ask how you do the harmonic -> TF conversion. I searched myself and found a nice write-up from Ken Gentile at Analog Devices. (Want the link?) It is simple enough for those with reduced brain cells (me!) to get, and adding phase to that would be straightforward. A burning question: DISTORT allows non-monotonic TFs. Is that real world? ...or just mathematically possible? Link to comment
pkane2001 Posted July 20, 2020 Author Share Posted July 20, 2020 12 minutes ago, SoundAndMotion said: Excellent. Thanks! I intentionally didn't ask how you do the harmonic -> TF conversion. I searched myself and found a nice write-up from Ken Gentile at Analog Devices. (Want the link?) It is simple enough for those with reduced brain cells (me!) to get, and adding phase to that would be straightforward. A burning question: DISTORT allows non-monotonic TFs. Is that real world? ...or just mathematically possible? Sure, share the link! DISTORT allows much more than is possible in a usual audio device configuration. Non-monotonic functions are possible, there's no check to ensure that the transfer function is realistic when specified through a mathematical expression. Harmonic distortion generation should always produce monotonic functions. -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
SoundAndMotion Posted July 20, 2020 Share Posted July 20, 2020 13 minutes ago, pkane2001 said: Sure, share the link! DISTORT allows much more than is possible in a usual audio device configuration. Non-monotonic functions are possible, there's no check to ensure that the transfer function is realistic when specified through a mathematical expression. Harmonic distortion generation should always produce monotonic functions. I just treated the DAC and bits stuff as “example device” stuff. https://www.analog.com/en/analog-dialogue/articles/dac-transfer-function-from-harmonic-spectral-content.html pkane2001 1 Link to comment
fas42 Posted July 20, 2020 Share Posted July 20, 2020 4 hours ago, SoundAndMotion said: Excellent. Thanks! I intentionally didn't ask how you do the harmonic -> TF conversion. I searched myself and found a nice write-up from Ken Gentile at Analog Devices. (Want the link?) It is simple enough for those with reduced brain cells (me!) to get, and adding phase to that would be straightforward. A burning question: DISTORT allows non-monotonic TFs. Is that real world? ...or just mathematically possible? It is the real world - if one wanted to explore what some anomaly generating spikey noise did to the signal, then allowing the waveform "to change direction" arbitrarily would be necessary, it seems to me .... Link to comment
pkane2001 Posted July 21, 2020 Author Share Posted July 21, 2020 16 hours ago, SoundAndMotion said: I just treated the DAC and bits stuff as “example device” stuff. https://www.analog.com/en/analog-dialogue/articles/dac-transfer-function-from-harmonic-spectral-content.html That's a well-written article, SAM. Actually would be a good read for anyone not familiar with the concept of a transfer function and non-linearity. What Ken is describing is a very straightforward (if not obvious) way to generate the non-linearity from measured harmonic content. This is similar to what I'm already doing in DISTORT, but actually easier to do it his way. I'll experiment with his method and see if this yields the same results (it should). Thanks for linking to it! -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
pkane2001 Posted July 21, 2020 Author Share Posted July 21, 2020 21 hours ago, opus101 said: To the extent that removing all the static distortion components of downstream gear makes a subjective improvement, why not license your pre-distort code to PC audio software vendors (Roon perhaps or HQPlayer)? Probably a lot of work to characterize the most popular equipment though. Excuse the OT. Continuing with the OT: here's a paper on doing what you suggested (and what I'm attempting to do in a simplified form) using a more comprehensive Volterra series model of an amplifier, inverted to compensate for the device non-linearities with memory: Garcia-Hernandez M. et al., Digital predistorter based on Volterra series for nonlinear power amplifier applied to OFDM systems using adaptive algorithms, Procedia Engineering 35 ( 2012 ) https://core.ac.uk/download/pdf/82504165.pdf opus101 1 -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now