[Flashcoders] libraries of wav files?
i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
If you are talking about sound imported into the Library in IDE, you can assign a Class name to it and instantiate it as normal: var snd:Sound = new LibaraySound(); snd.play(); ...etc. -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 29 April 2010 10:35, Jim Andrews j...@vispo.com wrote: i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
Sorry. I should have been more specific. What I'd like to do is create an external file that contains a bunch of wav files. Perhaps a bunch of such such groups of wav files. And then, at run-time, the user may select one of those groups of wav files. And then the program should download that particular file. Is that sort of thing supported in Flash? In Director, such groups of wav files (and/or other media) can be stored in .cst files and downloaded at run-time. ja http://vispo.com - Original Message - From: kennethkawam...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 29, 2010 3:47 AM Subject: Re: [Flashcoders] libraries of wav files? If you are talking about sound imported into the Library in IDE, you can assign a Class name to it and instantiate it as normal: var snd:Sound = new LibaraySound(); snd.play(); ...etc. -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 29 April 2010 10:35, Jim Andrews j...@vispo.com wrote: i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
Hi, You could compile the wav files into SWF's that you load as runtime libraries - then you could still instanciate your sounds the same way as Kenneth said. You have to use a Loader class load the external SWF in and wait for the Loader's INIT event before accessing library items. You may also have to set the Loader's application domain to the same as your application in order to instanciate the sounds: Search for runtime library in flash. Glen On 29/04/2010 12:25, Jim Andrews wrote: Sorry. I should have been more specific. What I'd like to do is create an external file that contains a bunch of wav files. Perhaps a bunch of such such groups of wav files. And then, at run-time, the user may select one of those groups of wav files. And then the program should download that particular file. Is that sort of thing supported in Flash? In Director, such groups of wav files (and/or other media) can be stored in .cst files and downloaded at run-time. ja http://vispo.com - Original Message - From: kennethkawam...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 29, 2010 3:47 AM Subject: Re: [Flashcoders] libraries of wav files? If you are talking about sound imported into the Library in IDE, you can assign a Class name to it and instantiate it as normal: var snd:Sound = new LibaraySound(); snd.play(); ...etc. -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 29 April 2010 10:35, Jim Andrews j...@vispo.com wrote: i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
I would set it up using XML. I think the trick to loading MP3s and having them loop is to preload them. Then figure out how long till the sound plays and how long is left after the sound ends to the end of the track. Time your next song in line to start playing before the other ends at the right point to where the current ends the next in line has had time to get to the point where its sound starts. Then do a little DJing utilizing some kind of fade of the volumes. :) You could even have them overlap some to have that cross-fade effect. If anyone has a better suggestion, I am all ears as well. Best, Karl On Apr 29, 2010, at 6:25 AM, Jim Andrews wrote: Sorry. I should have been more specific. What I'd like to do is create an external file that contains a bunch of wav files. Perhaps a bunch of such such groups of wav files. And then, at run-time, the user may select one of those groups of wav files. And then the program should download that particular file. Is that sort of thing supported in Flash? In Director, such groups of wav files (and/or other media) can be stored in .cst files and downloaded at run-time. ja http://vispo.com - Original Message - From: kennethkawam...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 29, 2010 3:47 AM Subject: Re: [Flashcoders] libraries of wav files? If you are talking about sound imported into the Library in IDE, you can assign a Class name to it and instantiate it as normal: var snd:Sound = new LibaraySound(); snd.play(); ...etc. -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 29 April 2010 10:35, Jim Andrews j...@vispo.com wrote: i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
Aha. That'd be the ticket. Thanks very much, Glen. ja http://vispo.com - Original Message - From: Glen Pike g...@engineeredarts.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 29, 2010 4:35 AM Subject: Re: [Flashcoders] libraries of wav files? Hi, You could compile the wav files into SWF's that you load as runtime libraries - then you could still instanciate your sounds the same way as Kenneth said. You have to use a Loader class load the external SWF in and wait for the Loader's INIT event before accessing library items. You may also have to set the Loader's application domain to the same as your application in order to instanciate the sounds: Search for runtime library in flash. Glen On 29/04/2010 12:25, Jim Andrews wrote: Sorry. I should have been more specific. What I'd like to do is create an external file that contains a bunch of wav files. Perhaps a bunch of such such groups of wav files. And then, at run-time, the user may select one of those groups of wav files. And then the program should download that particular file. Is that sort of thing supported in Flash? In Director, such groups of wav files (and/or other media) can be stored in .cst files and downloaded at run-time. ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
If you create an mp3 in SoundBooth or Sound Forge and loop it, even in those environments, you see that simply creating an mp3 introduces some silence at the beginning and end of the file. Even if the mp3 was made from a perfectly gapless looping wav file, the mp3 will have a gap in it. Consequently, if one wants to use external mp3's in Flash (or any other program) things get a bit tricky. I've read a couple of good docs on this at http://blog.andre-michelle.com/2010/playback-mp3-loop-gapless/#more-590 http://www.compuphase.com/mp3/mp3loops.htm The first URL contains some excellent ActionScript code for gaplessly looping an mp3--as long as you know the total number of samples in the wav file from which the mp3 was made. This code was written by Andre Michelle, probably one of the main people who made http://audiotool.com , which is a very impressive Flash audio app. The second URL is very good also, but after investigating it quite a bit, my conclusion is Andre Michelle's code is the way to go if you want to gaplessly loop external mp3 sounds. But, again, this presupposes that you know the total number of samples in the wav from which the mp3 was made. A good alternative, which I haven't tried yet, is to create external SWF files that contain groups of wav files, let the user select which group they want to use, download the SWF, and use it as per Glen and Kenneth's suggestions in this thread. ja http://vispo.com ps: Here are some interesting online interactive audio apps: http://vispo.com/misc/ia.htm - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 29, 2010 5:03 AM Subject: Re: [Flashcoders] libraries of wav files? I would set it up using XML. I think the trick to loading MP3s and having them loop is to preload them. Then figure out how long till the sound plays and how long is left after the sound ends to the end of the track. Time your next song in line to start playing before the other ends at the right point to where the current ends the next in line has had time to get to the point where its sound starts. Then do a little DJing utilizing some kind of fade of the volumes. :) You could even have them overlap some to have that cross-fade effect. If anyone has a better suggestion, I am all ears as well. Best, Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
Jim Andrews wrote: i know you can load external mp3 files in flash, but is it possible to load a library (if that is the right term) of wav files in flash? the app i want to make involves loops, and mp3 files are not real good for loops. Hi Jim, Coming a bit late to the conversation, but I did exactly that for some music education games. We had to have seamless playback of multiple audio files, and mp3 just doesn't cut it. I put my .aiff files into one Flash file, set the linkage, and downloaded the swf at run time. When the swf download was finished, I instantiated instances of the .aiff files. I can send you some code if you like (it's a little to long to post in a message). Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] libraries of wav files?
Coming a bit late to the conversation, but I did exactly that for some music education games. We had to have seamless playback of multiple audio files, and mp3 just doesn't cut it. I put my .aiff files into one Flash file, set the linkage, and downloaded the swf at run time. When the swf download was finished, I instantiated instances of the .aiff files. I can send you some code if you like (it's a little to long to post in a message). Cordially, Kerry Thompson Hi Kerry. Nice to see you in this forum! Sure, I'd appreciate the code. Thanks very much. Also, can you tell me why you're working with .aiff files rather than, say, .wav files? I have never worked with .aiff files. I don't know anything about them. How do they compare with .wav files? ja http://vispo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders