[Feature suggestion] Frame-linked audio visual indicator & Audioclip volume

Started by Laura Hunt, Mon 25/01/2021 21:05:06

Previous topic - Next topic

Laura Hunt

I would like to make some small suggestions that might hopefully bring some quality-of-life improvements to working with frame-linked audio:

1) Having some kind of visual indicator for frames with linked audio, like a simple dot above the frame, or an "x", or a music note symbol, or something of the sort, would make it so much easier to identify at a quick glance which frames have audio linked to them, something that can be a huge nuisance when you have views with a lot of long loops and you need to find that *one* frame with a specific audio clip.

2) More engine- than editor-related, but having the audioclip DefaultVolume property be accessible and modifiable by script would be incredibly useful; for example, to be able to easily do fading footsteps, among many other situations.

3) Maybe this one is a bit more complicated, but would it be possible to make it so that, when an animation is played in the preview panel, the frame-linked audioclips play too?

Crimson Wizard

Quote from: Laura Hunt on Mon 25/01/2021 21:05:06
2) More engine- than editor-related, but having the audioclip DefaultVolume property be accessible and modifiable by script would be incredibly useful; for example, to be able to easily do fading footsteps, among many other situations.

Is this related to not being able to configure frame audio's volume when it starts? If so, perhaps it would be better to find a direct solution to that.

Laura Hunt

Quote from: Crimson Wizard on Mon 25/01/2021 22:09:13
Quote from: Laura Hunt on Mon 25/01/2021 21:05:06
2) More engine- than editor-related, but having the audioclip DefaultVolume property be accessible and modifiable by script would be incredibly useful; for example, to be able to easily do fading footsteps, among many other situations.

Is this related to not being able to configure frame audio's volume when it starts? If so, perhaps it would be better to find a direct solution to that.

I wasn't aware that this was being looked into, but yes, that approach would also fix the issue.

Crimson Wizard

Well, I would not say it's looked into right now (unless I am not aware of that), but it seems more natural to be able to setup how the frame trigger plays the sound rather than modify original clip's properties.

Ofcourse original clip may also be made modifiable, because why not, the property is just a number, but it feels like a wrong solution for the frame sound problem.

eri0o

I briefly played with adding an indicator for audio in the frame



Wonder if it's alright or too subtle. I used the existing icon for audio.

Laura Hunt

Quote from: eri0o on Sat 18/09/2021 22:13:08
I briefly played with adding an indicator for audio in the frame
Wonder if it's alright or too subtle. I used the existing icon for audio.

Hey, that looks really cool! I personally would be totally ok with this icon, it's not intrusive and it's pretty self-explanatory, I think.

eri0o

Another possibility for the sound indicator, trying to figure out which one works best.

a)


b)


c)

Laura Hunt

I think the audio indicator should go outside of the sprite box. In these three cases the icon is clearly visible because the sprite has a large transparent area, but if the sprite is not transparent, the icon will be much harder to see (if not completely invisible, depending on the sprite colours). I think the very first example you posted is the right way to go here.

eri0o

Next iteration of the previous idea of use the Frame. The icon green square is actually the reverse color of whatever color is below, and the icon itself is draw with only white and green.

I think being inside the frame translates better the sound linked to the frame idea, so wanted to do an additional test. :)


Cassiebsg

I think also it should stay outside the sprite, as it risks covering an important part of the sprite.
There are those who believe that life here began out there...

Laura Hunt

Sorry for not having dropped by in a while :) This latest revision does look much better, but I think I have to agree with Cassie. It might be a bit of an edge case but I'm not sure having anything on top of the sprite is a good idea...

Alan v.Drake

I'd rather the icon be inside. Nobody has ever managed too see jack squat in those ant-sized frames anyway.
Besides, eri0o implemented a magnifying slider and i can make a smaller icon made only of inverted color, so there's no actual obstruction. The complaints are invalid.

Moreover, I wonder if anyone would actually notice, since linking audio to frames doesn't happen very often.

- Alan

RickJ

I believe having the icon in frame would be a problem in the example Dave Gilbert provided in the thread talking about the magnifying slider.  He has a whole view of the character lying or rolling on the ground rather than standing at the farleft.  In frame would be acceptable if one could drag it around to an ubobstructive location.   
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59418.msg636639980#msg636639980

eri0o

.

