0

I want to make a website with some interactive parts which should process audio in a more or less simple way. (For now, I just want to filter audio with a LPF)

Since there are so many possible ways out there to make interaction happening on the web (JScript, HTML5,...), I wanted to ask you, what is a good way to process audio. Here are some facts about what I want to do:

  • the audio file is located on the server, no audio from the client
  • it doesn't have to support every browser, it's OK when it doesn't run on IE or Opera for now (but i rather take full support for the latest Versions) ;)
  • some parameters of the algorithm (for example cuttoff frequency) have to be controlled by the client (I can't just process the audio Input in one run or seconds before playing it)
  • I know I could make it with java applets but I want to get around the whole "agree to use java"-thing. (If the browser is sceptical towards java)
  • last thing: I would like to use HTML / JS and so on for the interface (which would be like 1 or 2 sliders)

I think that is all i can think of. What language / techniques would work the best? Thank you.

ruhig brauner
  • 943
  • 1
  • 13
  • 35

2 Answers2

1

If you don't want to put too many work on the server, you can do the audio processing on the client using something like http://audiolibjs.org/

You should see this http://kindohm.github.io/audiolibjs-intro there are some demos.

If you want to process on the server, I think that you need a powerful machine to process audio from many clients at a time.

On the other hand, doing work on the client slows down the client, so it would be better to do it on the server, but then again, you need a powerful server if you are going to have many clients.

For the server, if you are using PHP (to say some lang) you can refer to other questions as this sound library for php developement

Community
  • 1
  • 1
jperelli
  • 6,988
  • 5
  • 50
  • 85
  • Hi, I propably will let the client do the processing since the server is more or less just a website-host. But the link to the js Toolkit looks very prommising, thank you. :) This actually looks so cool that I actually think about programming a complete syntesizer. :) – ruhig brauner Nov 02 '13 at 23:04
  • I'm glad to help. Also, welcome to stackoverflow, please consider to vote up and/or accept the answer. Is the way to give thanks in stackoverflow :) – jperelli Nov 02 '13 at 23:38
  • 1
    I can't vote up stuff yet. :( I started reading into audiolib and I don't realy know what to do. Do I actually have to install stuff on the server to run the scripts or is it enough to have the .js on the web page? – ruhig brauner Nov 02 '13 at 23:42
  • Look at the code in this demo, you need to include the js library and the audio files, then you can use the audio functions http://kindohm.github.io/audiolibjs-intro/demos/samples.html – jperelli Nov 02 '13 at 23:50
  • and here you have a lpf example http://kindohm.github.io/audiolibjs-intro/demos/effects.html – jperelli Nov 02 '13 at 23:56
  • Ah, ok. It works :) It's a bit late for today here but I think I know what I am going to do tomorrow. ;) – ruhig brauner Nov 03 '13 at 00:02
  • Hey, I played around with it today and have another question: Is there a way to change specific values of some elements? For example changing the amount of an automation without reinitialising the automation? Or changing the frequency of an osc without using (append...) again? In general: Is there a list of important member varibles? – ruhig brauner Nov 04 '13 at 16:46
  • Please, create another question in stackoverflow to answer that, because here in comments we have no enough room – jperelli Nov 04 '13 at 16:50
  • I added an example of what I want to do. :) http://stackoverflow.com/questions/19773237/audiolib-js-changing-values-of-existing-objects – ruhig brauner Nov 04 '13 at 17:17
0

For your requirements I'd choose C# and Silverlight (the browser plugin is supported on both Windows and MacOS). You'll get much better performance out of the compiled .NET code, compared to the JavaScript.

Unfortunately, Silverlight only provides very low-level API (MediaStreamSource abstract class), you’ll spend some time learning that. Also, you won’t be able to hook after the system-provided media decoders, the only destination system-provided decoders can use is speakers. Therefore, your source audio data should be in some C# friendly format: you’ll be OK reading e.g. PCM inside WAV, but not HE-AAC inside M4A.

Here’s a demo, and here’s some source code.

Soonts
  • 20,079
  • 9
  • 57
  • 130