diff options
Diffstat (limited to 'power_sequencer/operators/audiosync/ensure_non_zero.py')
-rw-r--r-- | power_sequencer/operators/audiosync/ensure_non_zero.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/power_sequencer/operators/audiosync/ensure_non_zero.py b/power_sequencer/operators/audiosync/ensure_non_zero.py deleted file mode 100644 index 589da529..00000000 --- a/power_sequencer/operators/audiosync/ensure_non_zero.py +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors -# -# This file is part of Power Sequencer. -# -# Power Sequencer 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 3 of the -# License, or (at your option) any later version. -# -# Power Sequencer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with Power Sequencer. If -# not, see <https://www.gnu.org/licenses/>. -# -import numpy as np - - -def ensure_non_zero(signal): - """ - Adds a little bit of static to avoid - 'divide by zero encountered in log' during MFCC computation. - """ - - signal += np.random.random(len(signal)) * 10 ** -10 - - return signal |