I removed the DLY as indicator of delay, and now if the delay is non zero, I added an icon for it with it's value. A sound in the frame is also indicated below. Hopefully this is good enough so we can go this way.

Edit: it will be in the next release of 3.6.0


Crimson Wizard

Personally I feel like these icons should be locked to certain position, like they often do on status bars.

Example: the clock icon at the left, and sound icon aligned at the right, so that it would always be on same relative spot.

But I guess one needs to work with the editor for a while to see how it is.

NOTE: the icons are included in the latest release of 3.6.0 alpha
(https://www.adventuregamestudio.co.uk/forums/index.php?topic=58976.0)

eri0o

there are still 2 and 3 that are open if someone finds this thread.

Quote2) More engine- than editor-related, but having the audioclip DefaultVolume property be accessible and modifiable by script would be incredibly useful; for example, to be able to easily do fading footsteps, among many other situations.

3) Maybe this one is a bit more complicated, but would it be possible to make it so that, when an animation is played in the preview panel, the frame-linked audioclips play too?

3 is probably easily doable (maybe I will eat my words), should possibly default to being mute and have a flag and a default preference setting for that.

Crimson Wizard

Quote from: eri0o on Mon 31/01/2022 12:56:04
there are still 2 and 3 that are open if someone finds this thread.

Quote2) More engine- than editor-related, but having the audioclip DefaultVolume property be accessible and modifiable by script would be incredibly useful; for example, to be able to easily do fading footsteps, among many other situations.

I already replied to this above (my comment), but might reiterate, that I disagree that this should be done through clip's DefaultVolume, as the clip as a central resource that may be used from several objects, even simultaneously.

For the given case, in my opinion there could be a volume control for particular sound/animation user instead. In general, imo, we need to move away from controlling clips idea towards the idea of controlling audio source.
For a draft example, literally have a AnimationVolume property in Character and Object.

If there are other cases where this solution won't work, we need to discuss these and investigate solution separately.

EDIT: this unfortunately would only let to set volume, but not other playback properties, available at the AudioChannel. It would be curious to figure out whether there may be a good solution to automatically receiving an audio channel where the frame is playing. On the other hand, is it wise to give full control to frame playback? E.g. user then may even rewind it indefinitely until replaced by another sound...

Crimson Wizard

There's something I'd like to try adding to 3.6.0:

* an extra "volume" parameter to Animate functions (Character.Animate, Object.Animate, Button.Animate), which defines the sound volume for the duration of this particular animation.
* a Character.AnimationVolume property, which defines the sound volume for all animations played from this character.

Here I tried to keep additions to minimum necessary to control the frame volume.

Both solutions treat the volume setting as a relative (percent of the default clip's volume). Default value of -1 means "use default volume".

The reasoning for having AnimationVolume only in Character is that Characters have animations run implicitly (walking, speaking, idle), unlike other types which require explicit Animate call.
Animate's parameter has a priority over AnimationVolume, - this way you may have implicit character's animation volume and still override it with the Animate param when necessary.

On another hand, it is still possible to change Object and Button's volume in the middle of animation by re-calling Animate with different starting frame and volume, like:
Code: ags

obj.Animate(obj.Loop, delay, eRepeat, eNoBlock, eForward, obj.Frame, new_volume);


If the above is not convenient, it's technically possible to add AnimationVolume also to these types, but I would not do that unless really necessary. (From what I understood, character's volume is a main issue here)

eri0o

Hey sounds have a type, and we can set the volume of sounds of a specific type, but we can also set the volume of a playing clip (an instance) through modifying the audio channel volume.

Unfortunately both of these modify the absolute volume. So you can't make a volume slider in your game menu and then have the volume of the sounds in the game be scaled, instead you need to script your own sound system to provide these relative volumes.

With the proposed addition, we have more volumes to track in the scripted system, and the functions need to be extended to use a different one that will apply a relative audio volume.

Is it possible to simply change how things work and have the volume percentage of the type be multiplied by the other volume, so we can have in game volume sliders for the player to configure, while also being able to play sounds at different volumes, without scripting such mixing system?

Here's a post where I explain more of what I mean by relative volumes: https://www.adventuregamestudio.co.uk/forums/index.php?topic=55194.0

I keep thinking about wrapping the current implementation of the above system as a module, but then I hope it will not be needed someday.

SMF spam blocked by CleanTalk