Questions about audio

  • 1. How do I randomly pick from a set of music files to play (not looping) at start of layout and then after it finishes, select another one from same set, and so on.

    2. If I have a 5mb ogg file and import it to my game, can I still make the size of ogg file smaller after it is added to the capx? bottomline is I don't want a big capx size and I would like to know how to make the sound files as small as possible, possibly as small 200kb per ogg file.

  • anyone?

  • I would use:

    play by name "your_sound_files_renamed_to_use_an_index"&int(random(howmanysoundfilesyougot))

    system wait howeverlongthatfileis ms, play foo

  • if you download an ogg converter or use Audacity your can set the file compression quality from 1-10. With 1 being the lowest quality and 10 being the best quality. I would recommend quality 4 as that will be the best size to sound ration.. quality lower than 4 get bad pretty fast and leaves all sorts of sound artifacts...

  • media human has a good free app..

    download the converter here...

    http://www.mediahuman.com/download.html

  • newt

    C: System: At start of layout <----I think this is wrong but not sure what to replace it with

    A: Audio: Play int(random(5)) from Music

    A: System: Wait "Audio.Duration" secs <--- duration can't take 0 parameters, tried "Audio.Playbacktime" same issue

    How can I set the duration if the music files are not same duration?

    jobel

    thanks. please check your pm.

  • Audio.Duration("yourtag")

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • it all depends on the duration of the audio.

    a rough estimate

    1 min audio uncompressed (like wav or aif) = 10MB

    1 min audio compressed (mp3, ogg) = 1MB

    but with ogg you can bring the compression down with quality and make the file sizes smaller.

    http://www.vorbis.com/faq/#quality

    you have to play with this setting.. but you are probably not going get much smaller than a 1MB/per min and sound good. Depending on what it is you might be able to get down to 900/800kb per min...

  • it all depends on the duration of the audio.

    a rough estimate

    1 min audio uncompressed (like wav or aif) = 10MB

    1 min audio compressed (mp3, ogg) = 1MB

    but with ogg you can bring the compression down with quality and make the file sizes smaller.

    http://www.vorbis.com/faq/#quality

    you have to play with this setting.. but you are probably not going get much smaller than a 1MB/per min and sound good. Depending on what it is you might be able to get down to 900/800kb per min...

    Thank you for your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)