How Do I Get Midi Files To Play Here

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
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: How Do I Get Midi Files To Play Here

#31 Post by JQuartz »

Neko Hibiki wrote:Another thing I want to ask, can you fix it so it can have a 640X480 mode? I have very bad eyesight. I need that mode to see clearly.
Yeah I agree with Jake, reducing the resolution won't help. Maybe you should use full screen instead (pressing f or going to the preference and select full screen or put the following code in your script:

Code: Select all

init:
    $ _preferences.fullscreen = True
)
PyTom wrote:Finally, just as a personal note, I'll point out that the only people who emailed me to thank me for Moonlight Wlaks were Linux users. (Even though Linux has the smallest number of downloads.)
Yeah majority of windows users tend to take software and programming for granted (like myself) since they don't understand how difficult it is to programme stuff. Linux users need to know at least basic programming in order to use the OS effectively.
PyTom wrote:The thing is, though, even if you don't have a distribution for mac or linux, people can always get your game working on mac or linux. You can drop it underneath a distribution of Ren'Py, or simply running it with py4renpy or the mac launcher. I tend to do this myself, as I would need to boot up a windows vm to get it working otherwise.
Is there any python code i can use to do the following:

Code: Select all

if operating system==windows:
    <codes for midi support copied from an older version of renpy>  
if there is maybe it is possible to just allow the execution of the code when the operating system is windows or am I taking things for granted again?
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

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

Re: How Do I Get Midi Files To Play Here

#32 Post by monele »

if there is maybe it is possible to just allow the execution of the code when the operating system is windows or am I taking things for granted again?
You're saying you're okay with Linux and Mac people not having music? :)

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

Re: How Do I Get Midi Files To Play Here

#33 Post by PyTom »

[quote="JQuartz"]

Code: Select all

init:
    $ _preferences.fullscreen = True
Actually, a better version of this is:

Code: Select all

init:
    $ config.default_fullscreen = True
The first version always forces fullscreen, while the second only forces fullscreen once, and remembers the user's choice after that.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Neko Hibiki
Newbie
Posts: 17
Joined: Mon Nov 19, 2007 4:01 am
Location: USA
Contact:

Re: How Do I Get Midi Files To Play Here

#34 Post by Neko Hibiki »

DaFool wrote:I used to use Timidity on Windows XP as well. It's just a straightforward render. Not sure if the various distros have changed since, but Synthfont is far more flexible. I ended up porting my Timidity soundfonts over to Synthfont.

It's not the software, it's the soundfonts and/or your soundcard. Try the midis on a different system with different soundcards, it will sound different.

At least converting them to oggs means that everyone else listens to the exact same tune as you do.

If you have a problem with it, then search for more soundfonts.
Can you send me these soundfonts you are talking about hmmm?

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

Re: How Do I Get Midi Files To Play Here

#35 Post by DaFool »

Neko Hibiki wrote: Can you send me these soundfonts you are talking about hmmm?
http://www.saunalahti.fi/kru99/links-to-SF-sites.htm

The ones I use exactly in combinations is my trade secret.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: How Do I Get Midi Files To Play Here

#36 Post by JQuartz »

monele wrote:
if there is maybe it is possible to just allow the execution of the code when the operating system is windows or am I taking things for granted again?
You're saying you're okay with Linux and Mac people not having music? :)
I guess I can't really argue with that. Alright case closed for the optional Midi then.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

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

Re: How Do I Get Midi Files To Play Here

#37 Post by monele »

