AudioBlockMap

AudioBlockMap[f,audio,dur]

applies f to non-overlapping partitions of length dur in audio.

AudioBlockMap[f,audio,{dur,offset}]

applies f to partitions with offset offset in audio.

AudioBlockMap[f,audio,{dur,offset,wfun}]

applies f after applying wfun to partitions in audio.

Details and Options

  • AudioBlockMap[f,audio,] returns a TimeSeries whose values are the results of f applied to the partitions of audio. The times are the centers of the corresponding partitions.
  • Function f can work on different forms of the partition data using named arguments:
  • #AudioData or #1raw audio data of each partition (default)
    #FourierDataFourier transform of each partition
    #MagnitudeSpectrummagnitude of the Fourier transform
    #PowerSpectrumpower spectrum of each partition
  • Time variables dur and offset can be given as a scalar in seconds, or a time or sample Quantity object.
  • The smoothing window wfun can be specified using a window function that will be sampled between and or a list of values resampled to the length of the partition. By default, no smoothing is performed.
  • The smoothing window wfun can be specified using a window function that will be sampled between and or a list of values resampled to the length of the partition. By default, no smoothing is performed, which is equivalent to DirichletWindow.
  • The following options can be given:
  • AlignmentCenteralignment of the time stamps with partitions
    FourierParameters{-1,1}Fourier parameters
    MetaInformationNoneinclude additional metainformation
    MissingDataMethodNonemethod to use for missing values
    PaddingAutomaticpadding scheme
    PaddingSizeAutomaticamount of padding
    ResamplingMethod"Interpolation"the method to use for resampling paths
  • Possible settings for Alignment include:
  • Leftreturn times at the beginning of each partition
    Centerreturn times at the center of each partition
    Rightreturn times at the end of each partition
    ascaled alignment between -1 (left) and 1 (right)
  • Possible settings for Padding include:
  • Noneno padding, dropping partitions with fewer samples
    0zero (silence) padding
    vala constant value
    "Fixed"repetitions of the boundary value
    "Periodic"cyclic repetitions of the complete audio
    "Reflected"reflections of the audio at the boundary
    "Reversed"reversals of the complete audio

Examples

open all close all

Basic Examples  (1)

Apply a function to partitions of an audio object:

In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

Plot the result along with the audio waveform:

In[5]:=
Click for copyable input
Out[5]=

Scope  (7)

Options  (2)

Applications  (3)

Properties & Relations  (1)

Interactive Examples  (1)

Neat Examples  (1)

Introduced in 2016
(11.0)
|
Updated in 2019
(12.0)