Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Realtime Audio Framework

Realtime Audio Framework

Scheduled Pinned Locked Moved The Lounge
tutorialquestioncsharpdelphi
20 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dr Walt Fair PE

    If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

    CQ de W5ALT

    Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

    T Offline
    T Offline
    Todd Smith
    wrote on last edited by
    #3

    You might want to look at OpenAL.

    Todd Smith

    1 Reply Last reply
    0
    • D Dr Walt Fair PE

      If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

      CQ de W5ALT

      Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

      J Offline
      J Offline
      Jim Crafton
      wrote on last edited by
      #4

      I second Martin, I'd check the direct sound stuff, before anything else. I would be really shocked if it doesn't support this.

      ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

      D 1 Reply Last reply
      0
      • J Jim Crafton

        I second Martin, I'd check the direct sound stuff, before anything else. I would be really shocked if it doesn't support this.

        ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

        D Offline
        D Offline
        Dr Walt Fair PE
        wrote on last edited by
        #5

        Thanks to both of you. Yes, I do think that DirectSound appears to be the way to go. So far most everything I've seen in examples has to do with playing WAV files, which is easy. I guess I need to do some playing with it. I was hoping that there was a control or something already available so I wouldn't have to develop one. Once I figure it out, it might make an article?

        CQ de W5ALT

        Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

        L 1 Reply Last reply
        0
        • D Dr Walt Fair PE

          Thanks to both of you. Yes, I do think that DirectSound appears to be the way to go. So far most everything I've seen in examples has to do with playing WAV files, which is easy. I guess I need to do some playing with it. I was hoping that there was a control or something already available so I wouldn't have to develop one. Once I figure it out, it might make an article?

          CQ de W5ALT

          Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #6

          Hi Walt, you may want and get in touch with Leslie[^], he's an audio CPian with a number of CP articles, and a nice web site full of musical stuff. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


          D 1 Reply Last reply
          0
          • L Luc Pattyn

            Hi Walt, you may want and get in touch with Leslie[^], he's an audio CPian with a number of CP articles, and a nice web site full of musical stuff. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


            D Offline
            D Offline
            Dr Walt Fair PE
            wrote on last edited by
            #7

            Thanks Luc, I'll do that.

            CQ de W5ALT

            Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

            1 Reply Last reply
            0
            • M martin_hughes

              No idea really, but isn't this the sort of thing DirectSound is good for?

              Books written by CP members

              A Offline
              A Offline
              Anthony Mushrow
              wrote on last edited by
              #8

              From what I was looking at recently DirectSound is out and XAudio2 is in. Unfortunately, even though XAudio2 has been in the SDK for over a year (I think) there isn't much information on it. Except the few samples that come with the SDK and they aren't entirely informative.

              My current favourite word is: Sammidge!

              -SK Genius

              Game Programming articles start -here[^]-

              1 Reply Last reply
              0
              • D Dr Walt Fair PE

                If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                CQ de W5ALT

                Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                E Offline
                E Offline
                EHaskins
                wrote on last edited by
                #9

                There may be some useful information here: DNRTV: Carl Franklin on Audio Processing in .NET [^]

                Eric Haskins KC9JVH

                1 Reply Last reply
                0
                • D Dr Walt Fair PE

                  If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                  CQ de W5ALT

                  Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                  J Offline
                  J Offline
                  Joshua Quick
                  wrote on last edited by
                  #10

                  Another option is OpenAL, which is a cross platform audio library. It's written in C, but I'm sure there must be some .NET wrappers out there... or you can P/Invoke it. I haven't used it myself, but I was told it is typically used for gaming on OSX and Linux. http://en.wikipedia.org/wiki/OpenAL[^] http://connect.creativelabs.com/openal[^]

                  1 Reply Last reply
                  0
                  • D Dr Walt Fair PE

                    If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                    CQ de W5ALT

                    Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                    J Offline
                    J Offline
                    jpluimers
                    wrote on last edited by
                    #11

                    If you really want real-time with low-latency, then go the ASIO way (using BASS libraries and addons, and the BASS.NET wrappers). That is used by DJ software (like Traktor, Virtual DJ, etc) Look at http://www.un4seen.com/bass.html[^] PM me for more details (I've used this in a production environment). --jeroen

                    1 Reply Last reply
                    0
                    • D Dr Walt Fair PE

                      If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                      CQ de W5ALT

                      Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                      A Offline
                      A Offline
                      Amar Chaudhary
                      wrote on last edited by
                      #12

                      If you look towards performance ( as depicted by name you told "real-time audio processing ") you should not go the managed code way. Rest is your choice. :)

                      It is Good to be Important but! it is more Important to be Good

                      T 1 Reply Last reply
                      0
                      • A Amar Chaudhary

                        If you look towards performance ( as depicted by name you told "real-time audio processing ") you should not go the managed code way. Rest is your choice. :)

                        It is Good to be Important but! it is more Important to be Good

                        T Offline
                        T Offline
                        the Kris
                        wrote on last edited by
                        #13

                        Real-time doesn't indicate extremely fast processing. It indicates predictability and accuracy in timing. Or is it?

                        1 Reply Last reply
                        0
                        • D Dr Walt Fair PE

                          If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                          CQ de W5ALT

                          Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                          S Offline
                          S Offline
                          scosta_FST
                          wrote on last edited by
                          #14

                          If you are interested to DirectSound, look at SlimDX. From the official site: "SlimDX is a free open source framework that enables developers to easily build DirectX applications using .NET technologies such as C#, VB.NET, and !IronPython. It is designed to be an efficient, simple, and lean wrapper that fully encompasses all of Microsoft's gaming and multimedia technologies and exposes them to managed code. " I use SlimDX not for audio but for 3D application and I think it is very well done.

                          1 Reply Last reply
                          0
                          • D Dr Walt Fair PE

                            If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                            CQ de W5ALT

                            Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                            T Offline
                            T Offline
                            tobywf
                            wrote on last edited by
                            #15

                            I have used NAudio for many things including real-time fft. It is very capable, but also the source code is amazingly nice, so it's easy to patch. Basically, it wraps the code for reading/writing samples and then you process the audio buffers (arrays) in an unsafe block, giving you superfast performance. Try it, it is a superb project and sounds like just what you need. I tried much other stuff before I found this, including wrapping DirectShow by myself.

                            1 Reply Last reply
                            0
                            • D Dr Walt Fair PE

                              If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                              CQ de W5ALT

                              Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                              M Offline
                              M Offline
                              molesworth
                              wrote on last edited by
                              #16

                              Most of my time is spent writing audio engines and tools, and one piece of advice, mentioned a few times above, which I'd definitely emphasise is "don't use managed code". For real-time, interactive audio processing you need to have, as also mentioned, predictable and accurate timing, and to achieve that you really need to use a threaded, unmanaged system. You can still write the API and some of the system management layers as managed code - which is exactly what I've done in my current project. The benefits are a simple API, nicely structured audio object classes, and a carefully tuned processing layer doing the hard work.

                              There are three kinds of people in the world - those who can count and those who can't...

                              1 Reply Last reply
                              0
                              • D Dr Walt Fair PE

                                If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                                CQ de W5ALT

                                Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                L Offline
                                L Offline
                                larry118
                                wrote on last edited by
                                #17

                                I hope that you will publish an article on what you end up doing. There is so little documentation on doing anything with sound including direct sound libraries other than playing wav files. I would love to see an examples of getting to the sound card buffer with either managed or unmanaged code. I don't believe there is an article of any kind on the subject. Larry Freedman

                                Such a Larry

                                1 Reply Last reply
                                0
                                • D Dr Walt Fair PE

                                  If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                                  CQ de W5ALT

                                  Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                  D Offline
                                  D Offline
                                  Dr Walt Fair PE
                                  wrote on last edited by
                                  #18

                                  Thanks to everyone for the suggestions, links and comments. I appreciate them all. I will definite take a look at NAudio, SlimDX and the other recommendations. As far as managed vs. unmanaged code, I understand the issues. Basically the application I have in mind isn't too critical, and will probably be at a fairly low data rate, since the frequency range is only a few kHz at most. I could always go back to the unmanaged code I use in the past, but I'd like to give a managed solution a try. I'll try to write an article on what I learn from the exercise. Thanks again to all!

                                  CQ de W5ALT

                                  Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                  1 Reply Last reply
                                  0
                                  • D Dr Walt Fair PE

                                    If this is the wrong place to ask, I apologize -- I didn't see another forum that my request obviously fit. Besides, this isn't really a programming question. I want to develop some real-time audio processing software for .NET. I've done this in the past using Delphi and C with unmanaged code, but this time I want to do it in .NET managed code. Is there a framework or tutorial on how to grab the low level audio from a sound card buffer and put the processed audio back again? I've already gone through all the articles on CP and couldn't find one that fit the bill. I've also Googled and Binged and couldn't find anything managed to use as an example. It needs to be low level audio access that can be done in real time. Any ideas, links, etc. will be appreciated. And if I posted this in the wrong forum, just let me know. Never fear -- I have my flameproof underwear on.

                                    CQ de W5ALT

                                    Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                    R Offline
                                    R Offline
                                    Ravi Bhavnani
                                    wrote on last edited by
                                    #19

                                    Walt, check out the .NET version of the Bass[^] library.  The developer is very helpful and responsive. /ravi

                                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                    D 1 Reply Last reply
                                    0
                                    • R Ravi Bhavnani

                                      Walt, check out the .NET version of the Bass[^] library.  The developer is very helpful and responsive. /ravi

                                      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                      D Offline
                                      D Offline
                                      Dr Walt Fair PE
                                      wrote on last edited by
                                      #20

                                      Thank you Ravi, I will check there.

                                      CQ de W5ALT

                                      Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups