Maik Klein
Maik Klein

Reputation: 16158

Is it possible to play a sound though the audio driver with Rtmidi?

I am currently on linux and I am playing around with rtmidi. Now I was able to play a sound though my digital piano but I am wondering if I can also output the sound though my speakers?

When my digital piano is not connected I still get one device with getPortCount(); I assumed that is my audio driver. The device name is Midi Through:0 which is somewhat strange.

But I don't hear any sound and I am not sure if that is the intended behavior. Can I play midi sounds though my audio driver with rtmidi? Or do I need another library for this?

Upvotes: 2

Views: 374

Answers (2)

CL.
CL.

Reputation: 180240

To convert MIDI commands into real sounds, you need a synthesizer.

Sound cards stopped having a built-in hardware synthesizer in the last millenium. You need a software synthesizer, such as Fluidsynth or Timidity.

Upvotes: 2

Nooble
Nooble

Reputation: 572

RtMidi is, as quoted from this website, a realtime midi input/output API. It does not say it is an audio API or library therefore it probably isn't. So yes, you will need another library or API for this, I recommend OpenAL.

Upvotes: 2

Related Questions