Resources for audio DSP beginners? [closed] - audio

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am interested in audio DSP programming, but not in any specific language. I seem to recall a website that had recipes for common DSP application (compressors, limiters, et cetera), but I can't seem to find it in my bookmarks or via Google.... does anyone here know of such a place?
Short of that, I am not very mathematically literate but I have a strong sense for algorithms and logic, as well as working knowledge of a few different languages. What are some good resources for the beginning DSP programmer?
Thanks
Tom

Was the website www.MusicDSP.org?
This question: Recommended books for developing audio/music applications? lists a few books which may be relevant to you.

I'm going to suggest The Audio Programming Book from MIT Press. Lots of recipes and example code.

For general signal processing I'd recommend MatLab. MatLab has the libraries you need, good documentation and it was basically designed for this sort of thing. Now, I've not used it for audio signal processing, just sensor data and some data mining, but I think it's a good start to getting used to stuff like Fourier Transforms + various filters/windows.
Here's the MatLab documentation for the discrete fourier transform- really good:
http://www.mathworks.com/help/techdoc/ref/fft.html;jsessionid=x9xhNglGm1DdQNTBzyhj8DGb50QVnvCGxf3KmvM3xbnPlMbxGBQT!-779685318

If you are looking for:
1. programming languages: I would recommend MATLAB or Octave. Octave is free, and almost the same as MATLab in every respect. If you are going to be using MATLab, you can take a look at the MATLab exchange. The site contains good examples of code for solving good problems, audio DSP and otherwise.
Books: A good book to begin in DSP theory is the one by Proakis and Manolakis. Also, for a breezy tutorial to DSP, the Scientist and Engineer's Guide to DSP is one of the best. You can download the book for free and in some parts it is actually like reading a novel. Gets you upto speed with most issues that you might face in dsp and does so very intuitively with little Math.
Applications: There are tons of applications out there! And with the increasing power, processing and otherwise, of smartphones and the like, intensive DSP calculations that were once the preserve of very powerful computers are now being done on the device itself. Once you are proficient enough, you may even consider contributing to different open-source projects.

Adapted from: Where can I find good tutorials on writing audio DSP filters (lowpass, etc)?
A good filter cookbook is http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
I also recommend getting Lyon's Understanding Digital Signal Processing. I am a bit biased, though, since I was a reviewer for the second edition (but I think a third edition came out recently).
Also check out Digital Audio Signal Processing and DAFX:Digital Audio Effects, both by Udo Zölzer.

Making Audio Plugins gives a very gentle start without too much DSP math.
The tutorials start from the very beginning and show how to create this synthesizer:

