[Csnd] Integrating PortMIDI and PortAudio
| Date | 2011-02-26 16:54 |
| From | Samuel Sagan |
| Subject | [Csnd] Integrating PortMIDI and PortAudio |
The recently-released Audio Programming Book contains remarkably clear introductions to PortMIDI and PortAudio. However, there's one (key!) thing I can't find: how to integrate the two, meaning how to write a program that accepts real-time MIDI input and passes NoteOn MIDI messages to the PortAudio callback -- so that sounds can be produced. I'd need some code example. Many thanks. |
| Date | 2011-02-26 17:13 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] Integrating PortMIDI and PortAudio |
That's a good exercise for the readers! Some tips: starting from the
MIDI input + output example,
remove the MIDI output; add a portaudio output (callback-based); pass
the MIDI message buffer
to the callback via the userdata object; consume the MIDI input
immediately in the callback.
You can look at the VST plugin development chapter in the DVD for an
example of a synthesiser
code to do this last step (it's the VSTi example).
Victor
On 26 Feb 2011, at 16:54, Samuel Sagan wrote:
> The recently-released Audio Programming Book contains remarkably clear
> introductions to PortMIDI and PortAudio.
>
> However, there's one (key!) thing I can't find: how to integrate the
> two,
> meaning how to write a program that accepts real-time MIDI input and
> passes
> NoteOn MIDI messages to the PortAudio callback -- so that sounds can
> be
> produced.
>
> I'd need some code example.
>
> Many thanks.
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Integrating-PortMIDI-and-PortAudio-tp3401545p3401545.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-02-26 19:35 |
| From | Samuel Sagan |
| Subject | [Csnd] Re: Integrating PortMIDI and PortAudio |
Thanks very much Victor Victor Lazzarini wrote: > > You can look at the VST plugin development chapter in the DVD for an > example of a synthesiser > Just checking: are you talking about section 3.1 "MIDI Events", of DVD Chapter 9, "More VST Plug-ins"? This chapter doesn't seem to be mentioning PortAudio. Samuel |
| Date | 2011-02-26 20:31 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] Re: Integrating PortMIDI and PortAudio |
yes, it's that chapter. I meant you can use the synth code from the
VSTi in your portaudio-based code.
Victor
On 26 Feb 2011, at 19:35, Samuel Sagan wrote:
> Thanks very much Victor
>
>
> Victor Lazzarini wrote:
>>
>> You can look at the VST plugin development chapter in the DVD for an
>> example of a synthesiser
>>
>
> Just checking: are you talking about section 3.1 "MIDI Events", of DVD
> Chapter 9, "More VST Plug-ins"?
>
> This chapter doesn't seem to be mentioning PortAudio.
>
> Samuel
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Integrating-PortMIDI-and-PortAudio-tp3401545p3401662.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|