Dynamic Range Sound Compressor Unit Can the "Loudness War" Be Ended by Giving the End-User Control Over the Dynamic Range Compression?

Dynamic Range Sound Compressor Unit Can the "Loudness War" Be Ended by Giving the End-User Control Over the Dynamic Range Compression?

Dynamic Range Sound Compressor Unit Can the "loudness war" be ended by giving the end-user control over the dynamic range compression? Bachelor’s thesis in Computer Engineering Jesper Nilsson & Thorbjørn Bonvik Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY /UNIVERSITY OF GOTHENBURG Gothenburg, Sweden 2017 Bachelor’s thesis 2017:17-14 Dynamic Range Sound Compressor Unit Can the "loudness war" be ended by giving the end-user control over the dynamic range compression? Jesper Nilsson & Thorbjørn Bonvik Department of Computer Science and Engineering Computer engineering undergraduate Chalmers University of Technology University of Gothenburg Gothenburg, Sweden 2017 Dynamic Range Sound Compressor Unit Can the "loudness war" be ended by giving the end-user control over the dynamic range compression? Jesper Nilsson Thorbjørn Bonvik © Jesper Nilsson & Thorbjørn Bonvik, 2017. Supervisor: Sven Knutsson, Department of Computer Science and Engineering Supervisor: Alexander Hentschel, Tritech Gothenburg Examiner: Peter Lundin, Department of Computer Science and Engineering Batchelor’s Thesis 2017:17-14 Department of Computer Science and Engineering Division of H Chalmers University of Technology / University of Gothenburg SE-412 96 Gothen- burg Telephone +46 31 772 1000 The Author grants to Chalmers University of Technology and University of Gothen- burg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agree- ment. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and Uni- versity of Gothenburg store the Work electronically and make it accessible on the Internet. Cover: Waveforms of a song, as input and output of the dynamic range compressor prototype. Typeset in LATEX Gothenburg, Sweden 2017 iv Dynamic Range Sound Compressor Unit Can the "loudness war" be ended by giving the end-user control over the dynamic range compression? Jesper Nilsson & Thorbjørn Bonvik Department of Computer Science and Engineering Chalmers University of Technology Sammanfattning Musik produceras idag för att låta så högt som möjligt för att överrösta omgivningarna och låta mycket från små högtalare. Dock är inte denna effekt alltid önskad, och detta examensarbete undersöker möjligheten att motvärka denna tränd, som kallas för "the loudness war". Ideen är att ge slutanvänderen kontroll över mängden kom- pression i musiken. Detta vill ge producenterna möjlighet att fokusera på att göra sin musik så bra som möjligt for hi-fidelity system. Rapporten vill ta för sig arbetet vid att skapa en prototyp, och diskutera hurvida den kan påverka "the loudness war". Prototypen vill bli gjord på en liten linuxdator med fysiska in- och ut-portar genom ett externt ljudkort. Programmen JackD och ALSA används för ljudhanteringen, och koden är gjord i språket C. Matematikkonceptet använt blir diskuterat, men själva koden berörs inte i denna texten. Den är istället open source och tillgänglig online. Abstract As music tends to get produced for low end speakers and to sound the loudest, this paper might suggest a solution to end the so called loudness war. If the destructive dynamic range compression can be applied at the end users level instead of in the sound file itself, the producers can master with high-fidelity in mind again, so this text will describe the development of a dynamic range compressor designed for this specific purpose and then break down if and/or how the results holds promise. The prototype is based on a small Linux computer with physical input and out- put through an external soundcard. The utilities JackD 2 and ALSA is used for the sound handling, and the code is written in C. Math concepts used to develop the code will be described in the Theory part, but the code itself will not be gone through in this paper. However, the code should be accessible online and it is open source. Keywords: Music, Audio, The Loudness War, Dynamic range compression, linux audio v Acknowledgements This thesis presents the project "Digital range signal compressor" for the degree Bachelor of Computer Engineering, at Chalmers Univiersity of Science. The work was carried out in Gothenburg at Tritech during spring of 2017. We would like to thank our supervisor, Sven Knutsson, for the guidance and help during the project. Also we would like to thank Erik Agrell for a lot of good feedback. We would also like to thank our supervisor in Tritech, Alexander Hentschel, for the continued support and feedback. Lastly a thanks to Tritech for lending us equipment and letting us use the office to work during the project time. Jesper Nilsson, Gothenburg, June 2017 Thorbjørn Bonvik, Gothenburg, June 2017 vii Contents 1 Introduction1 1.1 Background................................1 1.2 Purpose..................................2 1.3 Goal....................................3 1.4 Method..................................3 1.5 Limitations................................3 2 Theory5 2.1 The Loudness War............................5 2.2 Discrete Sound..............................6 2.2.1 Calculations............................6 2.3 Digital Sound Processing.........................7 2.3.1 Decibel...............................7 2.3.2 Compression............................7 2.3.3 Expanding.............................8 3 Methods 11 3.1 Preliminary investigations........................ 11 3.2 Equipment................................. 11 3.3 Sound in Linux.............................. 13 3.4 Latency.................................. 13 3.5 Matlab................................... 13 3.6 Approaches/Implemetation of Theory.................. 13 3.6.1 Root Mean Square........................ 14 3.6.2 Gain................................ 14 3.6.3 Smoothing Gain.......................... 14 3.6.4 Make-up gain........................... 15 3.7 Offsets................................... 16 3.8 Variable threshold v.s. variable ratio.................. 16 3.9 GPIO Pins/DipSwitch.......................... 18 4 Results 19 4.1 Attack and release / shortcomings / discoveries............ 20 5 Discussion 23 5.1 Controls.................................. 23 5.2 The dynamic Ratio............................ 24 ix Contents 5.3 Future developments........................... 25 5.4 Offset optimizing............................. 26 6 Conclusion 27 Bibliography 29 Bibliography 29 x Contents Abbreviations DRC, Dynamic Range Compressor DTC, Dynamic Threshold Compressor CUR, Compressor with Dynamic Ratio DAC, Digital Audio Converter DASC, Digital Audio Sound Compressor DAFX, Digital Audio Effects dBFS, Full Scale Decibel PTP, Peak To Peak RMS, Root Mean Square DSP, Digital Sound Processing RCA, A/V Cables ALSA, Advanced Linux Sound Architecture PDR, Possible Dynamic Range Variables T = Threshold (dB) R = Ratio (X:1) W = Knee Width (dB) M = Make up Gain (dB) TA = Attack Time (s) TR = Release Time (s) Fs = Sampling Frequency (44100 Hz) XdB = X in decibel range gc = Computed Gain gs = Smoothed Gain αA = Attack Time Coefficient αR = Release Time Coefficient xi 1 Introduction 1.1 Background Music has always been everywhere humans go, but the digital revolution has made a big shift in how people listen to music and how the music itself sounds. Smart- phones and computers gives the opportunity to listen to any song, anywhere. This is a great convenience, but a unfortunate phenomenon has come with the digital age of music. In the 80’s the CD was introduced, and it took over as the superior media over the old analogue vinyl. (Matthews 2014) On a vinyl one would print analogue sig- nals into plastic, and then read it with a needle. On the digital CD however, it holds recorded sample values which is read by laser and the waveform can thereafter be recreated. This made way for a big shift in music production, as the digital media could recreate sounds physically impossible, or at least unpractical, to read from vinyl. Most important in this context is that the CD gives a greater possible dynamic range (Sreedhar 2007). 1 1. Introduction Figure 1.1: Possible dynamic range in vinyl versus in the first CD’s. For compar- ison, 120 dB is the human threshold for pain. Dynamic range is the difference between silence and the loudest. A LP-vinyl has about 60 to 70 dB PDR and a 16 bit CD has around 94 dB PDR. (hardly 2004) Having increased possible dynamic range gives opportunity to increase the jump between quiet and loud in the musical media. Unfortunately it has been widely misused, as producers pushes the limits to how loud their music sounds instead of using the space sparingly to produce dynamics. So the added 20 - 30 dB of headroom has mostly been used to increase average loudness, instead of the dynamic ranges. 1.2 Purpose Expensive speaker systems is not something most people have. Actually most peo- ple seem to listen to music through small speakers like computer speakers, radios and headphones.Resnikoff(2015) Here, compression is useful due to the moderate players. On the radio, songs gets compressed to drown out the possible static noise and interfering signals.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    41 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us