Is there a possible way to add vocal "Bebebese" into my game?

Started by MIITRIN, Sat 22/08/2020 04:38:39

Previous topic - Next topic

MIITRIN

For the lack of any better words, Bebebese was coined for the ingame beeps and sounds villagers made in Animal Crossing: Wild World. However, every instance of a character's speech being represented by a set of quick sounds of varying pitch can be considered "Bebebese". Some examples being Phoenix Wright, Paper Mario, Undertale, or even The Legend of Zelda.  One way I've theorized of adding this into my game is to prerecord all the sounds for exact pieces of dialogue, but not only is this a tedious process, its also completely contrarian to the original purpose of Bebebese, a small sound file repeated for tons of dialogue.

Some video examples:
https://youtu.be/xNCt7ha_rRY

https://youtu.be/Min0hkwO43g

https://youtu.be/-HEhl8kq1rA


As for why someone would use this instead of actual voice actors: I'm just making a small game. Voice acting would require a bigger budget, auditions, having to record all the actor's lines, and then putting it in game. It's not really worth it for a small project just for me and some of my friends. However, I'd still like that audio for someone talking, as to make the game feel more alive. Giving the character's unique voices without the need of having them explicitly speak.

Cassiebsg

I can't see why it should not be possible to code such a thing, though probably a lot harder to code than to just record voices and add the files to the games.

Also, if the game is freeware and only intended to you and your friends, and not resale, you don't need a budget or actors.... just get your friends to read the lines as natural and clear as they can and record it with the mobile phone. That way they're also part of the game.  ;) Also, there's a lot of people here that often help out with free voice acting for games if you ask for help.

But if you do decide to code this, then code everything as an independent module, so that you can easily use it with other projects and eventually share it with the community.  (nod)
There are those who believe that life here began out there...

MIITRIN

Quote from: Cassiebsg on Sat 22/08/2020 10:02:35
I can't see why it should not be possible to code such a thing, though probably a lot harder to code than to just record voices and add the files to the games.

Also, if the game is freeware and only intended to you and your friends, and not resale, you don't need a budget or actors.... just get your friends to read the lines as natural and clear as they can and record it with the mobile phone. That way they're also part of the game.  ;) Also, there's a lot of people here that often help out with free voice acting for games if you ask for help.

But if you do decide to code this, then code everything as an independent module, so that you can easily use it with other projects and eventually share it with the community.  (nod)

Thanks. I'll look into making a module for it once I figure out exactly how to do it. To me, it just felt easier to code something out and have it be a bit more professional than just some of my friends recording lines in a closet. I wanted to know if anyone else has done something similar before I actually went through with it.

Snarky

