PWM and analog output?

For my midi(akai mpd16) controller I wanna make analog output to communicate with an analog sound device
I need to make analog output . I have never wroked with arduino.
I have made some working piezo pickups for homemade instruments.
My two guitar effect builds failed.

MIDI controller → Arduino → PWM output + RC circuit? ->…?

I don’t think I need to make this:

MIDI controller → Arduino → PWM output + RC circuit = voltage → output(3.6 jack?).

Either of those methods will give you sound. But, you won't get high-quality audio from PWM and an R-C filter. For anything near the quality you get from a soundcard or a keyboard, etc., you need a true DAC. And, you need at least 16-bits. (CDs are 16-bits. Soundcards are 16 or 24-bits.)

And depending on what you are doing, you may need more "processing power" than you can get from the Arduino.

Arduino Audio Output : 10 Steps (with Pictures) - Instructables
MIDI controller -> Arduino -> PWM output + RC circuit = voltage -> output(3.6 jack?).

That 2nd method is not using PWM. It's using 8-bit parallel data* to drive the resistor-network DAC.

*This is PCM (Pulse Code Modulation) which is the normal-default way of representing digitized audio. The Audacity website has a simple [u]tutorial[/u] showing how a waveform is represented by a series of digital samples, and how you "connect the dots" to reconstruct the waveform.

I was thinking to control and manipulate sound generator not getting sound form arduino

DeathSuperMario:
I was thinking to control and manipulate sound generator not getting sound form arduino

So tell what you want to do.
You said:-

I wanna make analog output to communicate with an analog sound device

So what sort of output is that? Is it DC controlling a voltage controlled parameter?
What voltage, what range and how quickly do you want it to change?

I would like to send out midi controller manipulation signals to analog device so that I can trigger sound or sounds and pitch bend etc . Midi controller is akai mpd 16. Maybe I can only make like a rc car controller. I don't know.

I was thinking to control and manipulate sound generator not getting sound form arduino

So tell what you want to do.

I would like to send out midi controller manipulation signals to analog device so that I can trigger sound or sounds and pitch bend etc

I wanna make analog output to communicate with an analog sound device

So what sort of output is that? Is it DC controlling a voltage controlled parameter?
What voltage, what range and how quickly do you want it to change?

I need voltages for sending out singlas form midi controller. I think I need.

So despite the title of the thread you do not want to use either PWM or an analog output you just want to send MIDI signals.

I need voltages for sending out singlas form midi controller.

No you don’t.
MIDI is a digital signal just like serial data. So you need a very little bit of hardware to make the serial signal’s physical form into the sort a MIDI sound generator can accept. Then you need some simple software to send MIDI messages.

So MIDI shield, buy or build? Here is a build option:-
http://www.thebox.myzen.co.uk/Hardware/MIDI_Shield.html
Here is a buy option:-

There are lots more.

Grumpy_Mike:
So despite the title of the thread you do not want to use either PWM or an analog output you just want to send MIDI signals.

I need voltages for sending out singlas form midi controller.

No you don't.
MIDI is a digital signal just like serial data. So you need a very little bit of hardware to make the serial signal's physical form into the sort a MIDI sound generator can accept. Then you need some simple software to send MIDI messages.

So MIDI shield, buy or build? Here is a build option:-
MIDI Shield
Here is a buy option:-
SparkFun MIDI Shield - DEV-12898 - SparkFun Electronics
There are lots more.

This things are midi to midi. If I have simpel siren generator etc it don't have anything digital. I need to make midi signal to analog signal.

This is getting silly.

So what do you want to do?
Where does MIDI come into it?
What voltage do you want to generate at what current?

I have midi controller akai mpd16. I would like to use it on analog device. I'm thinking pitch bends, pitch shifters etc.
midi controller -> arduino -> exampel http://www.electronics123.com/kits-and-modules/Audio-Effects-and-Sound-Modules/Gun-Sirens-Bombs-COB-Module-KIT.html or http://www.electronics123.com/kits-and-modules/Audio-Effects-and-Sound-Modules/SIREN-SOUND-GENERATOR.html

OK thanks for clarifying.
First of all you need to get MIDI into your Arduino. To do this you need a shield like I told you about earlier. In fact you only need half that shield, the half that receives MIDI data and puts it into your Arduino.

Once it is in your arduino then you need decode the MIDI messages and pick out the one or ones you want to activate your sound. When you see that message then you activate your sound in a way that the sound generator needs.

This project:-
http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html
Shows how to pick out "MIDI note on" messages and use it to fire a solenoid.
Instead of that you want to trigger your sound generator.

I find this Notes and Volts: Fun with Arduino - Midi Input Basics.
I have read that someones have used usb midi interface for arduino for sending midi in or out.
I think I have usb driver for my akai mpd 16 somewhere. Think I can use midi controller instead of buttons and potentsiomeeters on sound generator.