5.6.7 Development Journal

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.
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#16 Post by PyTom » Thu Jan 25, 2007 12:56 am

I'm actually thinking of flipping around the sound and music statements, so instead of:

music play "mozart.ogg"

we'll have:

play music "mozart.ogg"

I think the latter reads closer to the English, which I'm liking. Any thoughts from the peanut gallery?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
dizzcity
Veteran
Posts: 311
Joined: Thu Aug 17, 2006 10:51 am
Projects: Lakeside Sunset, Wedding Vows, Working Woman
Location: Singapore
Contact:

#17 Post by dizzcity » Thu Jan 25, 2007 1:29 am

Speaking as a non-techie, I prefer play music over music play.

-Dizzy-
A smart man follows the rules, a dumb man breaks them. A great man bends the rules and thus creates them.
Fanfiction.net Profile.
Writer and director of Working Woman (NaNoRenO March 2010)
Writer and director of Wedding Vows (finished 2009).
Creator of Lakeside Sunset (finished 2006).

User avatar
Alessio
Miko-Class Veteran
Posts: 573
Joined: Fri May 07, 2004 9:40 am
Projects: GO! Magical Boy (2006), Angelic Orbs (soundtrack), Cyberlin (in progress)
Location: Finland
Contact:

#18 Post by Alessio » Thu Jan 25, 2007 2:41 am

"play music" sounds better, but "music play" looks better when browsing through the script and trying to find a specific spot. It's easier to find if the most important word comes first. But both are fine, really.

I might add:
- fadeout music
- fadein music

User avatar
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#19 Post by monele » Thu Jan 25, 2007 5:00 am

Really *really* good initiative ^^

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#20 Post by PyTom » Thu Jan 25, 2007 8:41 am

Actually, much like now, fadeout and fadein are parameters to play and stop. So you could write:

play music "foo.ogg" fadeout 1.0 fadein 1.0

Or even:

play music [ "foo.ogg", "bar.ogg" ] fadeout 1.0 fadein 0.5

We don't support channels here, as they don't seem necessary beyond one channel each for music, voice, and sound.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Mihel
Regular
Posts: 85
Joined: Fri Aug 18, 2006 5:07 pm
Projects: Foxtaile, Dream Chasers, Wedding Vows
Location: NYC
Contact:

#21 Post by Mihel » Thu Jan 25, 2007 10:11 am

I too like the idea and would prefer "play music ..." It might not look as easy to find as "music play" for browsing through the script, but it's better than "$ renpy.music.play ()", especially if you have other such calls to Python code.

And actually I think I would see the verb in this statement as the most important word anyway, but that's because I also use the queue a lot, so looking for "music" would get me all of the "play"s, "stop"s, and "queue"s, whereas looking simply for "queue" makes it more efficient.

Also, PyTom, wouldn't getting rid of channel support get rid of the synchro-start feature? If so, I would personally be vehemently opposed to that myself (I was pondering using it as soon as in Foxtaile), but if nobody else uses it/channel support, then I suppose the majority must rule :P I can always just play measures of fully-mixed music.

Incidentally, is there a way to clear the queue without playing another file?
Will you stay here for a while, dear, 'til the radio plays something familiar?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#22 Post by PyTom » Thu Jan 25, 2007 10:19 am

Well, I'm not removing renpy.music.play, so if you need synchro_start, or multiple channels, you can always use that. I'm curious, though... what are you using synchro_start for?

For now, you can clear the queue using:

$ renpy.music.queue([ ], loop=False)

In the next version, this will turn into:

queue music None
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Mihel
Regular
Posts: 85
Joined: Fri Aug 18, 2006 5:07 pm
Projects: Foxtaile, Dream Chasers, Wedding Vows
Location: NYC
Contact:

#23 Post by Mihel » Thu Jan 25, 2007 10:53 am

Well, I would probably only use synchro_start for one section, one during which a battle occurs. I envisioned having one or two drum channels and one "other", all playing synchronizedly, but while the drums play their thing in constant loop (with few alterations), the main channel plays a queue of 4-bar segments. The reason for that would be so that I could then change each channel to reflect what's going on in the story in real-time without having to synthesize every possible drum/melody/harmony combination individually and have 10 million files :P
Will you stay here for a while, dear, 'til the radio plays something familiar?

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#24 Post by DaFool » Thu Jan 25, 2007 2:13 pm

I am also for multichannels for each type of sound.

Also because of battle sequences in the future.

For example, a gamer might have the following exclamation by 3 characters in battle:

Oneesama!
Naninani?
Gambatte!

If the gamer is slow, he will here these as 3 separate voices. But if the gamer is fast, then the 3 voices will converge to form a chorus. And you know the feeling whenever you listen to something that sounds like there were multiple voice actresses in the same recording booth practicing a line together? It sounds awesome!

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#25 Post by PyTom » Thu Jan 25, 2007 3:04 pm

We (still) support multiple channels, but you'll have to use the python, rather then the statement forms.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
NetGenSuperstar
Regular
Posts: 113
Joined: Sun Oct 08, 2006 1:29 am
Location: BEHIND YOU!!!
Contact:

#26 Post by NetGenSuperstar » Fri Jan 26, 2007 1:06 pm

I'd also like to say that I prefer "play music" over "music play." Not only does it sound closer to an English sentence, but it would probably allow your code to be more organized when/if you create "play sound" and "play voice" statements as well.

Counter Arts
Miko-Class Veteran
Posts: 646
Joined: Fri Dec 16, 2005 5:21 pm
Completed: Fading Hearts, Infinite Game Works
Projects: Don't Save the World
Organization: Sakura River
Location: Canada
Contact:

#27 Post by Counter Arts » Fri Jan 26, 2007 1:30 pm

Wow Mihel is really doing something with the dynamic music. So like, when was the last time a commerical game had that kind of dynamic music? Crossfading and altering channel volume levels do not count.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#28 Post by PyTom » Fri Jan 26, 2007 6:23 pm

Not a commercial game, but I will point out that Go! Magical Boy had a really good music setup. It was quite a few fairly short loops, and they went into one another seamlessly, so it sounded like one really long track.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#29 Post by DaFool » Fri Jan 26, 2007 6:41 pm

I noticed in converting midi->wav->ogg that some pause is introduced at the end of the song. So that for example, something that's 1:53 can become 1:54 or even 1:55. I'm scratching my head over this one.

So the question is, did GMB have EXACTING music lengths for this to work, or did you use music queue creatively so that, in our example above, at 1:53 the next loop starts playing immediately, cutting off the first loop at the exact point in time.

User avatar
Alessio
Miko-Class Veteran
Posts: 573
Joined: Fri May 07, 2004 9:40 am
Projects: GO! Magical Boy (2006), Angelic Orbs (soundtrack), Cyberlin (in progress)
Location: Finland
Contact:

#30 Post by Alessio » Fri Jan 26, 2007 7:23 pm

Heh, it's nice to see somebody is interested. :)

The slices were exact down to sample level, without gaps.

The way I did it was to first record one long, seamless music track (thus the empty space you mentioned is irrelevant, as it will only be at the very beginning/very end), taking care that the planned cutting spots will not truncate any melody/sound.

Using Excel and cross-checking with the wave file I then calculated the exact splitting points (approx. every 8 seconds). I then sliced up the wave file using Wave Splitter (quite some manual work). This resulted in 22 slices.

Then it required some trial/error to see which parts of the song could be put in which order, and how to bridge from one mood to another.

Post Reply

Who is online

Users browsing this forum: No registered users