Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Play music track through unrealscript

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Play music track through unrealscript

    Hi all,
    I can play music track on kismet. It's working, tthere is no problem so far. But i wanna manage music tracks(mp3) on iphone. And i need play musics through script. I researched, but could not found anything.
    How can i play do it via script?

    #2
    ConsoleCommand("mobile PlaySong SONG");

    Replace SONG with the name of your song (without the extension).
    Example: ConsoleCommand("mobile PlaySong Menu");

    The code above will play a song called Menu.mp3

    The song must be inside that folder:

    UDKGame > Build > iPhone > Resources > Music

    Comment


      #3
      Thank you but I know thats. I need change fade-in fade-out times.

      Comment


        #4
        Pls help here.

        Comment


          #5
          Thank you but I know thats. I need change fade-in fade-out times.
          I don't think you can control the fade in/fade out of the music, because it uses the music player from the device.

          The music is faded by default on the iOS.

          http://udn.epicgames.com/Three/MobileAudioSystem.html

          "There is no way to play multiple songs at the same time. In iOS, if you play another song while one is currently playing, the first song will fade out, and then the new song will fade in."

          Comment


            #6
            Hi again.
            But i can change fade in-out times by PlayMusicTrack. One more question:
            Why i cant call PlayMusicTrack two times(Same sequence)?
            Pls look at the picture below.
            Music must be play and stop 3 seconds and again play .....
            But playing only one time. Do you know that reason?
            Click image for larger version

Name:	Kismet.jpg
Views:	1
Size:	65.8 KB
ID:	3249105

            Comment


              #7
              Ok i found this problem. Dont play again music if two same music track consecutive plays. I use 2011 september version. Psyke can you test that for me if you have last version.

              Comment


                #8
                I believe the console command is now deprecated? You can call Kismet remote events via Unrealscript.

                Comment


                  #9
                  Originally posted by Solid Snake View Post
                  I believe the console command is now deprecated? You can call Kismet remote events via Unrealscript.
                  How?!?

                  I'm curious, because if that's true, that will save my life. xD

                  Comment


                    #10
                    Look at PlayerController.ServerCauseEvent()

                    Comment


                      #11
                      Thanks solid. I can play via unrealsciprt but i dont play same music two times. Do you know the reason? I added picture here :
                      http://forums.epicgames.com/attachme...3&d=1343581105

                      Comment


                        #12
                        Music is typically played through the hardware MP3 layer on the iOS device. I believe this is just a hardware limitation on the iOS device to not allow more than a single MP3 track to play, as it means Apple can just output audio. If you want to be able to mix music, then you'll need to use the standard audio functions; but this will consume *a lot* of memory and CPU processing power. I'd just try to premix MP3's.

                        Comment


                          #13
                          No i dont want play mix music. Pls look at my uploaded picture. I played single music one time. My problem that : I played my music first time. Playing there is no problem. And stop through console command("mobile StopSong"). And again play music after 3 seconds but dont play second time.
                          I should be play different music for playing. Same music dont play two times. Pls look my picture : http://forums.epicgames.com/attachme...3&d=1343581105

                          Comment


                            #14
                            Up. Personally this is should be bug. Is there no one test it?

                            Comment


                              #15
                              this is 3 years old. But the solution here would simply be to add X amount of silence to the beginning/end of your track using some other editor (like audacity).

                              Then click on the Looping option in the PlayMusic node rather than trying to use all these delays.

                              Comment

                              Working...
                              X