Click here to Skip to main content
15,889,335 members
Everything / Multimedia / Audio

Audio

audio

Great Reads

by Andy Allinger
Convert audio to image. (Edit the image.) Convert image to music.
by honey the codewitch
Provides a complete managed API for working with MIDI files, sequences and devices
by Steve Hoult
Creation of an Audio analysis framework to enable developers with little to no understanding of audio analysis to develop audio-driven games
by ljw1004
How to use UPnP on Windows 8

Latest Articles

by Andy Allinger
Convert audio to image. (Edit the image.) Convert image to music.
by ToughDev
How to interface VS1053 Audio Encoder/Decoder Module with PIC using SPI
by honey the codewitch
Mix wavs and waveforms with this simple to use library
by Vishwas_R
Simple Audio Player to browse any song with Play / Pause, Stop options & a waveform generated using CanvasJS charts

All Articles

Sort by Updated

Audio 

12 Aug 2023 by Andy Allinger
Convert audio to image. (Edit the image.) Convert image to music.
7 May 2023 by ToughDev
How to interface VS1053 Audio Encoder/Decoder Module with PIC using SPI
9 Apr 2023 by honey the codewitch
Mix wavs and waveforms with this simple to use library
25 Feb 2023 by John Smith 27
In the program Ditto which is a clipboard manager, there's an option to run ChaiScript when the user changes the clipboard of Windows, so I want to run a short sound so I know the Ctrl+C or with the mouse worked correctly and I copied what is...
26 Sep 2022 by Dave Kreskowiak
That's a lot of code just to do this: byte[] buffer = File.readAllBytes(filepath); Yeah, I get it. The entire file is going to be pulled into memory and could run the machine out of RAM. But for a test project just to learn how to parse the...
25 Sep 2022 by T1xT
need to load audio file in any format, in byte[] array which has specific audio format such as two channels and special sample rate etc. any help will be appreciated. What I have tried: got this code to load a .wav file into bye[] by it just...
25 Sep 2022 by Richard MacCutchan
You need to examine the content of the file to know which format it is. Google will find you documentation and samples on audio formats.
30 Aug 2022 by T1xT
A generated sine sound data are stored in a byte array: double SAMPLE_RATE = 44100.0; double AMPLITUDE = 32768.0; double timeSeconds= 10; int shortBufferSize= (int) (timeSeconds * SAMPLE_RATE); short[] shortBuf = new...
4 Aug 2022 by Vishwas_R
Simple Audio Player to browse any song with Play / Pause, Stop options & a waveform generated using CanvasJS charts
25 Jul 2022 by honey the codewitch
Make your little devices sing
1 Jun 2022 by Member 15658863
i want to improve this project, i shared the link of it down below. In the link that i shared i want to improve the project where i want to add a voice output when the digit gets recognised for example in the screnshots shown there are the...
1 Jun 2022 by Richard MacCutchan
What did you search for? Google has lots of hits python speech output - Google Search[^].
7 May 2022 by Jackson Jiang
Introduction to and development journey of a real-time transcription function
9 Nov 2021 by Oyinda Sangowawa
Hello. I'm new to coding. I'm trying to add an audio file to a code as practice. I have a file in mind, but I don't know how to add it to the code. I'd really appreciate a step by step answer please What I have tried: ...
9 Nov 2021 by OriginalGriff
Exactly how you would do that will depend on the language and environment you are working with: a web-based solution would be very different to a WinForms solution for example, and a PHP or WPF solution would be different again. So start by...
19 Sep 2021 by Andy Allinger
Filter specified by the pass frequency, stop frequency, passband attenuation, and stopband attenuation
15 Jul 2021 by Steve Hoult
Creation of an Audio analysis framework to enable developers with little to no understanding of audio analysis to develop audio-driven games
16 May 2021 by Coder2195Text
I am making an HTML5 game, which involves one audio being played multiple times at once. I searched this issue up and found this: https://stackoverflow.com/questions/25654558/html5-js-play-same-sound-multiple-times-at-the-same-time It seemed to...
16 May 2021 by OriginalGriff
Go back to SO and ask the person who wrote it. There is a "comment" forum at the bottom of every question and every answer for that purpose ...
6 Apr 2021 by Jason Sultana
My personal list of Audible books (or audio books, technically) for programmers
11 Dec 2020 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a...
21 Sep 2020 by Gagandeep1996
I want to send receive a audio stream on my pc and put that data into windows virtual mic. Basically I want replicate WO MIC's application stack but I want to understand every single part of the design. What I have tried: I have built the...
27 Aug 2020 by Gen1us2k
Choose how to build your own solution for implementing Audio/Video Calls using WebRTC
16 Aug 2020 by Michael Haephrati
Desktop application that can be used to convert from and to various audio formats, such as .mp3, .m4a and .wav
29 Jul 2020 by doughuff
Is it possible for software/hardware to "hear" a certain sound and then perform an action (text alert) ? The prototype I am trying to develop is a little more detailed than this, but the description I gave here is simplified in order trouble...
29 Jul 2020 by Gerry Schmitz
C# sound detection: (You didn't specify a platform) audio - Clap sound detection in C# - Stack Overflow[^]
29 Jul 2020 by CHill60
Have a look at something like the Arduino - here are some sample audio projects[^] Similar alternatives ... Quote: Raspberry Pi, BeagleBone, Sharks Cove, Minnowboard MAX, Nanode, Waspmote or LittleBits are some of the most interesting...
14 Jul 2020 by honey the codewitch
Continuing our series with a knob control and a MIDI visualizer
6 Jul 2020 by honey the codewitch
Provides a complete managed API for working with MIDI files, sequences and devices
27 Jun 2020 by Zero3K
I have compiled the AC97 driver found at msdn-code-gallery-microsoft/Official Windows Driver Kit Sample/Windows Driver Kit (WDK) 8.1 Samples/[C++]-windows-driver-kit-81-cpp/WDK 8.1 C++ Samples/AC97 Driver Sample/C++/driver at master ·...
27 Jun 2020 by KarstenK
Your question is unspecific, you must analyze what works and what not. Double check it, that your code is running under a standard windows. WS 2003 is some exotic windows and may have some limitations or flaws. Best is to test under Windows 10. ...
27 Jun 2020 by honey the codewitch
Extensive performance and API improvements for streaming MIDI and more
23 Jun 2020 by Ciumac Sergiu
Explains sound fingerprinting algorithm, with a practical example of detecting duplicate files on the user's local drive.
19 Jun 2020 by Jo Aqra
I'm trying stream live audio to a wide range of clients in a web browser. My current solution : Dotnet core 3.1 console application -receive the audio data over UDP -trimming the first 28 bytes of each received packet -and send the processed...
9 Jun 2020 by After2050
How to create and play sounds in HTML5
25 May 2020 by Member 14840761
I'm new to this field - but I need to perform a MIDI-to-Wav conversion in C++.Is there a way to know what exactly are the steps involved in MIDI-to-Wav conversion?? I have no idea as of how to start .I cannot find solid sources or research paper...
25 May 2020 by Greg Utas
A .wav file is something you can listen to directly, whereas a MIDI file is more like sheet music. A MIDI file must therefore be performed to generate a .wav file. There are lots of MIDI applications which do this, from external synthesizers to...
24 May 2020 by Richard MacCutchan
Here are a couple of useful references on MIDI files: Standard MIDI file format, updated[^] and Skytopia: Crash course on the standard MIDI specification (SMF)[^].
16 May 2020 by OriginalGriff
Monitor the MediaPlayer for when the audio track ends: then start it again. Repeat as many times as you need. This may help: MediaPlayer.MediaEnded Event (Windows.Media.Playback) - Windows UWP applications | Microsoft Docs[^]
16 May 2020 by Member 12618031
I use the MediaPlayer in my program. internal MediaPlayer player = new MediaPlayer(); List MP3FilesNames = Directory.GetFiles(@"Audio Files", "*.mp3").ToList(); for (i = 0; i
7 Apr 2020 by Member 11380736
Roman Ginzburg has created a great VLC API in c# called nVLC. I'm able to use it for playing audio and video, but I can't figure out how to setup VLC's VLM server with it. I know how to setup VLC's VLM server by installing VLC and running cmd...
3 Apr 2020 by siliconvideo
A class to convert fixed point numbers to/from doubles
26 Mar 2020 by honey the codewitch
An in depth guide on doing advanced MIDI things. Includes a demo Drum step sequencer and file slicer
22 Mar 2020 by honey the codewitch
Slice sections out of a MIDI file, and stretch or compress playback time using this simple utility. Or use the Midi Library to build your own MIDI apps
17 Jan 2020 by Patrice T
Quote: How java bytestream works? In a stream, a byte is the smallest chunk of data you can handle because it is how computer works. You can consider that a byte is like a digit (for computer), just like for us, a digit is 0-9 for us. A bytestream have no idea of the meaning of bytes or their...
17 Jan 2020 by 49R
How raw data is divided into bytes. As present audio contains 32bit(2^32 tones) it ranges from 2^0 - 2^32. ex -> 6710497.. (Considering decimal) how is it divided to 67 104 97 Does FileInputStream has a method to check like if(671>256){send 67 , next append 1} What I have tried: ...
17 Jan 2020 by Richard MacCutchan
Any file, or data, is just a stream of bits. In general it is convenient to handle the stream as a collection 8-bit bytes. However the bytes are often grouped together to make different types of information (int, double, string etc.). The key is that you need to know the structure of the data in...
12 Jan 2020 by SvenMe
OK, here's the solution. Maybe it is helpful for anybody who's trying to achieve the same with C#. In my solution I'm gonna use the IAudioClient instead of IAudioSessionManager. I don't know whether it will work for the session manager, too - I didn't try but I guess so. I managed to get it...
30 Oct 2019 by Dave Kreskowiak
This is only possible if the player you have in your page supports muting the audio from javascript code. I don't know of any myself. But, there's a reason why NOBODY worth their weight has sound on their web pages when they load. It's annoying and makes people hit "close tab" faster than they...
30 Oct 2019 by datadrvn
Hi All, My first post here... :-) I'm fairly new to web development and I've just been tasked this and I don't know where to start. I would like to embedded a video into the homepage of a website. When people visit they see the video (with audio) once, then the video loops (and the audio...
5 Jul 2019 by Pauliss
Hello! I'd like to get a default audio device id through WinAPI with C#. I wish to save this ID (and volume also) for restoring it in the future in WinServer2012 and Windows8. As I googled it is possible with the following WinAPI function: [DllImport("winmm.dll")] static extern uint...
12 May 2019 by Ecox94
I am doing a thesis that involves making an app that listens to background noise and detects high energy dog barks. I have used the following code to store samples of the wav file into an array buffer. public static void main(String[] args) throws IOException { File file = new...
12 May 2019 by enhzflep
Well, you'd just do it the same way you'd do it with any other language. Namely, you calculate the square of the magnitude of each sample, add these squares all together, divide by the number of samples and then take the square-root of it. To say it another way, this code computes this value...
12 May 2019 by Gerry Schmitz
Play the file through a pair of speakers and measure the voltage and amperage. Measuring amplifier output power[^] https://itstillworks.com/determine-speaker-rms-12106808.html[^]
26 Feb 2019 by IAmJoshChang
How to add magnet audio effects
29 Jan 2019 by Richard MacCutchan
www.google.com[^].
29 Jan 2019 by Jade12345
people, i m looking for a library i can use in my.net application that can convert a sound file or a microphone feed to notes which i can represent digitally. for example to have someone whistle a tune, my application will transfer it to the library as a stream and the library will return an...
11 Dec 2018 by SuperMiQi
Hello everyone, I wonder if somabody could point me a good example using the to handle 24 bits per sample data stream ? Apparently WAVEFORMATEXTENSIBLE is needed to get more information about the audio hardware. It seems from what I have read waveInxx methods are limited to 16 bit. ...
11 Dec 2018 by SuperMiQi
Hello Everyone, I have implemented a sample app based on the inputs found on the following github example: Csharp-Data-Visualization/projects/18-09-19_microphone_FFT_revisited at master · swharden/Csharp-Data-Visualization · GitHub[] Thanks again for your feedback.
10 Dec 2018 by RickZeeland
This library on GitHub supports 24 bits audio recording: GitHub - kmatheussen/jack_capture: A program for recording soundfiles with jack[^] jack_capture [--bitdepth n] [--channels n] [--port port] [filename] [ -b n] [ -c n] [ -p port] "bitdepth" is by default...
8 Dec 2018 by CalicoSkies
Mixing audio from multiple WAV files to a single WAV file. Includes a C++ class for reading and writing WAV audio files, derived from an AudioFile class for future support of other audio file formats.
26 Oct 2018 by Rick York
I agree with MadMyche's answer. I would add to that - first find a MIDI library that looks good to you. There are a few of them here. If OS portability is really important to you then you need to find a MIDI library that is also portable. That could prove to be challenging but I don't know...
26 Oct 2018 by cassanelligiovanni
Hi, I'm a programming student and in these last years I touched various programming languages : C++, Java, Javascript, Python. For my third year project I was planning to develop a Music Loop Software that acquire up to 8 inputs from an external audio interface and loop them in different...
26 Oct 2018 by MadMyche
There really is no right answer for you on this, as it is primarily opinion based as well as the users comfortability within the various languages. The only thing that you can eliminate from the list is JavaScript which is mostly limited to a browser. There are GIT/NuGet packages for just...
18 Sep 2018 by Member 13989987
You should use this method for your problem. @RequiresApi(api = Build.VERSION_CODES.M) public void getPermissionToRecordAudio() { // 1) Use the support library version ContextCompat.checkSelfPermission(...) to avoid // checking the build version since...
18 Sep 2018 by prafull agrawal
I am working on an android app in which I want to record user voice in wav format and do processing on it. I want sample rate of 22050Hz and 16 bit signed format with mono channel. I got some code by searching on google and integrated the same in my app but as I run my app it gives me 3...
2 May 2018 by Mr.htun
I'm a new to Audio Fingerprint Extraction. I need the help to implement Philips Robust Hashing (PRH) Algorithm by C#. It was published as "A Highly Robust Audio Fingerprinting System" by Haitsma et al. What I have tried: But I can not understand fully steps to extract 32-bit fingerprints....
19 Feb 2018 by brenntengel@yahoo.fr
i've been looking for months now to find out how to record a live audio stream using swift ? please give me a hint a small code to start . regards What I have tried: This code is in java i want the same in Swift please while ((bufferLength = inputStream.read(buffer)) > 0 ...
6 Feb 2018 by Richard MacCutchan
octave spectrum - Google Search[^]
12 Jan 2018 by Member 13616601
Of course, because of the Shannon-Nyquist theorem, you'd have to compare at least two detected frequencies next to each other and only leave the one with the loudest tone in. Maybe run an iteration over it beforehand and erase the more silent tones next to each other. You could probably even...
10 Jan 2018 by RandSirpi
Hello,I try to find a method in C/C++ or C# to detect a sound (DTMF code) from a microphone in Windows. Currently, I can not find a simple method (FFT off and acoustic fingerprint) to know what is a DTMF sound. Would you know if there are libraries (with examples to understand) or an...
21 Dec 2017 by jacobi1
Hi, I'm a new programmer and I'm looking for some help.Here is my problem. I need to detect peaks in a live audio from a pickup microphone and output the exact time to milliseconds or preferably nanoseconds of the peak in a .txt file.I have been looking at two possible solutions. The...
21 Dec 2017 by Member 7930640
Here is an example using the Accord.net framework: https://github.com/accord-net/framework/wiki/Sample-applications#audio-beat-detector
4 Dec 2017 by KotsanisNakos
Hi, I'm using javazoom library to achive mp3 play at NetBeans... So far i wrote this code... Anyone know why this isn't working?? What I have tried: //main class import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileInputStream; import...
4 Dec 2017 by Jochen Arndt
Upon each action you are creating a new PausablePlayer instance. If you have started playing and activate then another button, that will use the new instance and not the one that has been used to start playing. You have to use a single global PausablePlayer instance instead (like your...
23 Nov 2017 by KotsanisNakos
I want to convert stereo wav into frequency and save them into a txt. The idea is that i have to load the wav, reading it and finally save the frequencies in my computer as a txt. For example 0:00 min 50HZ 0:01 min 57HZ .... 1:10 min 450HZ I...
23 Nov 2017 by Kenneth Haugland
This is quite a complex task you are setting out to do, and you have still not explained in exact detail what you want. So my advice to you is to implement an FFT algorithm that you know works, then try and implement the code you want. If you get stuck you can improve your question. But you...
12 Oct 2017 by nmeri17
I'm trying to add the following sound effects to some audio files, then grab their audio buffers and convert to .mp3 format - Fade-out the first track - Fade in the following tracks - A background track (and make it background by giving it a small gain node) - Another track that...
9 Oct 2017 by Member 13455482
I want too play two audio files using php First file should play first and when it stops the second one should start playing .I have the following code but the PROBLEM is both are getting played simultaneously and its really getting mixed up plz help What I have tried: ?php $y=2; $z=3;...
3 Aug 2017 by Mehdi Gholam
Start here : javascript - HTML5 record audio to file - Stack Overflow[^]
1 Aug 2017 by kazz199
i am working on a project in which i need to get the fundamental frequncies of the audio input of microphone. I want to get frequency in every 0.1s while audio is input throught microphone. how to do this using c#.net using libraris such as naudio.? i did some research but implementing this...
1 Aug 2017 by RickZeeland
Maybe you can try to contact Christian Woltering, the author of this CodeProject article: Comparison of FFT implementations for .NET[^]
5 Jul 2017 by prashanthv
Hi , I have a report which shows our unassigned support tickets Q. We have used table to display the data. Now i need to play some Sound/audio in same report. When audio should Play .. Report will be refreshed automatically every 60 Sec, If reports pulls any data to table then sound should...
5 Jul 2017 by Dave Kreskowiak
SSRS cannot play sounds, that's not it's job. Since the report is just HTML, you can embed javascript in the report to play the sound. Something like this example[^] that displays an alert box.
24 May 2017 by Pratik Prajapati
I'm converting MPMediaItem to NSData using below code, when I'm playing a song using NSData in Bluetooth speakers song not making clear sound. Its like this code may reduce song quality when converting to NSData. So my question is how I maintain high quality song or any other way to get high...
22 May 2017 by Member 12464144
I have a sound file with the extension wav. I got the amplitude values of this file. Then I generated values of Mexican hat wavelet using y = (1-t*t)*exp(-1*t*t/2). Now I need to get the spectrum of this audio file. How to do this. Here is my code What I have tried: #include ...
22 May 2017 by Rick York
The usual technique for obtaining the spectrum of a signal to use a Fourier transform, most often the FFT. There is one example program at this page[^]. By the way, you might prefer to include math.h with the macro _USE_MATH_DEFINES defined. That file has definitions of most common...
18 Apr 2017 by Atakutabrak
I build project with video Imports Microsoft.DirectX.AudioVideoPlayback when developing I can play video why in the client video cannot played? I get this error in client: "Unhandled exception has occurred in your application. If you click Continue. the application will ignore this error and...
17 Mar 2017 by Dave Kreskowiak
Since we know NOTHING AT ALL about the code you're using you have no choice but to ask the people you got the code from about any problems you're having with it.
6 Mar 2017 by Member 12910589
Someone please explain what does this code do ... i m working on audio steganography for(i=24, j=0; i>=0; i-=8, j++) { tempInt= inputFileSize; tempInt>>= i; tempInt&= 0x000000FF; tempByte[j]= (byte) tempInt; }What I have tried:why the loop starts from 24??.
6 Mar 2017 by Patrice T
When you don't understand what your code is doing or why it does what it does, the answer is debugger.Use the debugger to see what your code is doing. Just set a breakpoint and see your code performing, the debugger allow you to execute lines 1 by 1 and to inspect variables as it execute, it...
5 Mar 2017 by Jochen Arndt
The code is splitting the 32-bit number inputFileSize into 4 bytes stored to tempByte[] in reverse order. It is similar totempByte[0] = (inputFileSize >> 24) & 0xff;tempByte[1] = (inputFileSize >> 16) & 0xff;tempByte[2] = (inputFileSize >> 8) & 0xff;tempByte[3] = inputFileSize &...
30 Nov 2016 by Charly LEE
the input mp3 is single channel with 32000 sample rate, 16bit signed.I am using ffmpeg 2.6 to decode mp3 on ios9.3.2 pad. It get white noise only. but it works on windows.I record the decoded PCM to file and use tool to play it. when I changed the bit set to 32. I can hear the original sound...
30 Nov 2016 by KarstenK
the solution looks really simple. AVPacket avpkt; av_init_packet(&avpkt); // set values AFTER init avpkt.data = encode_packet->data; avpkt.size = encode_packet->data_length;I am a bit confused that your old code works on Windows. But I know that the Objective-C runtime...
10 Nov 2016 by Member 1898210
Hi all,I'm having issues with achieving something I'm sure you guys can assist.I'm trying to iterate over a Wave file and process 20ms of the audio data each time. However, I'm getting confused with the bytes arrays and conversions and I'd be grateful if someone can assist on this with...
10 Nov 2016 by Bernhard Hiller
I think Buffer.BlockCopy copies bytes, not shorts. Since you use 16bit samples, you have to copy twice as much bytes.
9 Nov 2016 by Richard MacCutchan
You are using Buffer.BlockCopy to copy from data to sampleBuffer, and then from shortBuffer to InpBuf. But you never put any data into shortBuffer. Your code is quite confusing with all those different buffers. All you really need is one in which to read the data. You can then process specific...
10 Oct 2016 by Member 12768963
As a solution I've added a onmouseover function on the body that triggers only once and that way the sound plays on mobile devices..