A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Moving Stuff to Music

  1. #1
    13 yr old Flash Whizz :)
    Join Date
    Mar 2003
    Location
    UK
    Posts
    61

    Moving Stuff to Music

    Ok,

    How can i make an element move to music. Whatever is playing. It will move with the rythem, or the beat.

    Well, the reason i want to know this is because, I have a movie, I have a face, and a mouth that are seperate. I want to make it So that when I change the External mp3 file, the mouth will move to the words that I have recorded using a mike.

    Hope you know what im saying!
    Luke Coulton, User since V3.0

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Re: Moving Stuff to Music

    Originally posted by Jiblob
    Ok,

    How can i make an element move to music. Whatever is playing. It will move with the rythem, or the beat.

    Well, the reason i want to know this is because, I have a movie, I have a face, and a mouth that are seperate. I want to make it So that when I change the External mp3 file, the mouth will move to the words that I have recorded using a mike.

    Hope you know what im saying!
    I don't think you can.

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Posts
    136
    I dont believe there is any method of getting tempo or anything like that from the sound track.

    However I know exactly what you mean - I have often wanted to cause an event just at the exact point in a music file.

    So, having said that, how about this for an idea. I have created a program attched here which will allow you to play a sound file [I did not include one] and as it plays, if you tap the Up arrow key on your keyboard you will see numbers appear on the display. This is the raw timer value from the time the sound file started.

    Each time you tap the keyboard Up key you are grabbing the new timer() value. I presume you know what key points in the music file are important, so at the end you might have say ten values on screen.
    Now click in the window of the edit box and drag the mouse or use the down arrow to highlight and then copy the values to a notepad editor.

    If you now use these values (possibly offset depending when you start playing the music in the actual target movie, you can determine fairly easily when to cause an action

    if(timer()==45645)

    and can tweak it if needed.

    Beats using a stopwatch.
    Attached Files Attached Files

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    My Brother did something like this in MX but all we did there was to use the mp3 position which IS readable. however this will not do what is asked here, but you CAN if you predefine the positions. The thing we did it for was just so you could show who was talking in an audio file. and we animated the person that was doing the talking. The lips where NOT in sync though.

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