Copyright © 2005-2011 MultiMedia Soft

How to mix your songs

Previous pageReturn to chapter overviewNext page

When using more than one player inside the same application, it can be useful, in order to have a good mixing experience, to have the possibility to change the Tempo or Playback rate of a certain song; for this purpose this control provides a set of methods that will help you achieving this task.

 

First of all you need to load the song using the LoadSound method: once the song has been loaded you can change the following parameters:

 

Tempo: the SetTempoPerc method changes the sound to play at faster or slower speed than original, without affecting the sound pitch. The actual tempo percentage can be retrieved using the GetTempoPerc method.
Playback rate: the SetRatePerc method changes both the sound tempo and pitch, as if an LP disc was played at wrong RPM rate. The actual playback rate percentage can be retrieved using the GetRatePerc method.
Pitch: the SetPitch method changes the sound pitch or key, without affecting the sound tempo or speed. The actual pitch can be retrieved using the GetPitch method.

 

Note that changing Tempo and Playback rate, the overall song duration will result altered: you will be notified of this alteration through the SoundDurationChanged event. The GetSoundDuration and GetFormattedSoundDuration methods will keep count of the duration change as well. If you should need to know the original duration of the loaded song you should use the GetSoundOriginalDuration and GetFormattedSoundOriginalDuration methods.

 

If you want to create a fader to perform fade-in/fade-out automatically, take a look to the How to use the Automatic Fader section.

 

A sample that shows the mentioned features in Visual C# and Visual Basic.NET can be found inside the following sample installed with the product's setup package:

- TestPlayers