9d9ef625dccb7ba0ed3295f18d90de9d6dd59469,nussl/audio_signal.py,AudioSignal,get_channel,#AudioSignal#Any#,623
Before Change
Returns:
(:obj:`np.array`): the audio data in the n-th channel of the signal, 1D
if n > self.num_channels:
raise Exception(
"Cannot get channel {0} when this object only has {1} channels!".format(n, self.num_channels))
if n <= 0:
raise Exception("Cannot get channel {}. This will cause unexpected results".format(n))
return self._get_axis(self.audio_data, self._CHAN, n - 1 )
def get_stft_channel(self, n):
Returns the n-th channel from ``self.stft_data``. **1-based.**
After Change
if n < 0:
raise ValueError("Cannot get channel {}. This will cause unexpected results".format(n))
def get_channel(self , n):
Gets the n-th channel from ``self.audio_data``.
Raises:
Exception: If not ``0 <= n < self.num_channels``.
Parameters:
n (int): index of channel to get. **0-based**
Returns:
(:obj:`np.array`): the audio data in the n-th channel of the signal, 1D
self._verify_get_channel(n)
return self._get_axis(self.audio_data, self._CHAN, n)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 14
Instances Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_channel
Project Name: interactiveaudiolab/nussl
Commit Name: e01dc00651cb36ee62d3cb9c97d82a4892e1f001
Time: 2017-02-09
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_channel
Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_stft_channel
Project Name: interactiveaudiolab/nussl
Commit Name: e01dc00651cb36ee62d3cb9c97d82a4892e1f001
Time: 2017-02-09
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: get_stft_channel