We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

36

Remove /playsound & /stopsound command and add /sound command

8 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    but... why?

  • 2
    Registered User commented
    Comment actions Permalink

    This is an incredibly useful idea. Not only does it simplify playing sounds, it adds the ability to modify the volume, pitch, and other attributes of the sound.

  • 0
    Registered User commented
    Comment actions Permalink

    In my opinion, this is a great idea, albeit a little unnecessary. It follows the same logic that led to the combination of /entitydata and /blockdata into /data, and would be a small step forward in organizing the commands.

  • 2
    Registered User commented
    Comment actions Permalink

    I think another option can be a query feature, where you can do /sound query (filters such as the sound or audio track) and it will say the song playing, the audio track it's playing in, who the sound is playing to, and how many ticks the song has been playing.

  • 2
    Registered User commented
    Comment actions Permalink

    In conclusion of the whole idea and the comments (and mine):

    The command would be

    /sound <play | stop | degrade | query>
    

    The arguments would be:

    play

    Plays a sound. Its syntax would be:

    /sound play <sound> <category> <Pos: x and z> <volume> <pitch>
    [<nbt>]
    

    In the argument [<nbt>] NBTs are added, examples that I can think of would be:

     

    Tags: ["<namespace>"]

    Add a label to the sound (a differentiator).

     

    Everywhere: 1b
    

    It makes the sound audible in all dimensions and without indicating where it comes from (in the subtitles and in the stereo speakers).

     

    EndTrigger: [<nbt>]
    

    Execute the specified at the end of the playback:

    {"RunCommand":"<command>"}
    

    Run the command specified in the space "<command>"

    {"Sounds":[<nbt>]}

    Play randomly sounds in NBT format or using a data storage (for multiple repeating times) with the next syntax:

    {sound:[<sound>],nbts:[<nbt>],weight:<number>,schedule:<schedule name>}

    The weight tag is the exactly the same thing like in the loot tables (if the sound have weight 0, it don't gonna plays or taken in the pool), the sound tag specifies what sound will be reproduced, the schedule tag make if the schedule return false, the weight of the sound is automatically returned 0.

    Or in case of use a data storage:

    {"storage":"<name of the data storage>"}

    I don't much of programming but I think Mojang can do all of this if take the sounds like to a storage (A list of all the sounds with his tags, pos, ticks of reproduce, volume, pitches), the unique thing is the sound engine

  • 3
    Registered User commented
    Comment actions Permalink

    When you also add parameters to modify fade in and fade out times, it would be a great feature

  • 0
    Registered User commented
    Comment actions Permalink

    There are some ideas here that I can support.

    Generally, shrinking the two seperate commands down into one is a good idea which also opens the possibility of adding new mechanics to it, like either the modify or query command.

    How much use it actually has being able to modify volume, pitch and minimum volume afterwards is a viable question - fading in/out functionality alone would do wonders but this is already the topic of another thread - and I don't image there being that much actually useful information to query which can be represented as a single, comparable (which means most likely integer) value.

    Though having some way of determining when/running some function on a sound effect (or music mostly) ending would also be a very helpful thing, like the suggested "EndTrigger" thingy. If there is just another optional parameter to "/sound play" being like <function name> defining a function to run (as all players hearing the sound) when this playback ends and "/sound stop" to define if we want to trigger this "playback end handler function" on our manual forced playback stop, or some other way to setup such a handler doesn't matter.

  • 0
    Registered User commented
    Comment actions Permalink

    One thing a /sound command really needs is an option to loop sounds. I've tried using timers to loop music but as soon as the ticks go below 20 a second it gets really out of sync

    Also being able to stop individual sounds as opposed to entire channels would be awesome!