# HG changeset patch # User matthiasm # Date 1382643656 -3600 # Node ID c3a002ed2815a16b9af66994c726f7a2ed0b1de3 # Parent 1a058eb510730a943cba6ad78af18e8ede0ce6b0 adding more and more unit degradations with strong settings as degradations diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_addNoise.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_addNoise.m Thu Oct 24 20:40:56 2013 +0100 @@ -0,0 +1,29 @@ +function degradation_config = unit_addNoise() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Preset: addNoise +% Programmer: Matthias Mauch +% +% Description: +% Parametrisation of the Degradation Unit of the same name +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Audio Degradation Toolbox +% +% Centre for Digital Music, Queen Mary University of London. +% This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +degradation_config(1).methodname = 'degradationUnit_addNoise'; +degradation_config(1).parameter.snrRatio = 10; % in dB +degradation_config(1).parameter.noiseColor = 'pink'; + +degradation_config(2).methodname = 'adthelper_normalizeAudio'; \ No newline at end of file diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_addSound.m --- a/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_addSound.m Thu Oct 24 20:26:35 2013 +0100 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_addSound.m Thu Oct 24 20:40:56 2013 +0100 @@ -1,4 +1,4 @@ -function degradation_config = addSound() +function degradation_config = unit_addSound() %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Preset: addSound % Programmer: Matthias Mauch diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyAliasing.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyAliasing.m Thu Oct 24 20:40:56 2013 +0100 @@ -0,0 +1,28 @@ +function degradation_config = unit_applyAliasing() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Preset: applyAliasing +% Programmer: Matthias Mauch +% +% Description: +% Parametrisation of the Degradation Unit of the same name +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Audio Degradation Toolbox +% +% Centre for Digital Music, Queen Mary University of London. +% This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +degradation_config(1).methodname = 'degradationUnit_applyAliasing'; +degradation_config(1).parameter.dsFrequency = 4000; + +degradation_config(2).methodname = 'adthelper_normalizeAudio'; \ No newline at end of file diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyClippingAlternative.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyClippingAlternative.m Thu Oct 24 20:40:56 2013 +0100 @@ -0,0 +1,31 @@ +function degradation_config = unit_applyClippingAlternative() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Preset: applyClippingAlternative +% Programmer: Matthias Mauch +% +% Description: +% Parametrisation of the Degradation Unit of the same name +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Audio Degradation Toolbox +% +% Centre for Digital Music, Queen Mary University of London. +% This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +degradation_config(1).methodname = 'degradationUnit_applyClippingAlternative'; +degradation_config(1).parameter.percentOfSamples = 10; + +degradation_config(2).methodname = 'adthelper_normalizeAudio'; + + +end \ No newline at end of file diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyDynamicRangeCompression.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyDynamicRangeCompression.m Thu Oct 24 20:40:56 2013 +0100 @@ -0,0 +1,31 @@ +function degradation_config = unit_applyDynamicRangeCompression() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Preset: applyDynamicRangeCompression +% Programmer: Matthias Mauch +% +% Description: +% Parametrisation of the Degradation Unit of the same name +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Audio Degradation Toolbox +% +% Centre for Digital Music, Queen Mary University of London. +% This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +degradation_config(1).methodname = 'degradationUnit_applyDynamicRangeCompression'; +degradation_config(1).parameter.compressorSlope = 0.9; +degradation_config(1).parameter.normalizeOutputAudio = 1; + +degradation_config(2).methodname = 'adthelper_normalizeAudio'; + +end \ No newline at end of file diff -r 1a058eb51073 -r c3a002ed2815 AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyHarmonicDistortion.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AudioDegradationToolbox/degradations/StrongUnitDegradations/unit_applyHarmonicDistortion.m Thu Oct 24 20:40:56 2013 +0100 @@ -0,0 +1,28 @@ +function degradation_config = unit_applyHarmonicDistortion() +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Preset: applyHarmonicDistortion +% Programmer: Matthias Mauch +% +% Description: +% Parametrisation of the Degradation Unit of the same name +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Audio Degradation Toolbox +% +% Centre for Digital Music, Queen Mary University of London. +% This file copyright 2013 Sebastian Ewert, Matthias Mauch and QMUL. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +degradation_config(1).methodname = 'degradationUnit_applyHarmonicDistortion'; +degradation_config(1).parameter.nApplications = 5; + +degradation_config(2).methodname = 'adthelper_normalizeAudio'; \ No newline at end of file diff -r 1a058eb51073 -r c3a002ed2815 demo_batchProcessing.m --- a/demo_batchProcessing.m Thu Oct 24 20:26:35 2013 +0100 +++ b/demo_batchProcessing.m Thu Oct 24 20:40:56 2013 +0100 @@ -47,8 +47,11 @@ 'smartPhoneRecording', ... 'strongMp3Compression', ... 'vinylRecording', ... + 'unit_addNoise', ... 'unit_addSound', ... - 'unit_addNoise'}; + 'unit_applyAliasing', ... + 'unit_applyClippingAlternative', ... + 'unit_applyHarmonicDistortion'}; nDegradation = length(degradationnames); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%