Page 1 of 1
newMusic problem
Posted: Sat Feb 21, 2009 1:08 am
by Neptar
When I try to use the newMusic function I get an error stating that it could not load the file. I tried everything to resolve this issue by placing the file in many different directories. It works fine if I use newSound.
My first idea was that the sound file had to be outside of the love file, as when you merger the love file with love.exe to create your game exe I would assume the music file would be seperate from that exe so it can decoded during runtime. But I am not sure how to direct it to the file once it's outside the love file.
I am probably totally wrong. Any advice on how to use this would be much appreciated. Or is it a known problem? I have searched the forum but the only reference I found to newMusic was the release notes.
Many Thanks
Re: newMusic problem
Posted: Sat Feb 21, 2009 9:31 am
by Skofo
What kind of audio file are you trying to use? Music can be in MP3, OGG, MIDI, XM, MOD, or other tracker formats.
Re: newMusic problem
Posted: Sat Feb 21, 2009 10:25 am
by lbhoward
Just as Skofo said - 'Music' files can only be in MP3, OGG, MIDI, XM, MOD and only one 'Music' file can play at a time, and 'Sound' files can be WAVE, OGG, AIFF, RIFF and VOC and you can have 8 (I believe) playing at one time.
You should also be careful as to what Bitrate and Frequency you set your songs/sounds to - I've noticed the Mixer can 'reject' some sounds and playing them really squeaky and fast.
http://www.nch.com.au/wavepad/: WavePad Free Edition is an excellent tool for editting sounds and it handles many of the Formats mentioned above.
Re: newMusic problem
Posted: Sun Feb 22, 2009 12:19 am
by Neptar
I have tried the music in both wav form and mp3 form, i realise in the documentation it says wav files will not work with Music but I thought I'd try after mp3 didn't work for me. I have tried several bitrates and frequencies, but I would have thought 44.1Khz would be the standard.
I take it you chaps have had success with this?
Update:
Tried saving as Ogg Vorbis and it works.... But no joy with mp3's. Could be a localized problem with my machine but I doubt it very much as I use this machine for recording music. And can play mp3's with other software with no problem.
Re: newMusic problem
Posted: Sun Feb 22, 2009 12:48 am
by osuf oboys
Neptar wrote:I have tried the music in both wav form and mp3 form, i realise in the documentation it says wav files will not work with Music but I thought I'd try after mp3 didn't work for me. I have tried several bitrates and frequencies, but I would have thought 44.1Khz would be the standard.
I take it you chaps have had success with this?
Update:
Tried saving as Ogg Vorbis and it works.... But no joy with mp3's. Could be a localized problem with my machine but I doubt it very much as I use this machine for recording music. And can play mp3's with other software with no problem.
That mp3s does not work in LÖVE for non-windows platforms is known and has to do with one of the LÖVE uses.
Re: newMusic problem
Posted: Sun Feb 22, 2009 8:44 am
by lbhoward
On a side note - I just tried .MP3 files with Vista - no luck!
It seems .MP3 files do not with most platforms, but .OGG always does the trick for me.
Re: newMusic problem
Posted: Thu Feb 26, 2009 8:03 pm
by philnelson
I have a problem with newMusic, too. After saving my .ogg file using Audacity (Mac OS 10.5), it just sounds like when it's played back. Here's the file:
http://philname.s3.amazonaws.com/wpfile ... _audio.ogg
It sounds fine on it's own, in any music player. I'm not sure what the problem is. When I play it in Love2d, I get this horrible reverb. It's hard to describe.
The sound file is already INTENTIONALLY low quality, but what I hear in love2d is not what I hear in Audacity, or any other audio player.
Re: newMusic problem
Posted: Sun Mar 01, 2009 12:34 am
by Neptar
philnelson wrote:I have a problem with newMusic, too. After saving my .ogg file using Audacity (Mac OS 10.5), it just sounds like when it's played back. Here's the file:
http://philname.s3.amazonaws.com/wpfile ... _audio.ogg
It sounds fine on it's own, in any music player. I'm not sure what the problem is. When I play it in Love2d, I get this horrible reverb. It's hard to describe.
The sound file is already INTENTIONALLY low quality, but what I hear in love2d is not what I hear in Audacity, or any other audio player.
Where abouts in your code have you placed this? It sounds like you could be constantly triggering it, giving it a reverb effect. Although if you are using newMusic rather than newSound, it shouldn't play it over the other sound, it would restart the music which could be what you are hearing?
I downloaded it, and it sounds the same in love as it does with other programs. Tried with winamp and sound forge.
Re: newMusic problem
Posted: Sun Mar 01, 2009 1:06 am
by osgeld
off topic:
i love your avatar Neptar, i ran into him once, when he briefly was hanging out around here, i turned around, there he was and i said "sup MR T!", i got a smile and a "not much", and we continued about our ways