create midi sounds by program

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
spark
Posts: 2
Joined: Tue Oct 28, 2014 1:23 pm
Location: Germany, Ravenburg (near lake constance)

create midi sounds by program

Post by spark »

hello guys,

my name is Christian and I am really new to music programming.

I am looking for an easy way so generate midi sounds by a programming api. Do you have any suggestions?

The plan is to create an electronic music device on base of a headless linux system.
It shall be an electronic flute or recorder, which should be very silent if you use Headphones.
Air pressure is taken by am Microphone, Keys by Parallel Port (I still have a device which has that :) ), and the software should generate some sound.

Since the software has to read and handle input stuff all the time I think it would be a good idea to send midi-messages to a kind of sound server, whenever input changes.
(So I hope to avoid lags.)

Sound quality does not matter for now, first step is to bring anything running.
The programming language also does not matter, I would prefere C++ or python, but other languages are also no problem.

Unfortunately I do not really have an Idea what I have to look for. Is it a software syntesizer? Some google-searchword would be a great help.
Which software would you suggest for that project?

Best regards and sorry for my bad english (I'm not a native speaker),
Christian
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: create midi sounds by program

Post by varpa »

You might want to check out some languages which are specifically designed for producing sound: Pure Data http://puredata.info/, Supercollider http://www.audiosynth.com/, Csound or a whole bunch more mentioned on this wikipedia page: http://en.wikipedia.org/wiki/Audio_programming_language
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: create midi sounds by program

Post by tramp »

I would second Pure Data (for your Midi-bindings), in assemble with Faust
Special with the Faust Synthesis Tool Kit you will be able to archive your goals really fast, in addition with nice synth sounds..
Download the source and expire the /examples/faust-stk folder were you find a couple of nice synthesis algos, and expire the /examples/faust-stk/pd-patches folder to find out how to bind them into Pure Data.
On the road again.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: create midi sounds by program

Post by ssj71 »

everyone's recommendations are good and will enable you to make a model based synthesizer. If you want the system self contained this might be the best way to go. If you are really just trying to make a midi controller to connect to any midi capable device you could do with a quality sample set. Finding them isn't always easy but using them typically is. For a first go, I'd just find a flute or similar sample pack in the sf2 format and use fluid-synth. The other recommendations probably open up potential for way better sound (unless you can get kontact running in linux and and an expensive sample pack, which is very very difficult if not impossible), but I'd bet this is the path of quickest prototype. And it wouldn't be too hard to switch to an audio programming language once you have the basics going.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
spark
Posts: 2
Joined: Tue Oct 28, 2014 1:23 pm
Location: Germany, Ravenburg (near lake constance)

Re: create midi sounds by program

Post by spark »

thanks for the help!

I use fluid-synth now and connect to it via a c-code using alsa-api (asoundlib).
I have also been inspired by the source code of aplaymidi, which basically does the same what I want, with the difference that aplaymidi interprets a midi file and I want to get the input information by other ways.
Post Reply