AudioInsert[audio,tnew]
inserts the audio signal new at time t.
AudioInsert[audio,{t1,t2,…}new]
inserts the same audio at multiple positions.
AudioInsert[audio,{t1new1,…}]
inserts multiple audio signals at different positions.
AudioInsert
AudioInsert[audio,tnew]
inserts the audio signal new at time t.
AudioInsert[audio,{t1,t2,…}new]
inserts the same audio at multiple positions.
AudioInsert[audio,{t1new1,…}]
inserts multiple audio signals at different positions.
Details
- AudioInsert can be used to insert one or multiple audio signals into an existing audio object at various times.
- The time t can be any of the following:
-
t time given in seconds Quantity[t,"unit"] time given in "unit" compatible with seconds Quantity[t,"Samples"] time given as number of samples
Examples
open all close allBasic Examples (1)
Scope (2)
Insert a sinusoid at different times:
a = \!\(\*AudioBox[""]\);AudioInsert[a, {.5, 1} -> AudioGenerator["Sin"]]Insert a different signal at different times:
a = \!\(\*AudioBox[""]\);AudioInsert[a, {.5 -> AudioGenerator["Sin"], 1.5 -> AudioGenerator["White"]}]Applications (1)
Inset a short sinusoid to remark parts of interest in a recording:
a = ExampleData[{"Audio", "PianoScale"}, "Audio"];Spectrogram[a, PlotRange -> {200, 800}]Find the intervals with a nonzero amplitude and the fundamental frequency in a specified range:
int = AudioIntervals[a, #RMSAmplitude > 0 && TrueQ[#FundamentalFrequency > 260]&, PartitionGranularity -> .1]Insert a sinusoid just before the beginning of the intervals:
AudioInsert[a, int[[All, 1]] - .05 -> AudioGenerator["Sin", .1]]Properties & Relations (2)
The duration of the result is equal to the sum of the durations of the input signal and all new signals:
a = \!\(\*AudioBox[""]\);b = \!\(\*AudioBox[""]\);Duration /@ {a, b}AudioInsert[a, .5 -> b]//DurationIf the input and the new audio have different characteristics, the new audio is modified:
a = \!\(\*AudioBox[""]\);
b = \!\(\*AudioBox[""]\);Through[{AudioChannels, AudioSampleRate}[{a, b}]]While the duration is maintained, the number of channels and the sample rate are conformed to the input audio:
AudioInsert[a, .5 -> b]Through[{AudioChannels, AudioSampleRate}[%]]See Also
Related Guides
History
Text
Wolfram Research (2017), AudioInsert, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioInsert.html.
CMS
Wolfram Language. 2017. "AudioInsert." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioInsert.html.
APA
Wolfram Language. (2017). AudioInsert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioInsert.html
BibTeX
@misc{reference.wolfram_2026_audioinsert, author="Wolfram Research", title="{AudioInsert}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AudioInsert.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_audioinsert, organization={Wolfram Research}, title={AudioInsert}, year={2017}, url={https://reference.wolfram.com/language/ref/AudioInsert.html}, note=[Accessed: 12-June-2026]}