A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Audio Mixer in 3DFA

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    8

    Audio Mixer in 3DFA

    Hi all,

    I'm developing a site for users to mix tracks online. I know this has been done successfully on other sites, but I don't know how to go about it in 3DFA. I'm using the latest version (4.9.3).

    Ideally I'd like to be able to allow users to mix maybe 8 audio files together, and preferably record the result. It would be even better if the line or mic in of the computer could be diverted to one of the mixer channels so they could play or sing along and record that too, then be able to download the result (and also have a copy of the audio file left on the server or emailed to the site owner).

    I know this is a lot to ask, but any help would be appreciated.

    MrJetking

  2. #2
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    hmm, this will be difficult. ^^
    Big problem will be the record, and the download of the result.
    no idea how to handle with this =)
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    8
    I can get round the audio recording bit with javascript if needs be, the main issue is the mixing. I've made a fader in 3dfa with the fader cap draggable within the limits of the fader track, but I can't seen to persuade it to link y position to volume of an audio file with scripting.

    I'm probably just being dumb...

  4. #4
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    Wow this does seem complex. Could you be a little more specific on what your having trouble with? I get the general idea, but if you could point out specifc errors your having then I won't have to spend a few hours making the whole system for you :P.
    BC

  5. #5
    Junior Member
    Join Date
    Feb 2007
    Posts
    8
    All I've done is get the mechanics of the faders sorted with drag and boundaries. All I want to know really is how to equate the y position of the fader to the volume of the audio files.

    I've seen scripting examples for Macromedia flash, but they don't work in 3dfa.

  6. #6
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    make a script in 3dfa that runs every frame and say...

    yourmusic.setvolume(fader.x)

    That's all. Except, it's likely that your fader isn't set on exactly 0 to 100, so you may need to do some math like...

    faderRange=fadermax-fadermin
    yourmusic.setvolume(((fader.x-fadermin)/(faderRange))*100)

    You might wana check that math but I think it's right. Also, if your going to do this on the Y axis remember that Y, from top to bottom, increases.
    BC

  7. #7
    Senior Member
    Join Date
    May 2005
    Posts
    163
    Look at the sound slider on my video player example at http://www.myjavaserver.com/~ppedz/3dfa.

    Here I took the slider's y position as a percentage of the slider's bar height using...

    100 - (((slider.y - bar.y) / bar.height) * 100)

    I got the slider's bar height by using...

    start = bar.getBounds().yMin;
    end = bar.getBounds().yMax;
    height = end - start;

    Hope it helps.

  8. #8
    Junior Member
    Join Date
    Feb 2007
    Posts
    8
    Thanks guys. I have the basics together now, cheers for all your help.

    MrJetKing

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