Results 1 to 4 of 4

Thread: Music in Lua

  
  1. #1
    splodger15 is offline -Hacks Newbie
    Join Date
    Aug 2006
    Posts
    39
    Rep Power
    14

    Default

    I have added music to my script but it doesnt seem to play
    I added this to my script

    Music.playFile("Track 1.IT", true)

    But no music plays

    Can someone help thanks

    Join my PSP site here: http://splodger15.forum5.com/

  2. #2
    ST@TIC is offline -Hacks Newbie
    Join Date
    Nov 2006
    Location
    South Africa
    Posts
    39
    Rep Power
    14

    Default

    have u tried adding this?

    Music.volume(128 )

    or try:

    Sound.load(filename, true)
    then
    sound:play()

    \"Death be not proud, some have called thee mighty and great, thou art not so\"

  3. #3
    splodger15 is offline -Hacks Newbie
    Join Date
    Aug 2006
    Posts
    39
    Rep Power
    14

    Default

    I am still getting no music to play
    Join my PSP site here: http://splodger15.forum5.com/

  4. #4
    Anti-QJ is offline -Hacks Newbie
    Join Date
    Mar 2007
    Posts
    18
    Rep Power
    0

    Default

    Are you using cools MP3 LUA Player mod? If not then you need that to play MP3's.
    I suggest you play mp3's, Its easier to run when using this mod.

    Here is an example of playing an mp3, THIS WONT RUN!
    Code:
    --Music playing example
    --Does not work, Just an exapmle
    red = Color.new(255,0,0)
    
    Music.playFile( "Track 1.mp3", true )
    while true do
    pad = Controls.read()
    
    if pad:cross then
       function Music.playing()
       SoundSystem.SFXVolume( number {0-128} )
       SoundSystem.reverb( number {0-15} )
       SoundSystem.panoramicSeparation( number {0-128} )
       screen:print(50,50,"Music-Playing", red)
    end
    if pad:circle then
       function Music.pause()
       screen:print(50,50,"Music-Pause", red)
    end
    if pad triangle then
       function Music.resume()
       --Make settings same as Music.Play()
       SoundSystem.SFXVolume( number {0-128} )
       SoundSystem.reverb( number {0-15} )
       SoundSystem.panoramicSeparation( number {0-128} )
    end
    if pad:square then
       function Music.stop()
       screen:print(50,50,"Music-Stop", red)
    end
    
    Music.playing()
    Music.pause()
    Music.resume()
    Music.stop()
    
    screen.waitVblankStart()
    screen.flip()
    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •