Karaoke Mixer SDK ActiveX

Karaoke Mixer SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to mixing music file with microphone, display audio waveforms and recorded sound, like a karaoke in c++ , c#, vb.net , vb, delphi, vfp, access.

Popular Solution Go   Back

Delphi - How can display waveforms of playback and recorded sound using Delphi

Step 1: To install the Karaoke Mixer ActiveX Control, begin by launching the setup file (karaokemixersetup.exe). Select the desired installation folder for the Karaoke Mixer ActiveX Control and continue with the installation on your development computer. 

Step 2: Started Delphi, the next step is to install Karaoke Mixer ActiveX Control in Delphi. Select Component/Import ActiveX Control/Karaoke Mixer ActiveX Control. Click Install... 

 

Step 3: Select ActiveX Tab, you will see Karaoke Mixer ActiveX Control's icon.
 

Step 4: Drag Karaoke Mixer ActiveX Control to your form.

Step 5: Select Dialog Tab, Drag Open Dialog Control to your form.


Step 6: Select Dialog Tab, Drag Save Dialog Control to your form and add.

 
Step 7: Add two 3 button on form , change the caption to "Select Background Audio", "Record Sound", "Stop" and add textbox on form. 


 Step 8: In "Select Background Audio" button 's click event, add following code, it let the user select the background audio, you may select video file (avi, mpeg1, wmv, dat) too, it will extract the audio track.

 OpenDialog1.Filter :=

  'WAV (*.wav)|*.wav|MP3 (*.mp3)|*.mp3|WMA (*.wma)| *.wma';

   if opendialog1.Execute then begin

     Edit1.Text :=opendialog1.FileName;

     end;

  Step 9: In "Record Sound" button 's click event, add following code. It will output MP3 file
By default is use first audio device and first audio input pin, if you have many audio pin, select correct audio input pin index.
 
  KaraokeMixer1.MixerLoadBgAudio( Edit1.Text);

  KaraokeMixer1.MixerEnable(true);

  KaraokeMixer1.ShowWaveForm := true;

  KaraokeMixer1.SetWaveWndPos (0, 0, 320, 240);

  KaraokeMixer1.SetWaveWndOwner(Form1.Handle);

  KaraokeMixer1.SetWaveWndPopUp(false);

  KaraokeMixer1.SetWaveWndStyle(1);

  KaraokeMixer1.AudioDevice:=0;

  KaraokeMixer1.AudioInputPin:=0;

 

  KaraokeMixer1.OutputType:=2;

  KaraokeMixer1.MP3Channels :=2;

  KaraokeMixer1.MP3AudioBitrate :=224;

  KaraokeMixer1.MP3SampleRate := 44100;

 

   SaveDialog1.Filter := 'MP3 (*.mp3)';

   SaveDialog1.DefaultExt := 'mp3';

   if savedialog1.Execute then begin

     KaraokeMixer1.AudioFileName :=SaveDialog1.FileName;

   end;

  KaraokeMixer1.Start;
 
 Step 10: In "Stop" button 's click event, add following code.
 
KaraokeMixer1.Stop;
 
 Download this tutorial sample