How to add music?

This is a discussion on How to add music? within the Game Programming forums, part of the General Programming Boards category; Ok I am pretty new to programming, but I know enough to make a text based game. Being text based, ...

  1. #1
    Codigious FingerPrint's Avatar
    Join Date
    Mar 2006
    Posts
    60

    How to add music?

    Ok I am pretty new to programming, but I know enough to make a text based game. Being text based, its pretty boring just sitting there and reading. I mean you get to decide what t odo on certain parts, but thats about it.

    So I would like to add a music file to it, just to spice it up a bit. Does anyone know anywhere that has a good tutorial on how to do this? Or you could explain it here(which would probably take to long).
    Code:
    /* ------------------------------------------------------------------*/
                               // INSERT CODE HERE
    /* ------------------------------------------------------------------*/

  2. #2
    Supermassive black hole ahluka's Avatar
    Join Date
    Jul 2005
    Location
    South Wales, UK
    Posts
    1,709
    I would use an API like fmod (there are others but I can't remember them). FMod is really simple from what I remember.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3

    Join Date
    May 2005
    Posts
    1,038
    Also check out OpenAL.

    FMOD is, IIRC, just a layer of abstration to DirectSound/DirectMusic.
    You know what date is on this coin? 1958. It's been travelling twenty two years to get here.
    And now it's here.
    And I'm here.
    And it's either heads or tails.
    And you have to say...
    Call it.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by BobMcGee123
    Also check out OpenAL.

    FMOD is, IIRC, just a layer of abstration to DirectSound/DirectMusic.
    Perhaps the windows version. But the FMOD library is available for many platforms, including consoles (if your a registered developer )

  5. #5

    Join Date
    May 2005
    Posts
    1,038
    I honestly did not know that about FMOD!
    You know what date is on this coin? 1958. It's been travelling twenty two years to get here.
    And now it's here.
    And I'm here.
    And it's either heads or tails.
    And you have to say...
    Call it.

  6. #6
    Computer guy
    Join Date
    Sep 2005
    Location
    I'm lost!!!
    Posts
    200
    I just wonder, can you loop the sound using PlaySound()?
    Hello, testing testing. Everthing is running perfectly...for now

  7. #7
    Codigious FingerPrint's Avatar
    Join Date
    Mar 2006
    Posts
    60
    Ok I downloaded FMOD...and their help file kind of sucks. Being pretty new to programming, I may be missing something that makes it easy, but I dont know. Could anyone explain it to me(by like PMing me or something)? I dont need every little thing explained just like a 'big picture' thing would be nice.
    Code:
    /* ------------------------------------------------------------------*/
                               // INSERT CODE HERE
    /* ------------------------------------------------------------------*/

  8. #8
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    I never miss an opportunity to link my favorite FMOD tutorial.
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  9. #9
    Computer guy
    Join Date
    Sep 2005
    Location
    I'm lost!!!
    Posts
    200
    So, FMOD is pretty cool.
    @ Sircrono: do u know how to loop the FSOUND_stream?
    Hello, testing testing. Everthing is running perfectly...for now

  10. #10
    Computer guy
    Join Date
    Sep 2005
    Location
    I'm lost!!!
    Posts
    200
    Nevermind, found it!!!
    Hello, testing testing. Everthing is running perfectly...for now

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Is AOL music crazy?
    By joeprogrammer in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-24-2006, 06:24 PM
  2. Music on a program
    By XunTric in forum C++ Programming
    Replies: 27
    Last Post: 10-03-2005, 06:55 PM
  3. VC++6.0 Add member function Wizard
    By 7stud in forum C++ Programming
    Replies: 5
    Last Post: 04-05-2003, 07:48 PM
  4. Music Theory [A Formal Post]
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 11-05-2001, 11:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21