A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: can you make flashtrak files?

  1. #1
    is not a good designer. No-Tec's Avatar
    Join Date
    Aug 2002
    Posts
    1,349

    can you make flashtrak files?

    I've never posted in the section before, but I was just wondering if there is a program out there or something that would convert an mp3 or a wav to a file that can play in a flashtrak player? any help is appreciated. thanks guys
    maybe.

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    I dont know anything about flashtraks but there is this free utility from swift

    http://www.swift-tools.com/swift-mp3.html

  3. #3
    is not a good designer. No-Tec's Avatar
    Join Date
    Aug 2002
    Posts
    1,349
    groovy. ill give it a shot. thanks ace.
    maybe.

  4. #4
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    Found this and thought Id post it:
    "[Q:]'But how do you get the variables (data, fulllen, etc) into data.swf that the player requires? I think they must be created by some (undoubtedly proprietary) program based on the music to get the info for the equalizer, so just using another plain music swf wouldn't work as far as I can see.'

    [A:]We created a custom program that we use, it takes any sound file, (wav, aiff, mp3) creates the text data (peaks), makes the conversions and then builds the flashtrak using swift generator

    Its a sweet little engine, and we are looking for more players!!!! So feel free to make one up!

    The catch is it only works with the loops in our archive at the minute But this grows daily anyways!

    Regards Mark Fennell
    Flashkit.com Webmaster"

    ====================================

    Also, I thought Id go into a little about the swift tool for anyone interested but confused by it. This being for Windows and not as a CGI application, but rather right from your desktop/laptop computer or whathaveyou.

    To get started, first download and extract swiftmp3 into a directory from which you are going to use it. Some people like to throw it right in C:\ (or equivalent drive) because its easy to navigate to from the command prompt. Yes, I said command prompt. Thats what you'll need (for this version at least, 2.1) to appropriately run it. I personally am going to put it in my
    C:\Program Files\Accessories\SwiftMP3
    a folder I made just for swiftmp3.exe. Now, to run this program, you need to open up the command prompt. It doesnt work if you just try to double click it. This has to run through a command prompt. To open a command prompt, you can:
    1) find the link to the command prompt in your start menu
    2) open the run dialog (either through start menu or by pressing WindowsKey + R) and typing cmd (windows 2k/XP) or command (windows 9.x+).
    3) by downloading powertoys for windows (xp version at least) and installing ability to open command prompt from folder context menu. Then, simply right click on a folder and you'll have the option to open a command prompt rooted in that folder, which is great, espeically for something like swiftmp3 where you can just rightclick on the folder you put it and open the command prompt there. This also works for shortcuts to folders too.
    4) making a new shortcut of your own to run a command prompt in the folder you specify. To do this, rightclick on the desktop or in a folder and chose new - > Shorcut and in the dialog enter cmd (or command) and hit enter, give it a name and hit enter again. Then once the shortcut is made, rightclick on the shortcut and chose properties. There you will see an option called "Start in:" Here is where you put your swiftmp3 directory. In my case I would put
    "C:\Program Files\Accessories\SwiftMP3"
    Then, when I run this shortcut, it will run a command prompt rooted in that directory.

    Now once we have a command prompt up, we need to get to the swiftmp3 directory if you arent already there. If you used options 3 or 4 from above, chances are, you are already there. If not you need to get there. Doing that is done by using the Change Directory command, which is cd. To change the directory to C:\Program Files\Accessories\SwiftMP3 I would type in at the C:\> prompt:
    cd C:\Program Files\Accessories\SwiftMP3
    THIS, however is for win 2k, win xp using cmd. For command you need to keep 8.3 file formatting and use
    cd C:\Progra~1\Access~1\SwiftMP3

    So, now that we're finally in a command prompt at the swiftmp3 directory, we can finally use it. To do that we need to type into the command promt (for a basic single file operation) 1) the program to run (swiftmp3), 2) parameters for the program to follow (explained in a bit) and 3) the mp3 file to convert. That give us:
    Code:
    swiftmp3 [parameters] [mp3 file]
    Dont use that though, thats just a guideline. The parameters and mp3 file need to be included.

    Parameters.
    There are 4 paramters. Each are explained in the intstructions file given with the download and can also be reference by just typing swiftmp3 at the command prompt we now have. Go a ahead and try it if you've been following along. It should give this
    --------------------------------------------
    Swift-MP3 Version 2.1
    Copyright 2001, Olivier Debon
    Swift-Tools http://www.swift-tools.com
    --------------------------------------------
    swift-mp3 [ options ] file1.mp3 [ [ options ] file2.mp3 ... ]
    Options:
    -fps N
    where N is the frame rate in frames per second
    -spectrum 0|1
    will create variables for frequency spectrum if value
    is 1.
    -stop 0|1|2
    will cause the movie to stop at:
    - the begining of the song if value is 1
    - the end of the song if value is 2
    -goto frameLabel
    If not empty, specifies the frame label to which main
    thread will jump to at the end of the song.
    -out file.swf
    specifies output file name. It defaults to same mp3
    file name with swf extension
    Then its just a matter of adding the mp3 file (quoted including file path) at the end of the parameters. Heres an example
    Code:
    swiftmp3 -fps 15 -spectrum 1 -stop 1 -goto finishd "C:\Documents and Settings\senocular\Desktop\test.mp3"
    This gets the mp3 called test on my desktop and creates a swf file (test.swf) of that mp3 (with an encoded spectrum analysis) in that same directory, or my desktop. This file can then be loaded externally into another movie and played with an equalizer display.

    Now, I personally, use a batch file to run my swiftmp3. I already have my typical settings set up in the bat and all I have to do is drag and drop my mp3 on to this file (or its shortcut) and it automatically runs swiftmp3 for me and makes the swf file of my mp3 in the same directory my mp3 is in. To make this file for yourself, all you need is to open up notepad and add copy and paste the following.
    Code:
    REM // remark: the following line changes the directory of the
    REM // batch file to the folder where swiftmp3.exe exists
    CD C:\Progra~1\Access~1\SwiftMP3
    REM // remark: we then can run swiftmp3 with desired variables
    REM // %1 represents the file dragged and dropped onto this batch
    START swiftmp3 -fps 20 -stop 1 -spectrum 1 -goto finished %1
    EXIT
    Then save as "generate.bat" (with the quotes, though you could name it anything.bat) and put it in the same directory as swiftmp3.exe. Of course feel free to change the parameters to your likings, or even have more than one bat for your different wants. Once you have this, make a shortcut of it whereever, like your desktop and start throwing mp3s on it to make your swf files.

    NOW, once you have these SWF files, you need to be able to use them... Ill go over that and post an example in a new post I just have to whip a simple version up etc, but I thought Id post this while I still can

  5. #5
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    Now then. Once you have your new swiftmp3 generated swf audion file, you can now use it to be played in your own audio player. This is done by using loadMovie, loading in that audio swf and then playing it, and/or stopping it, just as you would any other movieclip (as if the audio was set to stream in a blank movieclip). With this movieclip also comes additional information, mainly what is needed to create the much desired equalizer display. Also inclued are the Title, Artist and Album ID3 tags which may have been present in the original mp3 file.

    So lets say we load our audio swf into level 1. What will we get from level 1 once this is done?

    _level1.ID3 - variable which, when (the following) ID3 tags have been read, is 1.
    _level1.Artist - Artist of mp3 if defined in mp3
    _level1.Album - Album mp3 is from if defined in mp3
    _level1.Title - Title of mp3 if defined in mp3
    _level.s0 through _level.s17 - the equalizer levels ranging in values somewhere from 0 to about 31. This is what we get from specifying a spectrum of 1 with swiftmp3. These values change as the swf (or whereever it was loaded) is played
    Additionally:
    if a goto is given in the creation of the outputted swf from swiftmp3, then when the audio file finishes playing, _root (_level0) will be told to goto and play the frame with the label specified.

    So basically, from this we can quickly get some audio file information from the imported ID3 tags and then simply use the s0 - s17 values to make an equalizer display.

    Here is a simple player I made:
    http://www.umbc.edu/interactive/fla/swiftmp3player.swf
    http://www.umbc.edu/interactive/fla/swiftmp3player.fla
    Along with an audio file (courtesy of a friend):
    http://www.umbc.edu/interactive/fla/swiftmp3audio.swf

    This player uses 18 rectangle movieclips and, while the audio file is playing (loaded into a blank movieclip in _root) these recangles _yscales oscillate based on the s0-s17 values.

    Right now, the loading is based on the ID3 tag becoming 1 or true, this however doesnt mean that the audio is loaded. You might want to use a conventional pre-loader for that. ID3 is true when the ID3 tags (artist, album and title) have been fully read.

    Play tells the clip to play, stop tells the clip to stop. When the clip is finished, it goes to a frame labeled 'finished' where again? brings you back to the play/stop frame where the audio is reset to the beginning. No big deal really. Its easily tweakable and you can make some decent effects using the techniques from this file. Go wild.
    Last edited by senocular; 10-12-2002 at 10:26 AM.

  6. #6
    is not a good designer. No-Tec's Avatar
    Join Date
    Aug 2002
    Posts
    1,349
    holy cow.
    thanks so muuch man. nice work.
    i dont even freakin know what to say. im just....
    maybe.

  7. #7
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    Glad you could make use of it

  8. #8
    is not a good designer. No-Tec's Avatar
    Join Date
    Aug 2002
    Posts
    1,349
    wow it works. very very sexy. i appreciate it once again
    maybe.

  9. #9
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    Originally posted by No-Tec
    wow it works.
    You doubted me?

    Originally posted by No-Tec
    very very sexy.
    I get that a lot

    Originally posted by No-Tec
    i appreciate it once again
    No problem.

  10. #10
    is not a good designer. No-Tec's Avatar
    Join Date
    Aug 2002
    Posts
    1,349
    lol,

    no i doubted me. nothing ever works for me.
    i like you man. ill prolly give you a nickname.
    maybe.

  11. #11
    AS3 N00B
    Join Date
    Feb 2002
    Location
    NYC
    Posts
    308
    anyone still have the free version? I would appreciate it. Thank in advance.
    -Neo

  12. #12
    Junior Member
    Join Date
    May 2001
    Posts
    27
    Hi to all!

    I don't understrand, when I drop my MP3 file on the Batch file, I get an error : Windows doesn't find 'swiftmp3'. The path to the program is all right, I don't get it.

    Does anyone having an idea?

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center