A sequence of monotone blips like in Phoenix Wright should be pretty easy to do as a tweak to one of the typewriter text modules. The Animal Crossing example seems more complex, since it uses different "syllables" at different pitches (I'm guessing this is actually just a single clip pitched up or down in playback, but AGS lacks that capability, so you would have to provide separate clips for each pitch version), and appears to have a (very simplified) model of sentence prosody in order to give a more natural rhythm and intonation: for example, going up in pitch at the end of questions.

Of course, you could do something in between, with two or three different "syllable" clips played either randomly or in some pattern. It all depends on how fancy you want to get.

MIITRIN

Looking into it, my plan is to have 3-4 different pitched sounds and apply them to the speech frames. My only question now is how I'd be able to randomize when each sound is played and which sound is played.

MIITRIN

I've figured out how randomization works and playing LinkedAudio, but my question now is how do you change the LinkedAudio? I want to randomize it so that say, frame 1 plays a random sound, but I can't find anyway to change the sound already linked to it.

Scavenger

I haven't tested it but probably something like this:

Code: ags


function ChangeLinkedAudio (int view, int loop, int frame,AudioClip *clip)
{
  ViewFrame *frame = Game.GetViewFrame(view, loop, frame);
  frame.LinkedAudio = clip;
}

MIITRIN

Quote from: Scavenger on Sun 23/08/2020 08:03:19
I haven't tested it but probably something like this:

Code: ags


function ChangeLinkedAudio (int view, int loop, int frame,AudioClip *clip)
{
  ViewFrame *frame = Game.GetViewFrame(view, loop, frame);
  frame.LinkedAudio = clip;
}


I've tried using this for the game, but I haven't got it working. I'm not that good at programming, so apologies if I'm just misunderstanding this. Putting it in blankly pops up the error that "frame" is already defined, but I'm not sure what to change to fix this.  If it helps, an example of what my view, loop, and frame are are 2, 0, 0 and the audioclip is acharacterspeak1. Still, like I said, I'm not fluent with programming.

Crimson Wizard

Quote from: Mintaro on Sun 23/08/2020 21:16:48
I've tried using this for the game, but I haven't got it working. I'm not that good at programming, so apologies if I'm just misunderstanding this. Putting it in blankly pops up the error that "frame" is already defined, but I'm not sure what to change to fix this.  If it helps, an example of what my view, loop, and frame are are 2, 0, 0 and the audioclip is acharacterspeak1. Still, like I said, I'm not fluent with programming.

There's a mistake in above code, name "frame" is used for both function parameter and inner variable. Simply rename "ViewFrame *frame" into something else, like
Code: ags

ViewFrame *vf= Game.GetViewFrame(view, loop, frame);
vf.LinkedAudio = clip;

MIITRIN

Quote from: Crimson Wizard on Sun 23/08/2020 21:37:29
Quote from: Mintaro on Sun 23/08/2020 21:16:48
I've tried using this for the game, but I haven't got it working. I'm not that good at programming, so apologies if I'm just misunderstanding this. Putting it in blankly pops up the error that "frame" is already defined, but I'm not sure what to change to fix this.  If it helps, an example of what my view, loop, and frame are are 2, 0, 0 and the audioclip is acharacterspeak1. Still, like I said, I'm not fluent with programming.

There's a mistake in above code, name "frame" is used for both function parameter and inner variable. Simply rename "ViewFrame *frame" into something else, like
Code: ags

ViewFrame *vf= Game.GetViewFrame(view, loop, frame);
vf.LinkedAudio = clip;


It runs now, thank you! So how do I use this function to randomize each speech frame's sound?

Mandle

Mintaro, you can do it! A certified VCR repairman of your stature can do anything!

Snarky

This is basically a "random footstep" problem, only applied to the speech view instead of the walking view, and a sound for every (?) frame.

See this thread, for example: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58002.0

MIITRIN

Quote from: Snarky on Mon 24/08/2020 10:51:59
This is basically a "random footstep" problem, only applied to the speech view instead of the walking view, and a sound for every (?) frame.

See this thread, for example: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58002.0

Thank you. I'll check out this thread and see if I can get it to work.

Update: It does! It was satisfying to finally hear differing pitches. All I want to know now is how to adjust the code so that it allows more than 2 pitch sounds and is a bit more frequent.

Snarky

If you're using the code in that other thread relatively unchanged, the FOOTSTEP_AUDIO_COUNT constant (and the initialization of the array in initFootstepAudio()) defines how many different alternative sounds (e.g. pitch variations) it uses.

As-is, it will set a sound for two frames per animation loop (since typically a walkcycle has two footsteps). If you want it more frequent, you can change that to for example be on every frame, or on every other frame. This would require modifying lines 65â€"73 in the sample. Instead of using the FOOTSTEP_FRAME_1_FB (etc.) constants to only set audio for specific frames, you would probably do another loop inside of the existing loop, to update the audio for each frame in each animation loop.

Edit: The code also has a bit of logic to ensure it never plays the same clip twice in immediate succession. If you don't need that, lines 53â€"59 can be simplified considerably.

SMF spam blocked by CleanTalk