# Adding Sound

**URL:** <https://forum.choiceofgames.com/t/adding-sound/151048>\
**Category:** ChoiceScript Help\
**Created:** [March 22, 2024, 1:14am UTC](https://forum.choiceofgames.com/t/adding-sound/151048 "2024-03-22T01:14:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KennethsBrother](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/kennethsbrother/32/201738_2.png) [@KennethsBrother](https://forum.choiceofgames.com/u/KennethsBrother)\
**Post date:** [March 22, 2024, 1:14am UTC](https://forum.choiceofgames.com/t/adding-sound/151048/1 "2024-03-22T01:14:33Z")

</div>

Hey I’m pretty new to coding in choice script but I was wondering if it was possible to add music into a game? Ideally, I would have some sort of part in the stats screen (maybe like a “music player” or “iPod” section") where there would be a list of music the player could pick and then have it shuffle play.

---

<div class="post-metadata">

**Author:** ![Jacic](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jacic/32/7061_2.png) [@Jacic](https://forum.choiceofgames.com/u/Jacic)\
**Post date:** [March 22, 2024, 1:21am UTC](https://forum.choiceofgames.com/t/adding-sound/151048/2 "2024-03-22T01:21:34Z")

</div>

> **[Sound](https://choicescriptdev.fandom.com/wiki/Sound)**
>
>     The \*sound command plays a supported audio file which should be in the same folder or address as the ChoiceScript game's main files. \*sound ASoundFile.mp3 \*sound http://www.somesite.com/ASoundFile.mp3 The sound file can be accessible...

I have no idea whether sounds set from the stat menu “stick” (stat menus can be a bit weird in how they remember things set in them at times). If no one has more info you might just need to try it and see what happens.

I doubt you can make it a “shuffle play”. As far as I’m aware, a sound plays until it is finished as a file. You’d probably need some sort of script to make it continue to play random music files which you cannot add to games published through HG.

Might want to look at @Samuel_H_Young games. He’s the only one I can think of that has music running though an entire published game.

Make sure you have the command to switch it off too as a lot of people dislike music playing when they are trying to read.

---

<div class="post-metadata">

**Author:** ![ISE](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/ise/32/226542_2.png) [@ISE](https://forum.choiceofgames.com/u/ISE)\
**Post date:** [March 22, 2024, 2:36am UTC](https://forum.choiceofgames.com/t/adding-sound/151048/3 "2024-03-22T02:36:47Z")

</div>

There are methods to incorporate sound or music, although the drawback is that they abruptly cut off after a certain duration, so you have to make adjustments to the sound yourself so it doesn’t start abruptly or end in an ugly way.

---

<div class="post-metadata">

**Author:** ![Jacic](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/jacic/32/7061_2.png) [@Jacic](https://forum.choiceofgames.com/u/Jacic)\
**Post date:** [March 22, 2024, 3:16am UTC](https://forum.choiceofgames.com/t/adding-sound/151048/4 "2024-03-22T03:16:43Z")

</div>

Honestly if you want customisable sound to be a major part of your game you’d probably be better off with twine.
