GetMusicPan
PanValue = GetMusicPan(Index)
 
Parameters:

    Index = The Index of Music you wish to query
Returns:

    PanValue = The Freq of this music channel (-255 to 255)
 

THe GetMusicPan() function will return the play back panning of a Music channel.



FACTS:


* GetMusicPan values range between -255 to 255



Mini Tutorial:


This example will load a music file then change the playback panning via a sin wave.

  
; Set the app to run no faster than 30 frames per second
  SetFPS 30
  
; Ask PlayBASIC for the Music Index that is currently free for use.
  MyMusic=GetFreeMusic()
  
; Load a sample as our Music
  LoadMusic "..\..\..\SFX\out.wav",MyMusic
  
;  Play the Music
  PlayMusic MyMusic
  
  
; Start a Do/loop
  Do
   ;Clear the Screen to black
     Cls RGB(0,0,0)
     
   ; display a message
     Print "Music Is Panning"
     
   ; Bump the Angle# variable by 1
     angle#=WrapAngle(angle#,1)
     
   ; Bend the music Pan by a sine wave.
     MusicPan MyMusic,SinRadius(angle#,255)
     
   ; Display the Music curremt Pan value
     Print GetMusicPan(MyMusic)
     
     If GetMusicPlaying(MyMusic)=0
        PlayMusic MyMusic
     EndIf
     
   ; display the screen
     Sync
   ; Loop back to the DO statement.
  Loop
  
  




 
Related Info: DeleteMusic | GetFreeMusic | LoadMusic | LoopMusic | MusicFreq | MusicPan | MusicVolume | PlayMusic | StopMusic :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com