# Sound effects extension update

**URL:** <https://forum.makecode.com/t/sound-effects-extension-update/5998>\
**Category:** Arcade\
**Created:** [February 6, 2021, 3:14am UTC](https://forum.makecode.com/t/sound-effects-extension-update/5998 "2021-02-06T03:14:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kwx/32/1545_2.png) [@kwx](https://forum.makecode.com/u/kwx)\
**Post date:** [February 6, 2021, 3:14am UTC](https://forum.makecode.com/t/sound-effects-extension-update/5998/1 "2021-02-06T03:14:29Z")

</div>

I’ve updated my unofficial sound effects extension to add support for looping sounds in v1.1.0. This is intended for continuous background noises.

You can modify sound parameters while it’s looping, for example changing frequency to adjust an engine noise based on the current speed. Here’s an example:

> **[sound effect loop](https://arcade.makecode.com/32827-25214-39774-88994)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

If you want to use it in your own project, click on Advanced / Extensions in the editor’s blocks menu, and copy the extension’s address into the search field:

`https://github.com/klausw3/pxt-sound-effects`

(I’ve started a new thread since the initial announcement had been a bit buried in a long [discussion](https://forum.makecode.com/t/testing-modifications-to-the-sound-engine/3351/17). All the waveforms are now available in the stable version of Arcade, so please ignore any references to “beta editor only” from old threads such as that one.)

To explore the available waveforms, try this example which displays the current waveform and pitch:

> **[sound effects wave demo](https://arcade.makecode.com/43377-79101-54844-36089)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

On a technical note, it’s unfortunately not easy to get a smooth continuous sound loop using the current sound scheduling API. I copied some logic from [playTone in melody.ts](https://github.com/microsoft/pxt-common-packages/blob/master/libs/mixer/melody.ts#L84), but there are still gaps and audible transitions. I think it would be useful if the low-level API provided a way to let a sound instruction replace a previous one directly, i.e. based on an app-assigned voice ID, so that a sound can effectively be updated in-place without needing careful timing.

---

<div class="post-metadata">

**Author:** ![kwx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kwx/32/1545_2.png) [@kwx](https://forum.makecode.com/u/kwx)\
**Post date:** [February 13, 2023, 1:37am UTC](https://forum.makecode.com/t/sound-effects-extension-update/5998/2 "2023-02-13T01:37:11Z")

</div>

I’ve released a new version 1.2.0 of the extension to fix an incompatibility (duplicate function definition) that makes it not work with current Arcade versions. If you get an error when opening projects using the older version, updating the extension should fix that.

Extension link: [https://github.com/klausw3/pxt-sound-effects](https://github.com/klausw3/pxt-sound-effects)
