A pitch changing character typewriting dialogue effect?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
starysam
Newbie
Posts: 4
Joined: Mon Oct 08, 2018 12:54 pm
Projects: Dark Matter
Tumblr: starlightshore
Deviantart: starlightsammyb
Contact:

A pitch changing character typewriting dialogue effect?

#1 Post by starysam »

Hello! I've been digging around, and I've been trying to find a way to make the "typewriter" effect (the voice beeps used in games like Phoenix Wright and Undertale, along with older games) work in a way that isn't just the exact beep repeat over and over. I have the voice/sound callback one that the forum often recommends,
https://www.renpy.org/doc/html/characte ... llbacksbut

I'd like to get more out of it though. I'd like to have it so I could use multiple randomly interchanging sound clips. Alternatively, have it so it can change pitch randomly. I feel having a small change like that will give a lot of life to the beep effect, and make it easier on the player to listen to.

Is it also possible to have the sound not suddenly end when the dialogue finishes? Is there a way to ease it out?

Thank you for taking the time to read my question, any help will be gladly appreciated! :D

User avatar
Andredron
Miko-Class Veteran
Posts: 714
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: A pitch changing character typewriting dialogue effect?

#2 Post by Andredron »

Code: Select all


init python:
    def beepy_voice(event, interact=True, **kwargs):
        if event == "show":
         renpy.music.play("sound/guybeep.ogg", channel="beep")
      
define e = Character("Eileen", callback=beepy_voice)   

#all characters
config.character_callback = "beepy_voice"  


         
https://www.renpy.org/doc/html/character_callbacks.html

User avatar
starysam
Newbie
Posts: 4
Joined: Mon Oct 08, 2018 12:54 pm
Projects: Dark Matter
Tumblr: starlightshore
Deviantart: starlightsammyb
Contact:

Re: A pitch changing character typewriting dialogue effect?

#3 Post by starysam »

Oh, I'm sorry, I mean I already have that code working. I'd like to get more out of it to make the beeps feel more natural. What I'd like to know is if it's possible to either 1) randomly interchange different voice beeps files for one channel or 2) randomly change the pitch of the voice beep file during the dialogue.

User avatar
Andredron
Miko-Class Veteran
Posts: 714
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: A pitch changing character typewriting dialogue effect?

#4 Post by Andredron »

starysam wrote: Sat Oct 27, 2018 4:33 pmо
Oh, I'm sorry, I mean I already have that code working. I'd like to get more out of it to make the beeps feel more natural. What I'd like to know is if it's possible to either 1) randomly interchange different voice beeps files for one channel or 2) randomly change the pitch of the voice beep file during the dialogue.
1)

Code: Select all

#mixer="sfx"
init python:
  
  renpy.music.register_channel("amby", mixer="music", loop=True, stop_on_mute=True, tight=False, buffer_queue=True)
    
label start:
    play music "pop.mp3"
    play amby "zal.mp3"
    "Text, 2 music play"
2)

Code: Select all

label start:
    $ renpy.music.set_volume(0.2)
    "text"
    $ renpy.music.set_volume(1.0)
    "text"

User avatar
starysam
Newbie
Posts: 4
Joined: Mon Oct 08, 2018 12:54 pm
Projects: Dark Matter
Tumblr: starlightshore
Deviantart: starlightsammyb
Contact:

Re: A pitch changing character typewriting dialogue effect?

#5 Post by starysam »

Thank you :D

Post Reply

Who is online

Users browsing this forum: craboozled