Sound with Fun

Any information about the fun attribute is given here.

Moderator: Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1943
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Sound with Fun

#1

Post by KINGTUT10101 » Sun Nov 05, 2017 5:16

Would it be possible to make a building play a sound using fun?

User avatar
CommanderABab
AB
Reactions:
Posts: 7932
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Sound with Fun

#2

Post by CommanderABab » Sun Nov 05, 2017 5:19

That might get out of hand very quickly!
777!777Currently using alpha 777. 777 What's new? :)
online maps!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Lobby
Developer
Reactions:
Posts: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Sound with Fun

#3

Post by Lobby » Sun Nov 05, 2017 13:02

Sure, will be added:

Code: Select all

[
  {
    "id":"$fun_soundtest_sound00",
    "type":"sound",  // Type sound
    "file":"sound.mp3",  // Sound file in same directory
    "volume":1.0  // Default is 1.0
  },
  {
    "id":"$fun_soundtest_usage00",
    "type":"decoration",
    ...
    "on click fun":[
      {
        "actions":[
          {"type":"play","id":"$deco_soundtest_sound00"}  // Play sound
        ]
      }
    ]
  }
]
...Have a nice stay

User avatar
TheFennekin
Inhabitant of a Solar System
Reactions:
Posts: 1866
Joined: Thu Aug 24, 2017 11:17
Location: In your heart
Plugins: Show
Version: Beta
Phone model: Samsung

Platform

Plugin Creator

Re: Sound with Fun

#4

Post by TheFennekin » Sun Nov 05, 2017 13:12

So the music file will come with your files? You are just gonna choose a music file?
Don't even blink

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1943
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Sound with Fun

#5

Post by KINGTUT10101 » Sun Nov 05, 2017 16:23

Yes. I was inspired by redstone and noteblocks from Minecraft.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1943
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Sound with Fun

#6

Post by KINGTUT10101 » Mon Nov 06, 2017 1:42

Yes, but now we can do it with fun.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1943
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Sound with Fun

#7

Post by KINGTUT10101 » Sat Nov 11, 2017 0:52

I've noticed that the pitch of a sound changes with every use. Could this be fixed @Lobby

User avatar
Lobby
Developer
Reactions:
Posts: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Sound with Fun

#8

Post by Lobby » Sat Nov 11, 2017 0:59

Wow, you're good. I forgot about that... it's used to avoid that same samples sum up to a loud noise.
...Have a nice stay

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1943
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone model: Moto x4

Platform

Plugin Creator

Re: Sound with Fun

#9

Post by KINGTUT10101 » Sat Nov 11, 2017 4:33

There's also a crackling sound that occurs sometimes

User avatar
Lobby
Developer
Reactions:
Posts: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Sound with Fun

#10

Post by Lobby » Sun Mar 31, 2019 15:06

I think I have found a solution to the crackling sound issue.

But more importantly @ KINGTUT10101 I recently found out that it would be better to avoid ogg or wav files in your plugins completely since they may lead to playback issues dependent on how the manufacturer implemented it :teach
(Yes, as a programmer you normally you use pre-written functions and don't write things like that on your own, especially for complicated stuff like sound)

My conclusion is that MP3 is the only "safe" solution. It should also have similar file size compared to ogg while wave is basically unusable from a file size perspective. In case you have to convert files I can recommend a free tool called Audacity (for PC).
You have to use MP3 in order to support iOS.
...Have a nice stay

Imran M
Inhabitant of a Conurbation
Reactions:
Posts: 530
Joined: Wed Oct 24, 2018 13:41
Plugins: Show
Phone model: Huawei p8 lite

Platform

Plugin Creator

Re: Sound with Fun

#11

Post by Imran M » Sun Mar 31, 2019 17:35

Time to make a meme.
https://m.youtube.com/watch?v=AqpYHdv3S00 gives 404 error.

User avatar
Lobby
Developer
Reactions:
Posts: 3384
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Sound with Fun

#12

Post by Lobby » Sat Jun 08, 2019 17:58

:66:
In order to support iOS you have to use MP3 since other music formats are not supported there.
Unsupported sound files will simply be ignored, so your plugins will still work, just without sound.
...Have a nice stay

Post Reply Previous topicNext topic

Return to “Fun attribute”

Who is online

Users browsing this forum: No registered users and 1 guest