JasonLambert Posted December 18, 2007 Report Share Posted December 18, 2007 in genesis games and stuff, they dont have MP3s or WAVs, they have instruments, (along with some PS2 games) which play at a certain time depending on the song... Link to comment Share on other sites More sharing options...
dark team Posted December 18, 2007 Report Share Posted December 18, 2007 Bumping 1 year old topic, are you kidding me? Link to comment Share on other sites More sharing options...
JasonLambert Posted December 18, 2007 Report Share Posted December 18, 2007 maybe... Well, this section isnt used much, i didnt realise... sorry Link to comment Share on other sites More sharing options...
Godmaster Posted January 14, 2008 Report Share Posted January 14, 2008 Bumping 1 year old topic, are you kidding me? What's the problem, there aren't so many topics here... Link to comment Share on other sites More sharing options...
dark team Posted January 14, 2008 Report Share Posted January 14, 2008 Oh, okay. Link to comment Share on other sites More sharing options...
crispyfritters Posted January 15, 2008 Report Share Posted January 15, 2008 in genesis games and stuff, they dont have MP3s or WAVs, they have instruments, (along with some PS2 games) which play at a certain time depending on the song... Well, as long as this topic is back from the grave, might I add that this is a common practice. Under different names, like say... Channels and such, allocating a set of objects to play sounds is a very good idea, and im surprised people doing fan games don't do it as often. (Although, they might) Although, in the interest of conserving memory, and also keeping code condensed. It might be a good idea to handle all the channels or instruments in a single object, or to have one object dictate what the channels are doing. Ill try something like that in what Im using now, and ill see how that goes. Link to comment Share on other sites More sharing options...
dark team Posted January 15, 2008 Report Share Posted January 15, 2008 I think that MIDIs do the same thing what have you just said. Link to comment Share on other sites More sharing options...
Guest Shadix Posted January 26, 2008 Report Share Posted January 26, 2008 MIDI is pretty much what you are talking about, however, MMF provides no features to directly loop a midi or set it up so it can be scripted do to the fact that the sound is indeed not internal. Your method can and has been done with wave-form compositions like mp3\ogg\wav just as much, including more complex effects like dynamic song phrase transitions. (ex. PSO, Mystic Mansion in Sonic Heroes) If we had more control over the way the music is playing, you can rig the track so that you have a loopable phrase, and what you could do is while the conditions are true for the music to loop back to X time in the music at Y time, preventing the song from ending, which will keep it in the memory as well as prevent it from ending. and for example of this, if you listen to one of PSO:BB's audio files, you will see that all of the different segments and transitions are embedded in the .ogg, which shows that at the very least in PSOBB's case you basically end up with a never-ending song because the song is never allowed to end ingame (obviously it will end when you listen to the ogg... I have very little experience with Dshow though, so I don't know if time jumps are possible, nor how skippy it may sound. You would need some sort of buffer for smooth transition. Link to comment Share on other sites More sharing options...
DimensionWarped Posted January 31, 2008 Report Share Posted January 31, 2008 Well, you could certainly do smooth jumps by playing the same track twice, one reference at 100% volume and another at 0% and when you want to make a jump, you could just gradually pan the volume from one track to another after setting your new time in the 0 volume track. Then of course you could free up the first track so that your performance doesn't get raped. Link to comment Share on other sites More sharing options...
Epon Posted February 8, 2008 Report Share Posted February 8, 2008 I think it'd be much easier to check how close you are from the end of the file (using size of the mp3 in bytes and checking current location)... when you hit a few bytes before the end, jump to byte 0 That should eliminate the jump. No extra shit needed. Try it out, someone. Link to comment Share on other sites More sharing options...
DragonXVI Posted April 5, 2008 Report Share Posted April 5, 2008 For the record, tried this in a recent test with a 1:47 Ogg I'd made with a looping section. MMF's got a "Get Sample Position/Duration" thing, and that's all done in Milliseconds (So a position of "19000" means its 19 seconds into the song) - All you really need is the exact timing of the bars you want to loop (Which you can find out in Audacity or, if you'd made the music yourself, whatever you're using) and either directly set the position of the same to the beginning of the loop or subtract the length of the loop from the current position. There's a "Slight" jump, but with a bit of playing around (Shave a couple of ms off the "If Position > 19000" to make it "If Position >= 18960" or some such) you can complete eliminate that, and presto - Loopable music, with none of the shoddy big pauses MMf usually adds in. Link to comment Share on other sites More sharing options...
Asuma Posted April 6, 2008 Report Share Posted April 6, 2008 For MMF/MMF2, use the Direct Show Object. Better at looping Link to comment Share on other sites More sharing options...
Epon Posted October 6, 2008 Report Share Posted October 6, 2008 Just for the record, MP3 encoding doesn't usually allow for perfect cut music. This is due to artifacts. So unless your MP3 is encoded using some new shit or whatever, the only way to get around this perfectly is to have sex with Red... I mean...erm.... o.o Link to comment Share on other sites More sharing options...
Felik Posted February 23, 2010 Author Report Share Posted February 23, 2010 Bumping this topic just to say that there is no need to contrive to do this. You should just use OGGs. They are as good as MP3s (I'm talking about filesize) and they can be looped flawlessly. However if you want to make an 'intro' and ' main part' of the music you should preload the 'main part' cause ogg loading is not instant. Example: Link to comment Share on other sites More sharing options...
LarkSS Posted February 24, 2010 Report Share Posted February 24, 2010 That's actually a pretty clever method to get simple gapless looping playback if you don't mind splitting the song into two sections. I normally just set the position backwards after reaching a certain amount to loop only a certain section using a single song file, and ignore the tiny stutter as the buffer quickly loads the new position. I may keep this technique in mind though! Link to comment Share on other sites More sharing options...
DimensionWarped Posted February 24, 2010 Report Share Posted February 24, 2010 I think it'd be much easier to check how close you are from the end of the file (using size of the mp3 in bytes and checking current location)... when you hit a few bytes before the end, jump to byte 0That should eliminate the jump. No extra shit needed. Try it out, someone. I'm a little late, but I don't think most of these game making programs have a feature that allows them to jump by address. But yeah, thats a fine way to do it if you can. Link to comment Share on other sites More sharing options...
Asuma Posted February 25, 2010 Report Share Posted February 25, 2010 I prefer to loop by samples position (like ADX files) which you do with the ONU Object. Link to comment Share on other sites More sharing options...
Recommended Posts