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.
  • 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 timestamps with partitions
    PaddingAutomaticpadding scheme
  • 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 allclose 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  (3)

Options  (2)

Applications  (1)

Properties & Relations  (1)

Neat Examples  (3)

See Also

AudioLocalMeasurements  AudioPartition  AudioIntervals  BlockMap  ArrayFilter  MovingMap

Introduced in 2016
(11.0)
| Updated in 2017
(11.1)