There's a lot of stuff for Python in music, although most of them don't emphasize DSP. Also, some parts of the language standard lib such as the itertools can be handy.
Implementing algorithms such as the ones declared that aren't part of the packages there (e.g. a limiter, a compressor) might be easier when thinking on Python iterables instead of taking care of segregating the sample-based and block-base approach manually, and that makes it easier to make the algorithm used in real time directly. AudioLazy is a Python DSP package made to have a simple API, maybe it'll help as basic structures such as Z-Transform filters are done directly by their equation, and any Python iterable can be used as audio. Perhaps seeing its code can be helpful, as well. (Disclosure: I'm the author of this package)
About a book, I like the DAFx, which is extremely practical and audio-oriented. You might consider implementing the algorithms on there (the MATLAB code) in Python.
For a more solid knowledge on DSP, you should read the book "Discrete-Time Signal Processing", by Oppenheim and Schafer.

Related

audio tool development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm in the need for some competent suggestions about where to start with audio tool development. I've been in graphics programming for several years now and thought it would be a refreshing experience to expand my knowledge in a completely other direction.
Where do you see a good starting point for a newbie like me? For the beginning, some lines of code producing cacophonous sounds would make me happy already. What audio API would you recommend when aiming for cross platform support? What do I've to consider generally?
I most likely missed to give you important information to make my intentions clear, so just ask!
Thanks in advance! :)
You don't mention any specific languages, but in any case I'd suggest trying out some higher level exploratory tools for analysis/synthesis first. If you want to explore synthesis, oscillators, filters etc then you could try something like SynthMaker. If you want to experiment with audio analysis then try a tool such as Marsyas. If you want to deal with streaming audio and playlists then take a look at the Echo Nest API. Once you've explored these higher level tools then it'll give you a starting point to dive into algorithms. Given that you have a background in graphics then much of the signal processing and filtering aspects should be familiar to you.
Graphics requires you know a lot about geometric projection, rendering, textures, etc.
Audio requires you know a lot about signal generators, filters, etc. [I'm clearly not an expert]. But like the graphics stuff, reading a good book the basics of signal processing would probably help you a lot. Also, like graphics, getting somebody else's tool is pretty good and playing with to understand what they think the problem is and what kinds of things they can do makes sense.
Then, and only then, would I attempt to code something.
A good place do discuss audio processing and programming is the dsp and plugin development forum at the KVR audio website. Virtual instruments and plugins are a great way to experiment with audio programming, because the audio i/o is generally handled by host software. This would let you get making noise quickly. The skills learnt making plugins transfer to other audio applications well.
Assuming you're very comfortable with c I think the best place to start would be C Sounds http://www.csounds.com/ It's a cross platform audio processing environment suitable for any number of audio tasks including algorithmic composition.
Making Audio Plugins gives a very gentle start without too much DSP math.
The tutorials start from the very beginning and show how to create a synthesizer. The framework used is cross-platform (Win/Mac) and compiles to a standalone application as well as all major plugin formats.
In case someone new stumbles upon this question and likes to use Python, try using Nsound:
$ pip install nsound
An intro video here.
You don't mention a language. I have been doing audio development in Java, making use of core language functions and javax.sound.sampled library. For "real world" tools, probably C is a bit better. But there are uses in Java, e.g., gaming. If you'd like to see what a bit of what I've done, there are two links to check out:
home site web apps
demos for audio library work-in-progress
This is mostly if you want to roll your own. There is a LOT you can do without getting into heavy duty DSP like filters. You can still play with effects like echo, chorus, flanging, FM synthesis, wave-table synthesis, all sorts of mixing.
If you want to use libraries, I think good ones to try are Processing, PD, CSound, a couple more I'm having trouble remembering.
Also, maybe check out Praxis-live for live-coding audio.

Good source to learn how about virus and other security tools? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Anti-virus, malware, botnets and the like are becoming larger and larger parts of our daily lives. Are there any resources that discuss creating anti-virus tools, security tools and such? Seems like an interesting topic, but I have not been able to find any real source to refer to in order to learn more.
Suggestions? (Good and bad?)
I assume most languages used for this are C++ or assembly? Or are there others that work well for these sort of items?
Alex's suggestion of Bruce Schneier's work is excellent, and everyone should read his stuff, but probably won't address what you're talking about. Even so, you should read it. He's the clearest writer on security topics today, and a voice of sanity in an often hysterical industry.
A free place to start for the bare bones is the SANS reading room. It's far from enough, but it's the basics.
I was fairly pleased with The Shellcoder's Handbook. It's a good introduction with some practical code to work with. It shows how real exploits are written, which is the first step in understanding how to protect against them.
Exploit work is done in a variety of things, but for the classic stack-smashing attacks, you need to know C and the assembler of the target platform (generally Intel). C++ is much less common in this world. It's too twisty-turny by the time the compiler gets done with it, and too bloated for the kinds of things needed. Objective-C is almost more useful in my opinion so that you can understand Mac reverse engineering. But that isn't where security is usually done. In this I'm speaking of exploits themselves. Many security tools are of course written in C++.
For the security tools side, you probably want to ask on serverfault. There are many, and the SANS link above should have links to some of the common tools (Nessus, nmap, hping, metasploit and the like). sectools.org maintains a big list that I like.
If you're going to be a security developer, you need a lot of breadth and a lot of depth. You need to understand the network protocols as well as the code that talks to them. You should be reasonably comfortable in languages from assembler to ruby. Much of it is more a way of thinking than an actual skill set, but those who are good at it tend to have broad skills and pick up new things quickly and often.
Since you noted specifically detecting and monitoring for exploits, you should dig into tools like snort (for learning how to detect) and metasploit (for generating the attacks to detect).
go to http://www.milw0rm.com/ to see the exploits.
For a holistic view on security, anything by Bruce Schneier comes highly recommended -- not the threat-specific focus you have in mind, but a background that will make you more effective at security issues in whatever role you play, whatever background you have.
For more specific views, I would recommend this book (and just about every book I've looked at in depth in the same series, but I can't personally vouch for all of them, they're dozens!-).
As well as what Alex Martelli posted, this book might be something you can consider.

High-level programming language for music composition [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I would like to write an interactive song. It would contain state and logic. A listener/user should be able to modify some state vars using a GUI or a MIDI interface. Listener accessible vars don't have to directly represent tempo, pitch or any other music property. They would rather represent values that logic would process in order to make changes to the song.
Do I have to write such platform myself or something fitting my imagination already exists?
Look at cSounds and PureData.
If you are happy to use Java, check out JFugue.
I have tried PureData, CSound and SuperCollider.
CSound is very cumbersome to program in, and has had severe stability issues for my requirements (24bit/96kHz realtime low latency linux) in version 4.
PureData is graphical, which makes it even harder to keep code neat and tidy then with text files. Composing is a pain because you have to build your own composition GUI, which can be powerful, but as long as I'm my only user I find it's just faster to use text.
The winner hands down is SuperCollider, because it is a smalltalk inspired object oriented language which is quite pleasant to work with. It is split into an OSC controlled sound server, and the client language. I can recommend the sound synthesis server and using the language to create instruments without reservation for its excellent stability, great flexibility and incredible power. I've used it live on stage and the performance is incredibly good.
The score creation language suffers from many-hands syndrome; in lack of recent clear leadership there are too many ways to do too many things with too many limitations, but it is still better than CSound because at least you can use reasonable high level structures.
Still looking for a composition language that just gets it right.
Have a look at Strasheela:
It's a composition system based on the programming language Oz. Learning Oz isn't easy, as it it combines the functional and the logic programming paradigm. However if you liked the SICP book, then you will probably like it too.
Strasheela treats music composition as a Constraint Statisfaction Problem (CSP), and seeks "solutions" for it. It means that the music style is defined as mathematical constraints on integer numbers (finite domain), that must be statisfied, and the built-in constraint solving system computes the solutions "automatically".
P.S.: I cannot program in Oz, but I'm on my way of learning it.
See High level languages for Computer Music and Programming Languages used for music for help.
I am not sure if it covers what you are after for, but have a look at Java Sound API. For a FAQ about what it can do see here. The benefits are that is already bundled in the SDK and JRE and that is cross platform. Also, you could build the GUI using any Java toolkit.
If it weren't for the interactive bits, I'd suggest looking at Haskore or Nyquist, both effectively being DSLs for music generation.
Definitely take a look at Alex McLean's livecoding demos, though. It's more flexible and interactive as you can possibly imagine, using SuperCollider through OpenSoundControl.
Answer is for .NET:
I found something, checkout NAudio by Mark Heath, a great .NET music library I would say it should be contained in the BCL.
midi-dot-net is another great C# project by Tom Lokovic.
For music interaction, PureData, Max/MSP and OpenMusic (these two last are from IRCAM) are the best. PureData is freeware. Google them!
I don't really get what you want to do, but here is a list of some CL music software, both for composition and cognition: http://www.cliki.net/Music
You're looking for an Audio Programming Language. Another option you should consider is Processing - used by many artists and musicians for this type of work.
-Adam
Its a shame that none said about Chuck................
Chuck is a programming language that is specifically built for music/audio generation and composition.
You can download Chuck at http://chuck.stanford.edu
its a lot easier to use,and is a lot familiar to c,c++,java etc,however its easier to learn too.You can find at Coursera about chuck for free from California arts university,link here.

Reference material for LabVIEW [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm supposed to learn how to use LabVIEW for my new job, and I'm wondering if anybody can recommend some good books or reference/tutorial web sites.
I'm a senior developer with lots of Java/C#/C++ experience.
I realize that this question is perhaps more vague than is intended on stack overflow, so how about this? Please answer with one book or web site and a brief description. Then people can vote up their favourites.
It will take some training and some time to learn the style needed to develop maintainable code.
Coming from Java/C#/C++, you probably have a good idea of good software architecture. Now you just need to learn the peculiarities of LabView and the common pitfalls.
For the basics, National Instruments offers training courses. See if your new employer can send you to a Basics I/II class to get your feet wet. They offer some online classes as well. Following classes, you can sign up to take tests for certification.
Get an evaluation copy of Labview from National Instruments; they have a well maintained help file that you can dive right into, with example code included. Look at "Getting Started" and "LabVIEW Environment". You should be able to jump right in and become familiar with the dev environment pretty quickly.
LabVIEW, being graphical is nice, but don't throw out your best practices from an application design point of view. It is common to end up with code looking like rainbow sphaghetti, or code that stretches several screens wide. Use subvi's and keep each vi with a specific purpose and function.
The official NI support forums and knowledgebase are probably the best resources out there at the moment.
Unofficial sites like Tutorials in G have a subset of the information found on the official site and documentation, but still may be useful for cross reference if you get stuck.
Edit: Basics I/II are designed to be accessible to users without prior software development experience. Depending on how you feel after using the evaluation version, you may be able to move directly into Intermediate I/II. NI has the course outlines available on their website as well, so you know what you're going to cover in each.
LabVIEW for Everyone is recently revised and quite comprehensive. Other than the free stuff available on the Web, this is probably the best place to start learning the language.
The LabVIEW Style Guide is a great book on how to organize and arrange your code and files for maximum benefit.
Object oriented programming is a recent addition to LabVIEW. The LVOOP white paper explains much about how it works and why the way it is the way it is.
It's a bit out of date, but LabVIEW Advanced Programming Techniques by Bitter, Mohiuddin and Nawrocki is still full of useful stuff.
The National Instruments forums are a great place to go for basic help. The LabVIEW Advanced Virtual Architects (LAVA) is the community forum for advanced topics.
Tutorials in G, also check out the webring.
-Adam
The official NI support page and support forums are hard to beat.
It really helps having a guru around for LabVIEW.
'Arc the daft' pretty much nailed exactly what one should try to do to learn LabVIEW. However, I would not skip Basic's I and II. The classes do teach basic programming concepts and are geared to non-programmers, however they do cover the IDE extensively. The LabVIEW IDE is strange coming from a text based language and spending the time in the class learning it with an instructor can really accelerate your learning.
I would skip Intermediate 1 if you are a seasoned developer. Intermediate 1 tries to teach software engineering practices in the span of a three day course. If you are studying to get your CLD you need to know the course and the terminology for the exam, otherwise I wouldn't spend my time or capital in the course.
Subscribe to the Info-LabVIEW mailing list. It's got a lot quieter in recent times as the NI and LAVA forums have grown in popularity, but it's still read by some very experienced and helpful people, including people at NI, and if you can't find what you need elsewhere then a good question will usually get a good answer.
The NI style guide, as already mentioned, is a good reference - re-read it as you learn about more of the things it covers, it contains some densely packed good advice.
Personal top tips: look at the supplied example code (although it's not necessarily perfect); learn to use queues and notifiers as soon as possible; don't dive in to using event structures and control references until you've figured out what you can and can't do without them; and start small and simple - you should find it easy to reuse this code later on by repackaging it into subVI's as the scope of your ambitions increases. And have fun!
For me the best way to learn LabVIEW was by analyzing the in-build examples. The best forums are NI Developer Zone Community and LAVA Forums
LabVIEW is really easy to work with but the tricky bit is to know how to design your application so that it will not becaome a spaghetti. Once you get the basics (e.g. LabVIEW Introduction Course) learn how to use design patterns, events, queues, typedefs and references. Use modular architecture, avoid big structures, try 'writing' your code in small window.
It is also important to know the differences between LabVIEW versions (full/pro, and ver 7.1.1, 8.2, 8.5, 8.6, 2009), how to use version control system with the vi's (binary files), and how to keep your files in project so that you can easily reuse any code and be "DRY" (don't repeat yourself), how to build executable and what LabVIEW RunTime Engine it needs (for customers), what is DAQmx and how to use it, what are VISA drivers and which version is correct for you settings, how to use Measurements & Automation program..
When I started with LabVIEW a few years ago I was given a link to the LabVIEW Graphical Programming Course. It covers the basics and having a sound knowledge of other programming languages I think helped me pick things up quickly.
I would start with the LabVIEW wiki.
Specifically, LabVIEW Tutorial. There are lots of online references and links to LabVIEW reference books. Welcome to the world of LabVIEW!
I would suggest you start with LabVIEW for Everyone. Its a good book which covers the basics of LabVIEW well.

What are some good resources for learning threaded programming? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
With the rise of multicore CPUs on the desktop, multithreading skills will become a valuable asset for programmers. Can you recommend some good resources (books, tutorials, websites, etc.) for a programmer who is looking to learn about threaded programming?
Take a look at Herb Sutter's "The Free Lunch Is Over" and then his series of articles on Effective Concurrency.
Joseph Albahari wrote a good overview of Threading in C# here:
http://www.albahari.com/threading/
I've honestly never read it myself, but Concurrent Programming in Java is a book I've heard recommended by several people.
http://www.yoda.arachsys.com/csharp/threads/
I write about multithreading and concurrency in C++ on my blog. I'm also writing a book on concurrency in C++: C++ Concurrency in Action.
I've read (most of) Java Concurrency in Practice by Brian Goetz, which is very good.
There is obviously a Java-based theme running through the book (using Java specific implementations of threads, locks etc.), but pretty much all of the principles can be applied to other languages.
The author's home page contains a list of articles he has written, some of which include threading related stuff. Maybe start there and if you like his style, buy the book.
For a great guide and reference for concurrency programming in C# (or .NET in general) I'd recommend the MSDN What Every Dev Must Know About Multithreaded Apps article by Vance Morrison on MSDN. It contains a great deal of best-practice information and caveats about multithread development
I maintain a linkblog for concurrency articles, blogs, and projects at:
http://concurrency.tumblr.com
I usually post a link or two per day on a variety of topics (threads, actors, locking, parallel programming) in a variety of environments (Erlang, Java, Scala, .NET, C++, Ruby, Python, etc).
It's Delphi specific, but no reason why the concept wouldn't apply to any other language!
Multi Threading Tutorial
http://www.cilk.com/multicore-e-book/
That's a nice general overview of the sitution, if you're looking for tuorials and books it might be best to specify a language as a starting point so you can mess around with some code.
The Erlang programming language provides an easy-to-use style of concurrent programming. You may never actually use Erlang, but the concepts are transportable to other languages. You might want to read the book Programming Erlang: Software for a Concurrent World .
Fans of functional programming claim that there is no need to learn anything new. Just use a pure functional language, and the compiler or interpreter will automatically parallelize everything. So you might want to learn Haskell, OCaml, or another functional language.
I don't know what exactly you are looking for, but if you are doing WindowsForms development the following blog post is worth every minute reading:
WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequred
I think Boost.Threads is a great C++ concurrency library to learn, especially if you just want to get started in writing multithreaded applications. The code is very succinct and easy to understand, plus the next C++ standard will likely include a threading library based on Boost.Threads (tutorial: http://www.ddj.com/cpp/184401518)
If you want to have a go at doing a highly parallel version of a simple task, or see real solutions, you could do worse than look at the wide finder project. Basically it's about how to do parallel regex matching of log files efficiently, but trying to add as little code as possible.
Participants have submitted solutions in many different languages and the performance results are posted. The original project has now finished and there is now wide finder 2 taking the work on.
CodingHorror has a good introduction to wide finder.
For a rich, thorough treatment of the subject, with a good balance between computer science and practice, I recommend The Art of Multiprocessor Programming. A lot of examples are in object-oriented code, i.e. Java, with other languages scattered throughout. It just depends on the topic being covered. What I really love about this book is that it discusses how common algorithms should be implemented in a concurrent design. Of course, there's so much more!
For general concepts and a treatment of pthreads, I really like Programming with POSIX Threads. Being the library and API that it is, it's in C.
For Windows and C# developers, check out Joe Duffy's blog. Joe works on parallel libraries, infrastructure, and programming models in Microsoft's Developer Division. He has a book coming in Nov. 2008 titled Concurrent Programming on Windows (Amazon link).
Also, don't miss the Godfather's blog: Herb Sutter's Sutter's Mill. He has links to all his articles in Dr. Dobb's Journal and more. Click his Concurrency category.
CPU manufacturers websites have some interesting content:
http://developer.amd.com/documentation/articles/Pages/default.aspx#parallel
http://software.intel.com/en-us/multi-core
Also Intel's opensource threading library has some good references:
http://www.threadingbuildingblocks.org/
If you work with C#, the book "C# 2008 and 2005 threaded programming", by Gaston C. Hillar - Packt Publishing - http://www.packtpub.com/beginners-guide-for-C-sharp-2008-and-2005-threaded-programming/book , will help you.
Highly recommended for C# programmers, because you can download the code with funny examples that exploit your multicore computer.
The book is a nice guide with a lot of code to practice. It tells stories while it explains the most difficult concepts.

Resources