I been doing an extensive research in the internet because I need a way to generate real bass sound (like an electric bass guitar) from a program. The thing is Ive been looking in MIDI ways to produce that sound, but Im not sure if thats the right thing to do, actually I have little knwoledge about this subject, is my first trying anything related to produce sound from raw coding. I been looking into different APIs to help me, most of them open source to see what are the doing, but I found them very complex and with a really steep learning curve and little documentation. I also been lookin in open source programs like tuxguitar, made in java, which is similar to GuitarPro, so I could see how the produce the bass sound, I still have some code to scann so I can found what I am looking for, but I fear is wont be what I need or able to do. So to wrap all this up, my question is: is there a way to produce a real musical bass sound, either by native code or any API, no necesarily using MIDI or anything like, preferable in c/c++ or java? Thank you very much PS excuse any sintaxis or language error, i am not english speaking native.
-
HI there, Are you trying to implement an "effect" to produce the bass like sound?. – silent Aug 05 '12 at 05:47
-
1Get a couple of Bose speakers would be the best bet. – Ed Heal Aug 05 '12 at 05:50
-
1The simplest way to produce a real sounds is to record the real sounds and replay it. Trying to generate a sounds from a bunch of frequencies is less likely to sound natural. – Peter Lawrey Aug 05 '12 at 07:00
2 Answers
MIDI is just a control protocol, and has nothing to do with sound on its own. It's generally used for synthesizer control (note on/off messages and what not), but that's about it.
Most devices have a synthesizer in them that can produce sounds for you while being controlled with MIDI. This is by far the easiest way to get started, but you will find that most stock General MIDI synths don't sound so great.
Now, as far as producing the sounds you are after, you are talking about writing your own synthesizer. There is no magic. There is no shortcut. This is hard work! Generally, synths will use a set of samples, and then manipulate them. For instance, you'll have a sample for a pluck, and then another for the sound of the guitar. This will all be controlled on an ADSR envelope. Even then, it isn't going to sound amazing, since you are only approximating a very small set of characteristics of the instrument.

- 159,648
- 54
- 349
- 530
You can try to control the built-in synth of the soundcard through midi. But if you want good sound and instrument quality, I would suggest you learn about VST, it's a technology from Steinbergh which includes virtual instrument (VSTi) and effect plugins.
So in essence, you could create or use a VST host application that works with existing commercial and free VSTi and VST plugins. You can then reuse available software synths and instrument emulations which sound amazing. As Brad suggests in his comment, you can then control the host application through midi.
While I only promote VST here, the wikipedia link contains a list of other technologies from different brands that are doing the same thing. But you get the idea.

- 27,376
- 9
- 90
- 133
-
There is absolutely **no** reason to support VSTs in your application for what he needs. Most soft synths have a standalone version, and for the ones that don't, there are simple VST hosts. He can learn basic MIDI to control them. For his purposes, learning to work with VSTs is completely pointless. – Brad Aug 05 '12 at 06:14
-
@Brad: you're right, it might be even better to use a simple host app. – huysentruitw Aug 05 '12 at 06:20
-
1I modified my answer. In fact I just wanted to point the OP to the existence of these technologies. – huysentruitw Aug 05 '12 at 06:28