Can you send me these soundfonts you are talking about hmmm?
Here's the one I suggest. It's a midi compliant SoundFont which has all the regular midi instruments... a compilation if you will (DaFool's method is to get separate instruments and assign them for each song).

http://www.personalcopy.com/home.htm
Click on Sound Fonts (left column)
Click on Big Soundfonts (top button row)
Click on "click here" at the bottom (or wait 30 seconds, your call :p)
Click on "Download PC51d.sfArk.exe"

It's a 26mb file that has to be executed so it self-extracts into the full 57mb file. Once loaded as a Sound Font, it eats 128mb of memory.

Ok, now, in my case, using a Sound Blaster card, I'll use the configuration panel to make my card use this Sound Font to play *all* midis. And I suppose I could record the output into a WAV or OGG. In your case, you'll have to use the programs we recommended and use this Sound Font file with it. At least, you get all the instruments in one pack.

Neko Hibiki
Newbie
Posts: 17
Joined: Mon Nov 19, 2007 4:01 am
Location: USA
Contact:

Re: How Do I Get Midi Files To Play Here

#38 Post by Neko Hibiki »

I decided to just spend money on a converter. Has anyone tried this one here http://www.supernova-soft.com/midi_converter/mc.htm ? If you have, let me know what you think of it before I buy it.

yummy
Miko-Class Veteran
Posts: 733
Joined: Fri Jul 07, 2006 9:58 pm
Projects: Suna to Majo
Location: France
Contact:

Re: How Do I Get Midi Files To Play Here

#39 Post by yummy »

I tried the demo version and I'm quite impressed (at first I was dubious). It's small in size, expendable and the audio rendition is quite good despite all this.

Here's a demo of this midi file rendered by the soft here. If I chose this midi file, it's because not all midi renderers offer a good rendition on it: it's made in GS, not tuned for GM nor XG. Presently, I know only two midi software renderers that can play this file correctly: Roland GS midi player and this program.

Assets:
-simplicity
-easy to manage
-3 audio formats

The downs:
-difficult to tune with sound fonts
-processing time might take a long time if you plan on converting lots of files

Lee_Hitsugaya
Regular
Posts: 115
Joined: Mon Apr 23, 2007 8:50 pm
Contact:

Re: How Do I Get Midi Files To Play Here

#40 Post by Lee_Hitsugaya »

Ok, I can see your havin' probs with MIDI conversion. ehehe. Ok, now, this program is a VIDEO converter however it can convert audio files as well. The program COSTS 20 some odd dollars, BUT! The FREE demo can do everything, it just cuts the audio file at the 5 minute mark. No sound overs are put in and it's easy to use. So if you think it sounds good, download.

http://www.softpedia.com/get/Multimedia ... rter.shtml

Anyway, hope Xillisoft Video Converter 3 helps you.

Good luck!
in a perfect world those who can do it teach others how to do it. but were not in a perfect world. So were primarily stuck with teachers who don't kno jack.

Avatar: The Last Airbender Visual Novel forums

http://img509.imageshack.us/my.php?imag ... rekzs0.png

Neko Hibiki
Newbie
Posts: 17
Joined: Mon Nov 19, 2007 4:01 am
Location: USA
Contact:

Re: How Do I Get Midi Files To Play Here

#41 Post by Neko Hibiki »

Of these two programs, which would you classify as the best?

1. http://www.supernova-soft.com/midi_converter/mc.htm

2. http://www.pistonsoft.com/midi2mp3.html

Neko Hibiki
Newbie
Posts: 17
Joined: Mon Nov 19, 2007 4:01 am
Location: USA
Contact:

Re: How Do I Get Midi Files To Play Here

#42 Post by Neko Hibiki »

Neko Hibiki wrote:Of these two programs, which would you classify as the best?

1. http://www.supernova-soft.com/midi_converter/mc.htm

2. http://www.pistonsoft.com/midi2mp3.html
Anyone?

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

Re: How Do I Get Midi Files To Play Here

#43 Post by Alessio »

Since both offer trial versions, why don't you just download them and see which one you like best? After all, we already did recommend Synthfont instead (and answered your volume question). So it's best to check yourself which software you like most/you're most comfortable with. I've only used Synthfont so far, can't comment on the other two.

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: How Do I Get Midi Files To Play Here

#44 Post by herenvardo »

Alessio wrote:Since both offer trial versions, why don't you just download them and see which one you like best? After all, we already did recommend Synthfont instead (and answered your volume question). So it's best to check yourself which software you like most/you're most comfortable with. I've only used Synthfont so far, can't comment on the other two.
100% agree. If you're going to purchase software, you should try it to see if it fits your needs; ie: check which one better renders your midis; you shouldn't really care how well it renders other people's midis.
Also note that you won't find 100% accuracy on any midi renderer, no matter if it's free or if it costs a million dollars: the concept of "perfect midi rendering" doesn't exist, because a midi file doesn't have any sound data itself. While the metaphor of 3D models vs rendered animations explained in an earlier reply is not bad, I'd rather compare midi vs wave (by wave understand wav, but mp3, ogg, wma, and all other wave-form formats as well) with partitures and performances: a midi file is a partiture. And a partiture is just a piece of paper that depicts how to play a given piece of music. The final sound depends completely on the performers that actually play it. In the digital sense, the performer is the sound card or conversion program. It's quite difficult that a given converter will produce the same result than your sound card, but if you test the file on a computer with a different sound card, you'll find that it sounds quite differently.

Of course, it may happen (and seems to be happenning) that the final output of your sound card is the exact final sound you are aiming to achieve. In this case, I have a suggestion for you, that will create a wav representation of the exact output from your audio card (it's quite straightforward once you see it in action, although may be difficult to come by). All you need is a male-male jack connector, which will be far cheaper than any software (and the software will not give you 100% accuracy anyway). The steps are simple:
  1. Connect one of the jack's plugs to the speaker or headphone connector of your sound card (un-plug for a while your speakers if needed).
  2. Connect the other jack plug to the microphone connector of your sound card (can you already see how the trick works? :P)
  3. Start Windows Sound Recorder (or any similar program).
  4. Start your favourite MIDI playback program, and load the midi file you want to convert (don't start playing yet).
  5. Hit the "Record" button in the recorder, and then start the MIDI's playback as fast as you can (to avoid leading silence).
  6. Wait for the MIDI playback to finnish, and hit the "Stop" button in the recorder. Still in the recorder, go to File|Save as... and save your wave file wherever you want.
You'll end up with a wave file that is an exact representation of your sound card's output for the original MIDI; you can now convert it to ogg, mp3, or any other format without worrying about it sounding "different" ;)
The key point of this method is the jack bridging the sound card connections: whatever would be sent to your speakers gets feeded back as if it were the microphone's output, so you just need to send the midi to the "speaker" and receive the "microphone" from a recorder. I guess there'll be some programs that emulate this process (so you can save even the jack wire), but I don't know about any one in particular. Note that you might need to play a bit with your volume controls before you get the wave file exactly as you want. As a final tip, shorter cables are less likely to produce "noise" in the recording (and will tend to be cheaper). Anyway, there are lots of programs capable of removing noises. And about the bit of leading and trailing silences, just check the recorder's Edit menu: there are two options to cut from and to the current cursor position. Even more (believe me, that recorder is one of the most amazing software pieces written by Microsoft!!), you can record the midi with maximum output volume, and then reduce the volume of the wave from the recorder (from the Effects menu). And finally (that little program is really amazing!), you can go File|Properties|Convert now to convert the file to MPEG-Layer3, which is the underlying format of mp3 files (although it will still have a .wav header, the file will be compressed to a 1:10 ratio, approx). It's a pitty that it doesn't handle Vorbis OGG, but I bet you wouldn't have expected so much from this Windows "Accessory" :P And if you still want a "pure" mp3, or an ogg, once you have the .wav there are hundreds of free programs that can perfectly handle the conversion.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How Do I Get Midi Files To Play Here

#45 Post by Jake »

herenvardo wrote: Also note that you won't find 100% accuracy on any midi renderer, no matter if it's free or if it costs a million dollars: the concept of "perfect midi rendering" doesn't exist, because a midi file doesn't have any sound data itself.
While I agree with the second part of this, the first part is misleading - many MIDI renders will give you a perfectly accurate render - they'll hit all the right notes at the right times and so on. It's just that there's no single perfect render, so ten programs might produce ten accurate renders which all sound quite different. It's not that they're inaccurate, it's that the instructions they were following weren't specific enough for them to [have to] reach the same finished product.
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: No registered users