views:

1185

answers:

3

I've searched the net but didn't found anything interesting. Maybe I'm doing something wrong.

I'm looking for sound synthesis API written on C, C++ or even Objective-C, which can synthesize different types of waves, effects are optional.

+1  A: 

Here's a complete library/toolkit for FM (Frequency Modulation) synthesis:

link1

If you have time to spare... creating simple sound synthesis from scratch is actually a fun endeavor. If you create a small buffer of 256 16 bit samples which represent either a sine. a sawtooth, block or pulse, you can copy these to a live audiobuffer (e.g. a small buffer (say 16kb)) which constantly loops. By staying ahead of the playposition, and constantly filling up the buffer with new values, you can create the soundoutput. You can use the small buffers to combine these in interesting ways (simplest is just to add them together (additive synthesis)).

The frequency of the tone can be manipulated by using a bigger or smaller sampling step through the small buffers. Amplitude can be manipulated by scaling the samples before putting them into the output buffer.

Great fun experimenting with this!

If you have this step nailed, you can add more sophisticated effects like filters (low pass, high pass, etc) and effects (reverbs, echoes, etc)

R

Toad
A: 

Have you looked at CSound? It's an incredibly flexible audio generation platform, and can handle everything from simple waveform generation to FM synthesis and all kinds of filters. It also provides MIDI support, and you can extend it by writing custom opcodes. There's a full C API and several C++ APIs as well.

Meredith L. Patterson
A: 

I am implementing an iphone app, which requires a synthesis engine, I saw that the Stanford library is suitable,but I can not get it to work well. I use an AudioUnit (Remote IO) that works quetly nice with a mathematical synthesis, but as regards the library does not produce the right sound.

If you have used thin toolkit, you might have the courtesy to pass me some code? or direct me where I can find something that can 'help me? Thank you. David.

Davide
I'm sure lots of people will be able to help you, but if you post a new question describing what exactly is your problem, here on stackoverflow. You can even mention this thread in your question.
leolobato