Announcement

Collapse
No announcement yet.

Saving Parts of WAV file

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

  • Saving Parts of WAV file

    I was referred to this forum by KingTut. I'm writing a recording/playback system for the PC that will work with many services (currently, XM) to display song and artist info in sync. I'd like to know how to save out part of a WAV file. I'm using the MMControl, but any method would be fine. The program is in VB, but I can write a C or C++ DLL if needed. I've found some complicated code for loading and saving WAV files byte by byte, but was hoping (as always) for a shortcut.

    I'm the author of TodayPlayer for the PPC (both tiny window and big buttons), and hope to be able to do playback with artist/song info there as well.

    Oh yeah, like TodayPlayer, the software wil be free. (TodayPlayer is GPL.)

    Thanx for any info or hints!

    -MBro
    http://www.todayplayer.com

  • #2
    I don't understand what you are asking. Could you explain it better ?
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

    Comment


    • #3
      Yeah. Weird thing. Just seek in the WAV file, get the chunk you need, create new wav header and save it back( header first . What's the problem ?
      Car pc integration with ease
      Car mediacenter

      Comment


      • #4
        take a look at audiostudio from www.nctsoft.com

        Comment


        • #5
          Sorry about not being clear. My program uses the Windows media control to record long WAVs (e.g. overnight) while logging what it is recording (artist/song.) I also have a player that plays the WAV while displaying the list of songs. You can click on a song to play it. I want to be able to save off that song, which means extracting and saving a 3-minute segment from an 8-hour WAV.

          I was hoping the Windows multimedia control, or API, allowed this, but it looks like it can only save out the whole file. It does indeed look like I will have to access the data "raw", and "create a new wave header." Not a big deal, but I'd hate to do that and then find out it was already supported.

          I will take a look at audiostudio; thanx! However, if it is GPL, I'd prefer to stay away. My TodayPlayer is GPL, and that has turned out to be more of a pain than it is worth. I'd rather just put up my source code without all that red tape.

          --Mike

          Comment


          • #6
            just get the program goldwave *cough* download *cough* its the best audio editing tool i have ever used. if you really need it pm me and i will send over msn messenger.

            Comment


            • #7
              .

              Ok, let me get this streight.



              Long feed from XM radio, which is constantly being recorded.

              You want that audio file, to have pointers to invididual songs within that long stream of audio ???

              My question to you is: Does your recording app know when a new song is playing ??
              Progress [I will seriously never be done!]
              Via EPIA MII
              512MB RAM
              OEM GPS (embedded)
              nLite WinXP pro on
              1GB Extreme III CF card
              Carnetix 1260 startup/ DC-DC regulator
              Software: Still, re-Writing my existing front end in .Net

              Comment


              • #8
                If you owner of the code, you can change its license any time. Don't see much problem here.
                Creating sound files is simpler than you think. No need to use 'smart' DLLs or controls. Just see my tutorial http://pymedia.org/tut
                Car pc integration with ease
                Car mediacenter

                Comment


                • #9
                  My question to you is: Does your recording app know when a new song is playing ??
                  Yes, it does, plus or minus a few seconds.

                  If you owner of the code, you can change its license any time.
                  I made the mistake of using code from another GPL'ed program (in fact, one that did not mention it.) Even if I wrote my own now, I couldn't help but use what I learned from the other code. In the grand scheme of things, it's no big deal, but now with that program, it's more of a pain to do a "release" version.

                  just get the program goldwave *cough* download *cough* its the best audio editing tool
                  I currently use Cool Edit Pro; I was one of the first to buy it shareware. There is also Audigy, which is freeware (although buggy with large files.) I just want to automate the process.

                  Oddly enough, if I knew the artist/song of some of the material I've recorded over the past 35 years, I'd have purchased many more CDs.

                  Just see my tutorial http://pymedia.org/tut
                  Will do.

                  Thanx for the comments! And keep them coming. I won't be able to throw myself into this for a couple more days.

                  -Mike

                  Comment


                  • #10
                    .

                    Well if your app knows a new song is comming, then have it log each song into a database with the location of the song in the grand scheme of things.

                    1. song: Outkast - Hey ya position: 0 seconds
                    2.song: limp bizkit - nookie position: 235 seconds



                    now when a user clicks on limp bizkit, MMcontrol starts playing at 235 seconds on the big track...
                    Progress [I will seriously never be done!]
                    Via EPIA MII
                    512MB RAM
                    OEM GPS (embedded)
                    nLite WinXP pro on
                    1GB Extreme III CF card
                    Carnetix 1260 startup/ DC-DC regulator
                    Software: Still, re-Writing my existing front end in .Net

                    Comment


                    • #11
                      nctsoft looks very cool, but I'm not willing to pay $300 for that one function. However, I'd probably pay $25 for code or a control that can extract X minutes from a WAV file.

                      BTW, the plugin DLL system would be for how to detect the song/artist from whatever software is playing (e.g. XM, XM Online, iTunes, etc.)

                      ---Mike

                      Comment


                      • #12
                        can't you just insert your own custom tags into the wav file?
                        or use some of the existing chunks?

                        http://www.borg.com/~jglatt/tech/wave.htm

                        |V1 Virtual Display|

                        Hard work often pays off over time, laziness always pays off right now.

                        Comment


                        • #13
                          Well if your app knows a new song is comming, then have it log each song into a database with the location of the song in the grand scheme of things.
                          It does this already. It logs all the songs, and then I have a player that plays backs the WAV while displaying the title and artist (I am adding a big display with big buttons.) The only thing (so far) that I can't do is click on a song and have it save out that portion of the WAV as its own file.

                          can't you just insert your own custom tags into the wav file?
                          or use some of the existing chunks?
                          This is probably nicer than a separate log file. I didn't know there were chunks of data one could embed until I visited the nctaudio page.

                          Note this is mostly for my own use, although I will be releasing it as freeware in case anyone else finds it useful. So, it won't be anything fancy, and I don't want to invest too much time into it.

                          ---Mike

                          Comment


                          • #14
                            Seems like you're making this harder than it really needs to be by trying to stick to the way you're currently doing things. Wouldn't it be easier to break the files up while recording, then use a database to link them and play them in the order they were recorded. This would let you replay the whole night in the order it was recorded if you wished, then if you chose to save a segment of the night, you then just move copy that segment from the nights location to whatever location you choose to save it in. This will help with system resources as well, because you can mantain a small database and work with small audio files much easier than you can work with one large audio file and still have to have the database to maintain positions.
                            2006 Chevy Colorado: VIA M10000 EDEN, 1 GB RAM, 80 GB 2.5" Seagate HDD, USB Slim Slot DVD/RW, Holux GPS, MobileVU 10.4" LCD (touch not working yet), VOOMPC Case (blue), 70W DC-DC supply.

                            Comment


                            • #15
                              The problem with saving while recording is that I cannot be accurate when one song ends and another begins. However, if I could be recording while saving (double-buffered, in effect), then that would work. I was not able to get that work, but perhaps I shoud try again. It certainly would be easier.

                              ---Mike

                              Comment

                              Working...
                              X