# I need help to get OSC in Processing enabled

**URL:** <https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087>\
**Category:** Libraries\
**Created:** [September 6, 2025, 1:11pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087 "2025-09-06T13:11:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ComputerArtist\_ThL](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@ComputerArtist\_ThL](https://discourse.processing.org/u/ComputerArtist_ThL)\
**Post date:** [September 6, 2025, 1:11pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087/1 "2025-09-06T13:11:52Z")

</div>

Dear Community,

I need help to write two little Scripts.

1.) A Script which sends a OSC Message 2.) A Script which received this OSC Message

Can anybody give me a advice which to write this two little Programms

In hope of Help

ComputerArtist\_ThL

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [September 6, 2025, 1:18pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087/2 "2025-09-06T13:18:26Z")

</div>

Hi @ComputerArtist_ThL and welcome to the forum!

Do you want to write the OSC code from scratch, or would you be happy using an existing library?

There’s a Processing library for this called [oscP5](https://sojamo.de/libraries/oscp5/).

It comes with examples for both sending and receiving OSC messages, which should cover exactly what you need.

---

<div class="post-metadata">

**Author:** ![ComputerArtist\_ThL](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@ComputerArtist\_ThL](https://discourse.processing.org/u/ComputerArtist_ThL)\
**Post date:** [September 6, 2025, 1:28pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087/3 "2025-09-06T13:28:06Z")

</div>

Hi @sableraph

Thank you for your Answer.

Yes I have read that this Library exists. And I would used it. But I can not write a little script to use it. The Problem is that I have not found the example script. Can you give me a Link to this script.

Thank you for your Answer

ComputerArtist-ThL

---

<div class="post-metadata">

**Author:** ![ComputerArtist\_ThL](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@ComputerArtist\_ThL](https://discourse.processing.org/u/ComputerArtist_ThL)\
**Post date:** [September 6, 2025, 1:39pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087/4 "2025-09-06T13:39:14Z")

</div>

I have found the Example in the Library Page you have give me

But I can not let run this Programm

It’s start correctly. But when I press any Key it would only received on Message and stop.

---

<div class="post-metadata">

**Author:** ![ComputerArtist\_ThL](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@ComputerArtist\_ThL](https://discourse.processing.org/u/ComputerArtist_ThL)\
**Post date:** [September 6, 2025, 3:34pm UTC](https://discourse.processing.org/t/i-need-help-to-get-osc-in-processing-enabled/47087/5 "2025-09-06T15:34:55Z")

</div>

I have archived a Solution for Sending OSC.

```auto
import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress remoteLocation;

void setup() {
  size(400, 200);
  // Zieladresse: IP und Port
  remoteLocation = new NetAddress("127.0.0.1", 1234);
  // Initiiere OscP5 ohne zu empfangen (nur senden)
  oscP5 = new OscP5(this, 1234); // eigener (lokaler) Port, kann beliebig sein

  println("Drücke eine Taste, um eine OSC Nachricht zu senden.");
}

void draw() {
  background(30);
  fill(255);
  textAlign(CENTER, CENTER);
  text("Drücke eine Taste für OSC Nachricht", width / 2, height / 2);
}

void keyPressed() {
  // Erzeuge eine neue OSC Nachricht mit einem bestimmten Address-Pattern
  OscMessage msg = new OscMessage("/test");
  msg.add(frameCount); // z.B. eine Zahl
  msg.add(frameCount); // z.B. eine Zahl

  // Sende die Nachricht an die Zieladresse
  oscP5.send(msg, remoteLocation);

  println("OSC Nachricht gesendet: " + msg);
}

But I have not a Working Version for Reveivement

```
