So right now I am battling with the linearity of nonlinear equations.
In the Hawksford paper I linked in the last post, there are a number of nonlinear equations.
This includes half-wave rectifiers, full wave, SQRT, Clippers (the obvious one), Fuzz exponentials and other bits and pieces.
The difficulty I am currently facing is that, by extension, some of these nonlinear equations are behaving constantly, regardless of the amplitude offset I give the normalised signal I feed them.
This may seem dead obvious, but I think I am about to start venturing into unknown (to me) territory. For example: applying the absolute square root of a signal to itself seems at the moment to be causing a constant 138.5332% total harmonic distortion to the signal, regardless of the amplitude offset I have given it. I think the problem is not in the equations, but my approach to signal modification. At the stage of distortion, the signal has already be normalized and split into mono channels for processing. I am sure the behavior of some of these nonlinearities is very particular in terms of a bandwidth of amplitudes, and even though everything is normalized to one, there should be a bit more variation in THD%. A fundamental problem with what I am doing is comparing the THD caused to a sine wave, with the effect the NLD is having on some music. How can I change things and expect the results to be constant?
More paper reading to be done this afternoon for some literature review. Maybe I will realise the cripplingly obvious thing I am missing. Either way, I am on schedule at the moment.
My aim is the apply a definite and controllable % of THD to a signal, by increasing and decreasing the amplitude of the signal. I need to come up with a way of pre-determining for each nonlinear equation, what ratio of the signal sits above a given threshold (in amplitude), and modify said threshold to give how much a signals total level needs to be modified by to achieve the given % THD.
Looking forward to the listening test, I think I will have to make it loud enough to force everyone into the acoustic reflex (middle ear compression), while still sitting in CONAW levels. Its a point of compression that fundamentally happens at different points for everyone. I might have to start thinking about more ear based factors too, like masking.
Friday, 31 October 2014
Tuesday, 28 October 2014
I know I am missing this weeks macro-post, but here is something to tide you over
I sat down with Adam for 10 mins yesterday, and we looked at the code example I had made for modifying an audio loop.
It turns out that the code was making a mono edit of the stereo signal. This has now been rectified, and I just need to modify the normalisation function to work with the stereo signal. That should not take too long.
Finally, I will look at modifying the program to change the normalisation offset level, the incured % values to THD per non-linear device. Once this is up and running, I will make a version for each nonlinear equation in the Hawksford & Woon-Seng Gan paper 'Perceptually-Motivated Objective Grading of Nonlinear Processing in Virtual-Bass Systems.
I am also on the hunt for more non-linear equations that describe behaviors of nonlinear devices, particularly loudspeakers and amplifiers. One of the problems with the Hawksford paper normalised models is the normalized parts rely on the exponential function a lot, and are therefor not easy to attenuate the curves of.
More to come shortly.
This week I am also going to look more into literature relating to perceptual models for amounts of distortion and loudness. I am also going to start thinking more about the bits of human hearing that come into effect when thinking about loudness.
I will start by thinking loud, with the Acoustic Reflex.
It turns out that the code was making a mono edit of the stereo signal. This has now been rectified, and I just need to modify the normalisation function to work with the stereo signal. That should not take too long.
Finally, I will look at modifying the program to change the normalisation offset level, the incured % values to THD per non-linear device. Once this is up and running, I will make a version for each nonlinear equation in the Hawksford & Woon-Seng Gan paper 'Perceptually-Motivated Objective Grading of Nonlinear Processing in Virtual-Bass Systems.
I am also on the hunt for more non-linear equations that describe behaviors of nonlinear devices, particularly loudspeakers and amplifiers. One of the problems with the Hawksford paper normalised models is the normalized parts rely on the exponential function a lot, and are therefor not easy to attenuate the curves of.
More to come shortly.
This week I am also going to look more into literature relating to perceptual models for amounts of distortion and loudness. I am also going to start thinking more about the bits of human hearing that come into effect when thinking about loudness.
I will start by thinking loud, with the Acoustic Reflex.
Thursday, 23 October 2014
Miniport 2 of the week - Macropost to come tomorrow hopefully
I am currently using the nonlinear devices from the Hawksford paper 'perceptually motivated... (see last post)' to distort audio and look/listen to the effects.
I now need to figure out how to normalize the audio, so I have some way of keeping track on making similar comparisons.
Here is an example of the time/frequency/amplitude plot (spectrogram) of a clean and distorted version on a signal. I can't currently measure the amount of distortion that is in the signal after processing.
Also this is a useful video for those of us who aren't yet very familiar with matlab:
https://www.youtube.com/watch?v=ie7iREcYBPU
I am getting there!
I now need to figure out how to normalize the audio, so I have some way of keeping track on making similar comparisons.
Here is an example of the time/frequency/amplitude plot (spectrogram) of a clean and distorted version on a signal. I can't currently measure the amount of distortion that is in the signal after processing.
Also this is a useful video for those of us who aren't yet very familiar with matlab:
https://www.youtube.com/watch?v=ie7iREcYBPU
I am getting there!
Monday, 20 October 2014
Micropost 1 of the week
Here are links to a folder containing the IEP proposal and Matlab program.
Props to Adam Hill for his supervision!
Props to Adam Hill for his supervision!
Saturday, 18 October 2014
And now... Eternity.
Not a comment on infinite regression, though that seem to describe the pattern of the quality of my humour. I am getting pretty frustrated with measuring the THD of music, as opposed to sine waves.
This week so far has been busy, much like any other week but more so.
I came strait out of a trip to north Wales, into a frenzy of work on my proposal followed by two days of reproduced sound. Yesterday I handed in the proposal.
I will make it available to you all, and discuss some of the points I found while writing it, in this blog.
Although I said what I needed to say in it (or at least I think so), I feel the proposal was possibly too concise. The volume of references was roughly a similar size to the problem definition and aims.
I had actually finished the proposal about a week before submission, but as always not to a standard I thought was good enough. I thought it would pass, but it wasn't really the standard I thought represented what I wanted to do. My only fear is that the current version is too concise as I have said. We shall see.
So I refined my search terms/methods and found a vast array of research, into the perception of audio quality and its relationship with distortion. There are already many models around for measuring and predicting distortion, this study may be able to go to a depth I didn't consider before hand.
A particularly good paper is 'Detection of nonlinear distortion in audio signals' by S Mare, which has provided a great look into a method of detecting distortion without needing the original signal for comparison. The really useful thing is the definition of terms and equations available. As it turns out, the IEEE seem to have plenty of research papers which look particularly deeply into THD in reference to power systems, which may undoubtedly come into use at some point. I am starting to think that THD really isn't the be all and end all of distortion measures though.
My THD calculation software is now fully working for the pure sine waves, the problem was in the array addressing.
I am currently looking for papers which focus on nonlinear polynomial distortions, to try and model some realistic system behaviour. It is all go.
It is also interesting to see how many papers which describe THD and methods for measuring related audio quality, nod towards perceived loudness without going into real detail. Voishvillo's 2006 paper 'Assessment of Nonlinearity in Transducers and Sound Systems – from THD to Perceptual Models' is a particularly good example of this.
I do find it particularly interesting that the recent post-grads who presented at reproduced sound this year, seemed to focus particularly on a mathematical model and not on the aim of using the model.
A particularly good paper is 'Detection of nonlinear distortion in audio signals' by S Mare, which has provided a great look into a method of detecting distortion without needing the original signal for comparison. The really useful thing is the definition of terms and equations available. As it turns out, the IEEE seem to have plenty of research papers which look particularly deeply into THD in reference to power systems, which may undoubtedly come into use at some point. I am starting to think that THD really isn't the be all and end all of distortion measures though.
My THD calculation software is now fully working for the pure sine waves, the problem was in the array addressing.
I am currently looking for papers which focus on nonlinear polynomial distortions, to try and model some realistic system behaviour. It is all go.
It is also interesting to see how many papers which describe THD and methods for measuring related audio quality, nod towards perceived loudness without going into real detail. Voishvillo's 2006 paper 'Assessment of Nonlinearity in Transducers and Sound Systems – from THD to Perceptual Models' is a particularly good example of this.
I do find it particularly interesting that the recent post-grads who presented at reproduced sound this year, seemed to focus particularly on a mathematical model and not on the aim of using the model.
Foot note:
One of the studies presented at reproduced sound was looking at the quality of internet audio, and how people rate it. As we sat in the lecture, various samples were played. Given the videos were not normalised, I felt that the more distorted audio signals presented sounded louder but not in a good pleasing way, in the instances that they were at the same level i.e. increased level w/m^2 and loudness is not the same thing when taking spectral distribution into account.
Maybe my listening test could be an online one. I would get a more diluted data set, but the increase in participant numbers may help statistically.
Maybe my listening test could be an online one. I would get a more diluted data set, but the increase in participant numbers may help statistically.
Monday, 13 October 2014
It is absolutely time for another blog post!
Last week, I failed to deliver a solid post discussing what has been going on: so here it is.
Will report back sooner, rather than later!
Duh Duh, MATLAB!
Last time I sat down with Adam & we had a quick chat about my plan.
We then sat down at a laptop with Matlab, and wrote down a program which;
We then sat down at a laptop with Matlab, and wrote down a program which;
- Generated a sine wave at 1kHz
- Transformed the sine wave using the FFT function, and graphed in the frequency domain
- Imposed an amplitude limit on the signal
- Graphed the resulting signal in the frequency domain, displaying all extra harmonic content
This weeks plan is to finish the code that measures the % THD, and to test the code.
Then I will make a 1s loop of the signal at 2.5,5,7.5,10 and 15% and do a quick listening test.
Following that I will run audio through the same system and the same %s and do another quick dirty listening test to see if I am on the right track.
Following that I will run audio through the same system and the same %s and do another quick dirty listening test to see if I am on the right track.
But I have not been totally slacking.
I have spent a reasonable amount of time in the last week finishing off the proposal paperwork, which I will subsequently hand in later today.
It turns out there is plenty of surrounding research that I have found, but little to nothing on the perception of loudness directly. That could just be my poor Google skills. There is plenty on quality and thresholds (which I suppose are technically loudness), but none on the exact change of perception.
I will be at the Reproduced Sound conference on Tuesday & Wednesday next week, listening to talks such as Leo Beranek's key notes on concert hall design. This may be the last opportunity for me to listen to him lecture. It is also the IOA 40th anniversary, and I may even get the chance to bump into Sam Wise which would be pleasant.
I will be at the Reproduced Sound conference on Tuesday & Wednesday next week, listening to talks such as Leo Beranek's key notes on concert hall design. This may be the last opportunity for me to listen to him lecture. It is also the IOA 40th anniversary, and I may even get the chance to bump into Sam Wise which would be pleasant.
![]() |
Back to work following a frozen weekend in North Wales |
Will report back sooner, rather than later!
Monday, 6 October 2014
Just a quick update before the main one of the week
Over the past few days I have recieved a few emails from John, which mention some really useful points related to elements of the project.
On Thursday, Adam took me through a little bit of Matlab, and helped me translate into code the signal analysis methods I needed. The program is a basic FFT and THD analysis tool.
I am having some trouble getting the correct THD numbers however, so more work needs to be done. I also need to make the model analyse for different distortion methods, different levels and different frequencies eventually.
I will spend my spare time over the next few days getting my project proposal finalized.
I am also pouring over THD calculation papers, to try and figure out why the numbers aren't adding up.
I am also pouring over THD calculation papers, to try and figure out why the numbers aren't adding up.
Subscribe to:
Posts (Atom)