# Processing OSC Messages with block-based audio callbacks

**URL:** <https://forum.juce.com/t/processing-osc-messages-with-block-based-audio-callbacks/7439>\
**Category:** Audio Plugins\
**Created:** [September 11, 2011, 7:28pm UTC](https://forum.juce.com/t/processing-osc-messages-with-block-based-audio-callbacks/7439 "2011-09-11T19:28:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hemmer](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@Hemmer](https://forum.juce.com/u/Hemmer)\
**Post date:** [September 11, 2011, 7:28pm UTC](https://forum.juce.com/t/processing-osc-messages-with-block-based-audio-callbacks/7439/1 "2011-09-11T19:28:46Z")

</div>

I’m looking for advice over the best way to handle OSC messages. Basically I have an OSC Listener class which can process incoming OSC messages. I’d like to be able to process these in a similar way to how MIDI is handled in the demo plugin (and many other places no doubt), i.e. have a buffer of time-stamped OSC messages.

Now this seems like it wouldn’t be too difficult to base code around the analogous MIDI classes, [midiCollector](http://www.rawmaterialsoftware.com/juce/api/classMidiMessageCollector.html), [midiBuffer](http://www.rawmaterialsoftware.com/juce/api/classMidiBuffer.html) etc. However I’m not sure how to insert / pass my (as yet non-existant) "OSCBuffer"s into the processBlock code as this seems to be handled by juce\_VST\_Wrapper (and I’d rather not edit that!).

Another solution (which is a step I’d rather avoid) is to convert the OSC messages into MIDI messages and add them to the exising MIDI queue, though I’m not entirely sure how to do that (probably using [MidiMessageCollector](http://www.rawmaterialsoftware.com/juce/api/classMidiMessageCollector.html) somehow)…

Anyway, thoughts / advice / experiences greatly appreciated as always. I’m probably making this seem more complicated than it needs to be! Hemmer

---

<div class="post-metadata">

**Author:** ![dinaiz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dinaiz/32/182_2.png) [@dinaiz](https://forum.juce.com/u/dinaiz)\
**Post date:** [September 12, 2011, 3:15am UTC](https://forum.juce.com/t/processing-osc-messages-with-block-based-audio-callbacks/7439/2 "2011-09-12T03:15:00Z")

</div>

I second that. To handle automation, we would need a better resolution than the MIDI infamous 127 steps (I’m talking from an host perspective), both in the AudioProcessor, and the AudioPRocessorGraph. The OSCBuffer the OP is talking about sounds sensible to me.

Julian, is this something we can hope for ?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [September 12, 2011, 7:57am UTC](https://forum.juce.com/t/processing-osc-messages-with-block-based-audio-callbacks/7439/3 "2011-09-12T07:57:08Z")

</div>

> [@](#):
>
> Julian, is this something we can hope for ?

Not from me any time soon, I’m afraid!
