0

I want to make a custom mp3 player in flash which can play 2 songs at a time and i want to record those two songs together to make a new mp3 file.

I have made a mp3 player that can play 2 songs at a time, but i have no idea how to record them.

if any one have any information about that, Please help me out.

VIPUL

Vipul
  • 431
  • 1
  • 5
  • 16
  • How about [SoundMixer.computeSpectrum()](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundMixer.html#computeSpectrum()) and [mp3 encoder](http://code.google.com/p/flash-kikko/) then? – Art May 18 '12 at 08:02
  • And read [this](http://stackoverflow.com/questions/5453438/mixing-2-sounds-from-bytearray) answer, maybe it would be helpful – Art May 18 '12 at 08:20

1 Answers1

0

The answer is not pretty simple. Working with sounds in as3 and air is still not an easy task, due to the lack of expressive APIs.

What i suggest you more, that is indeed what i did in the past in a similar situation is to use NativeProcesses as the bridge for a low level language to handle complex task like this.

I'll go with Lame as a good mp3 encoder, and echoNest for handling sounds processing. What native processes simply does is just start a process outside the air box, and just wait for responses. What you should do is just creating a python script that given two mp3 (previously saved by air on a temp directory) mix it with echonest-remix-api, save as wav and encode as mp3 using lame.

Snick
  • 1,022
  • 12
  • 29
  • Thanks for your suggestion but i am developing this application for iPhone, so i can not use Lame, and ecoNest. If you have soething else with in the action script or FLASH, please share. – Vipul May 18 '12 at 13:27
  • for the iPhone development, since AIR 3.0 there's the chance to use AIR Native Extensions. The idea is to run code compiled for that platform within the air application. In your case it means write the hard task in Objective C / c++ compile it as an extension and then target it from air. Look into this : http://custardbelly.com/blog/2011/09/21/air-native-extension-example-ibattery-for-ios/ it's a good starting point :) – Snick May 18 '12 at 13:36