How to create a waveform graph for a radio station?

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
camzgr8game
Newbie
Posts: 12
Joined: Fri Sep 16, 2022 9:32 pm
Contact:

How to create a waveform graph for a radio station?

#1 Post by camzgr8game »

Hi all,
Was wondering if anyone could give me some advise on how to make a waveform visual that reacts to a channel?

Basically I want to have radio stations that are playing music that you can switch during the game, but I wanted to also have a waveform of what is playing on that channel for the radio UI.

The radio stations I have that sorted and its working well in game, I've defined my new audio channel and set up a few stations with playlists

Code: Select all

init python:
    renpy.music.register_channel("Radio", "radio", loop=None, stop_on_mute=True)

define example1_radio = ["audio/music/radio/ac/1.wav", "audio/music/radio/ac/2.wav", "audio/music/radio/ac/3.wav",]
define example2_radio = ["audio/music/radio/ac2/1.wav", "audio/music/radio/ac2/2.wav", "audio/music/radio/ac2/3.wav",]
And then when the UI toggles a radio station on or off it uses a

Code: Select all

action Stop("Radio"), renpy.random.shuffle(example1_radio), Play("Radio", example1_radio)
So all of that works well, but I just wanted to take the channel 'Radio' and use it to generate a waveform that I can put into the radio station select UI.

Ive seen people take matlib stuff and pyAudio and make waveforms outside of renpy, but I can't figure out how to get that to embed into renpy

Any suggestions on how to make this work? is it even possible or is it just py in the sky wish ;)

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to create a waveform graph for a radio station?

#2 Post by Alex »

camzgr8game wrote: Fri Sep 16, 2022 9:44 pm ...
This might help some - viewtopic.php?f=51&t=60318

camzgr8game
Newbie
Posts: 12
Joined: Fri Sep 16, 2022 9:32 pm
Contact:

Re: How to create a waveform graph for a radio station?

#3 Post by camzgr8game »

Alex wrote: Sat Sep 17, 2022 2:37 am
camzgr8game wrote: Fri Sep 16, 2022 9:44 pm ...
This might help some - viewtopic.php?f=51&t=60318
Thanks I tried this out and I couldn't get it to work, it didn't help that the error codes were in Russian hahah.
I might just fake it with some image textures unless there is a different way.

Thanks though :)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Sugar_and_rice