Results 1 to 3 of 3

Thread: Music in programs

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2002
    Posts
    4

    Music in programs

    This is more just a curiousity thing than anything else, but I have noticed that in every demo I have ever seen produced by anybody, they always have music in it. This isn't what my question is about, my question is regarding the synchronization of the music with the animation. The demos usually have things happening in the scene and are usually in sync with the music in someway. Do the demomakers hardcode their camera movements to be in time with the music or is there some other easier way? Just curious!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Music in programs

    First, I have not been much in the demo scene, but this is what I either know or can come up with with some thinking.

    It depends on type of music source and type of event to trigger. For streaming sound, like mp3/vorbis, you generally hardcode events. When your music change, you note the time and hardcode an event in your demo. For rythm events, you can analyse the sound in real time, since it's really difficult to hardcode beats. With modules, like mod/it/s3m, rythm events can be easier. With some formats you can insert markers in the file. Insert those markers on beats and trigger an event on each marker. You can also use these markers for scene change.

    Camera movements is generally hardcoded if you need to fly through a scene in a controlled way (like through a house).

  3. #3
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    764

    Re: Music in programs

    ...I also believe that most music player toolkits out there have support for music event information (e.g. pattern positions etc), which can be used for synchronization. Check out the documentation for e.g. libmikmod and FMOD. A problem may be if you need really precise sync, since you have sound buffer and OpenGL rendering delays etc.

Similar Threads

  1. Background music
    By joker40 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-11-2011, 10:30 AM
  2. OpenGL and Music
    By mike55 in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 11-18-2003, 06:47 AM
  3. Music...
    By DallasA in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-12-2002, 05:30 AM
  4. Add Music to you scene
    By RoBoT ZeRo in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-02-2001, 11:47 AM
  5. Synching Music
    By lost hope in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-12-2001, 11:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean