Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern/ route function for multiple addresses #161

Open
ceceba223 opened this issue Jan 13, 2025 · 0 comments
Open

Pattern/ route function for multiple addresses #161

ceceba223 opened this issue Jan 13, 2025 · 0 comments

Comments

@ceceba223
Copy link

ceceba223 commented Jan 13, 2025

Hey,
I'm looking for a way to send multiple key presses via osc. The addresses are supposed to look something like this:

/Key20

/Key21

I can achieve this by writing one address at a time like this:

OSCMessage msg("/Key20");

But I need a function which works for all keys, so I modified it to look like this:

  char address_base = "/Key";
  address_base += key_id;
  OSCMessage msg(address_base);

However that returns an error:

C:\Users\Me\Documents\Arduino\libraries\OSCMessage/OSCMessage.h:112:2: note: candidate: OSCMessage::OSCMessage(const char*) <near match>
  OSCMessage (const char * _address);
  ^~~~~~~~~~
C:\Users\Me\Documents\Arduino\libraries\OSCMessage/OSCMessage.h:112:2: note:   conversion of argument 1 would be ill-formed:

exit status 1

Compilation error: no matching function for call to 'OSCMessage(char&)'

From the documentation I guess the "route" function or the pattern matching could be helpful to me. But I don't quite understand it.
Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant