PimvanderLoos / AnimatedArchitecture

Home Page:http://animatedarchitecture.pim16aap2.nl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request, ability to mute windmill sound or relocate source of sound

BorealPawPads opened this issue · comments

Hello! Love the windmill feature.

There's a weird "kachunkachunk" sound that's being played rather inconsistently and at a large radius from the thing, though. I'd like to see an ability in the menu to either mute it altogether or move the block it's coming from!

Assuming that's where the sound is coming from, anyway. It only started playing after we set up the windmill!

Hey!

Looking at the config, it seems like it uses an old sound that hasn't been updated yet. I'll look for a better sound later.

The sound doesn't play from a specific block, but rather from the center of the animation. It currently has a range of 15 blocks, which isn't currently configurable.

However, you can configure the sound in the audio_config.json file. As you can see in the current default config below, you can set the name of the sound if you wish to use a custom one (just make sure it exists in your resource pack), configure its volume/pitch, define the duration of the sound in ticks (this does not change how long the audio is active, only how quickly it will re-activate it), or disable it altogether by setting it to null.

Default audio_config.json
{
  "DEFAULT": null,
  "bigdoor": {
    "activeAudio": {
      "sound": "bd.dragging2",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  },
  "clock": null,
  "drawbridge": {
    "activeAudio": {
      "sound": "bd.drawbridge-rattling",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.closing-vault-door",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 750
    }
  },
  "flag": null,
  "garagedoor": {
    "activeAudio": {
      "sound": "bd.drawbridge-rattling",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  },
  "portcullis": {
    "activeAudio": {
      "sound": "bd.dragging2",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  },
  "revolvingdoor": {
    "activeAudio": {
      "sound": "bd.dragging2",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  },
  "slidingdoor": {
    "activeAudio": {
      "sound": "bd.dragging2",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  },
  "windmill": {
    "activeAudio": {
      "sound": "bd.drawbridge-rattling",
      "volume": 0.8,
      "pitch": 0.7,
      "duration": 750
    },
    "endAudio": {
      "sound": "bd.thud",
      "volume": 0.2,
      "pitch": 0.15,
      "duration": 250
    }
  }
}

Slight little problem about the 15 block range. It was definitely not centered around the animation. It was in fact being played as far as 50 blocks away, and inaudible at the animation itself.

Any way I can help debug this?

Ah, all right. That definitely does not sound like the intended behavior. I'll have a look when I have time. I'll let you know if there's anything you can do to help :)

I've now merged a fix for this issue. It'll be available through the Actions tab in a few minutes.

The animation region tracking is now both faster and more accurate, audio is now attenuated so that the volume is reduced as you move further away from the source*, and Windmills do not have the rattling sound anymore by default (existing config files will need to be updated/regenerated.)

* The volume is set at the start of the sound, so any changes in volume will be applied to the next loop. I do not think there's a way for me to make the changes more gradual.


I plan to make further changes to the audio system to allow for changing the sounds used on a per-structure basis rather than on a per-type basis, but that is more of a long-term goal.