Copyright © 2001-2019 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:

 

Volume: the StreamVolumeLevelSet method changes the sound volume of a specific player. The current volume can be obtained through the StreamVolumeLevelGet method.
Volume sliding: the StreamVolumeSlide and StreamVolumeSlideEx methods allow sliding the sound volume of a specific player in a given amount of time. Also in this case the current volume can be obtained through the StreamVolumeLevelGet method and you can know if a sliding is occurring through the StreamVolumeIsSliding method.
Tempo: the Effects.PlaybackTempoSet 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 Effects.PlaybackTempoGet method.
Playback rate: the Effects.PlaybackRateSet 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 Effects.PlaybackRateGet method.
Pitch: the Effects.PlaybackPitchSet method changes the sound pitch or key, without affecting the sound tempo or speed. The actual pitch can be retrieved using the Effects.PlaybackPitchGet 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 SoundDurationGet and SoundDurationStringGet methods may keep count of the duration change by setting the bKeepCountOfRateChange parameter to "BOOL_TRUE".

 

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 Basic 6 and Visual C++ 6 can be found inside the following sample installed with the product's setup package:

- TestPlayers