I've tried looking up how I might go about this for a while now, and maybe I am using the wrong terminology in my searches or it's way too advanced for me. I basically want to be able to analyze audio files in real-time. I know hardly anything about audio processing so I should probably start small and work my way up. Eventually I'd like to be able to display a power (or frequency?) spectrum correlating to audio playing in real time. Basically like the WinAmp spectogram (terminology?)
Any online tutorials with perhaps an API suggestion or two would be greatly appreciated. I've found some vague explanations (mostly dealing with calculating FFT's then converting them to something...) Like I said, I know little of audio processing, so knowing where to start would be great.
Language of choice: C++
You could look into VST plugins as a starting point for the theory behind audio processing. There's a blog with some tutorials in c++ here.
You can also check out other SO questions on VST plugins for more info.
I believe audacity can run VST plugins, I'll look at that.
EDIT: Audacity doesn't support them out of the box, but you can enable it. You could download a trial of something like ableton live too.
I'd recommend using a graphical tool to begin with to prototype some ideas. Try Puredata or something similar.
http://puredata.info/
Juce is a fantastic way to get to grips with C++ with an Audio slant.
http://www.rawmaterialsoftware.com/juce.php
I've also stumbled across UGen which might help you get up and running without having to understand too much of the sample-by-sample processing theory. I've not looked at this much yet but it looks interesting at the outset.
http://code.google.com/p/ugen/
The KVR forums are full of knowledgable people who will help and direct newcomers to audio and plugin development.
http://www.kvraudio.com/
If you're feeling brave the dive in to a good book. I've heard a lot of good things about the following:
http://www.amazon.com/DAFX-Digital-Udo-246-lzer/dp/0471490784
Good luck! This is not an easy area to get going in!
(PS, the blog linked in the above answer is mine -> it's out of date and wont help you actually do any signal processing)
Related
Or even better, how to get the size of the amplitude or the volume of the wave sound every certain time.
In fact I need the two ways, the full waveform and measure it each time. the first one for have a view of the song wave and the second one for visual effects.
this is for Android (NDK) systems.
come on people, I don't ask for the full code answer, I just want you to tell me some advices or something that can help me. You can simply say that the question is hard or makes no sense. but say something.
Whatever, I researched a little bit and I didn't find the answer for the question, but I did find a better solution for the problem, and is a free library named "superpowered", simple, fast, cross-platform, and has all the functions for analize sounds.
hope this help people new to this world of sound programming
Here is what i like to achieve:
I like to play around in creating "new" software / hardware instruments.
Sound processing and creation is always managed by software. But one could play the instrument via ultrasonic distance sensor for example. Another idea is to start playback when someone interrupts the light of a photoelectric barrier and so on....
So the instrument would play common sounds, but has to be used in an unusal way. For example, the ultrasonic instrument would play a sound if it detects something in a certain distance. The sound could be manipiulated in pitch for example if the distance gets smaller.
Basically i like to playback a sound sample and manipualte this in realtime.
I guess i have to use WAV samples for this, right? And which programming language do you think fits best for this task?
Edited after kevins hint: please kick me into the right direction - give me a hint where to start.
Thanks in advance
Since you're using the the Processing tag, you can try Processing.
It comes with a sound library like Minim or you can install beads which is great. There's actually a nice book on it: Sonifying Processing
You might find SuperColider fun as well.
The main thing is what are you comfortable with at the moment ?
If Processing syntax looks intimidating, you can actually try a different programming paradigm like data flow. In which case you can use PureData(free, opensource) or MaxMSP(very similar, but commercial). The idea is rather than typing instructions, you connect boxes with wires which is fun and the examples are great too.
If you're into c++ there are plenty of libraries. On the creative side, there's a nice set of libraries called OpenFrameworks that's easy and fun to use. If this is your cup of tea, have a peek at Maximilian.
Bottomline is: there are multiple options to achieve the same task. Choose the best tool for your (based on your background) or try each and see what you like best.
You asked "And which programming language do you think fits best for this task?" - I would also suggest using Processing. I have been used Processing to work with sounds previously. And in all cases I used Minim. It has many UgenS to generate sounds programmatically.
Also, you wants to integrate with some sensors. I'm not sure what types of sensors you will use, but Processing goes pretty well with different Arduino modules and sensors. Check this link for more direction.
Furthermore, you can export your project as .exe or executable .jar files. And their JS version (P5.js) works almost the same as the Java version.
I want to start on a hobby project that focuses on displaying audio files in a folder in a certain fashion and has the ability to play such an audio file and shows basic control options for playing. However, i'm struggling to find a fit programming language for this.
The displaying part shouldn't be too hard and can probably be done in most of the programming languages. The audio part is what concerns me the most since it's not the main focus of the project and should only do limited things (so it shouldn't be too hard) and i do not know anything about sound support in the programming languages i currently know. (Java, C and C++)
Specifically i would like to be able to do these things:
Play a sound file
Stop/pause a playing song
Adjust volume
Show a bar that displays the current position in the song
Most files will be .mp3 files but being able to process other formats is certainly a plus. Since this is just a small project it's ok if it runs just on Windows. Scalabilty would be nice but not required.
It would be nice to have a small overview of audio support/audio libraries of programming languages (i'm always up for something new) that can accomplish these simple things, in a not too complicated way, aswell as personal experiences.
In this way i hope to create a better understanding of which programming language fits my project best. (i would very much like to not have to change language mid-way the project)
--
Edit:
This is only for a later stage of the project if the first part was successfull: i will want to change the file names of the audio files that are displayed. (to make them follow a specific format)
I haven't written audio processing programs much, but I know a lot of them exist for C and C++. For Java perhaps, too, but I don't know Java. I had used audio with SDL in a game, but that doesn't have that many features and I don't recommend it.
There's this question asking for a library in C, and there are a couple of similar questions that SO brings up on the side. You may want to take a look at those.
You would also need to look for a library that loads different file types. SDL at least, only opens .wav files, which I believe most of the playback libraries would support. For MP3, you will most likely need an additional library. I know Audacity uses LAME Mp3 so I'm guessing that should be good.
Some of the functionalities you want is also doable by yourself. For example, knowing the length of the music and the amount you have already read, you will know how far in the audio you are. Adjusting the volume is also a multiplication (in the simplest case) that you can do on the audio data if the library doesn't provide it.
A very good choice seems to be PortAudio which is used by Audacity, and also recommended in the accepted answer of the question I mentioned above.
I've done audio apps in both Java and C++. Java development goes way faster because it's a more powerful language and has garbage collection, but JavaSound is a pretty awful solution for audio. Of course, there are wrappers for FFMPEG and other stuff, so you can get a lot of things working. Here's an example of a Java audio app: http://www.indabamusic.com/help/mantis
OTOH, C++ gives you lots of control, low latency and wealth of libraries. (another answer mentioned Portaudio, which is, indeed, great.) But you will definitely find it also has a much longer development cycle.
You can certainly do everything you want to do with either language.
I am looking for some advice on categorizing a library of sound effects. I have a large set of random sound effects, (think whistles, pops, growls, creaks, gunshots etc). I would like to be able to take a growl for example, and find the next growl that sounds the closest to the original.
Given a sound, what sound from my set sounds the closest to it.
I have done a fair amount of googling and have found two avenues that I am still researching. One is using echonest, although their "best match" support looks not promising for public users. The other option is diving into FFT and building my own matching algorithm. This is a fine option and would be a great learning experience but I wanted to get some opinions from others who might know a little more about sound processing; especially short clips .5sec - 3sec range, not full length music.
Thanks!
I have worked in movie postproduction for years and as far as I know, there is no way to do that automatically. Every file has meta information in its file header which describes what the sound is like. You are then actually not searching for the file names but in the meta string.
I don't think that it is trivial to sort effects programmatically as two effects that sound similar might be totally different if you look at the waveform.
You would need to extract significant information about a sound that you can then compare.
I am also not a DSP expert, maybe there are methods to do this
If you're interested in trying to build your own system to do this, I can suggest a few keywords that might help to refine your Google searches. In the academic research community, the task you're describing is often called "content-based audio searching". I know there's been a lot of work done on it, and though most pertains to music, sound effects have definitely been the focus of a number of studies.
You might want to start with the work of Pedro Cano.
Also, I recently heard about a company that's doing similar work. You might want to check out products from Imagine Research.
Those are just a couple of ideas off the top of my head. I'm not %100 sure they'll be helpful. If they are, please let me know!
I am new to android and game developing too.
I wanna try my luck in game development.
The only thing is struggling is Graphics and sounds.
I've played many games with awesome graphics like angry birds for example.
So, my question is how to design graphics like those and how do game developers get sounds for the games.
Can you suggest me any place for free sounds for commercial use
Thank you.
This is probably slightly off topic for stackoverflow (I think there's another board for game dev, not sure).
But that aside, my $0.02:
If you're doing game development and focused solely on the programming, then I would suggest finding a partner that can do some or all of the things you're not comfortable with doing yourself. Honestly, you could try making some graphics yourself in GIMP or Photoshop and using Audacity to make your own sound effects, but they probably won't be as polished as if you can find someone experienced with that to do it for you. You can also try to find free sounds/graphics on the internet, but if it's anything specialized you're trying to make, you probably won't find anything suited to what you're doing, at least not without much trepidation. Also, if you're really serious about making some games, and you want to get some assets of high quality, expect to pay a little money to get a graphic designer or sound engineer to make something nice for your project.
As far as where to find such a person. Well, this is where I get a little hazy, there's probably better places to look, but one which I'm aware of is this site:
http://www.moddb.com/jobs
You can post ads for people to work on various aspects of games, so you could find someone that specializes in the skills you're looking for. People on that site may do so for free, too.
Good luck!