Announcement

Collapse
No announcement yet.

adding/not adding a value to msg

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • adding/not adding a value to msg

    my objc program sends osc msgs like /Pad1 and only adds an int 1 if the pad is sticky (note on until depressed, sends int 0 when depressed), if not sticky then don't add an int 1. OSCulator configured to send MIDI Note.

    if sticky setting changes need to delete OSCulator setting and redo for it to recognize this change (because adding int 1 has no effect otherwise). Would it be possible to have OSCulator deal with this in a future release?

    I could also put a send int 0 in a timer when not sticky as workaround, but wondering if the fix could be done in OSCulator instead.

    hope it makes sense!


    Thanks

  • #2
    Hi Tigros!

    As a rule of thumb I would advise that you define OSC messages that keep the same signature (method name and arguments) over time. In my opinion, two different messages signatures have two different meanings, and the problem you are facing is the expression of this.

    So, in OSCulator if you send a message with no argument, OSCulator will internally simulate a trigger and provide a (virtual) argument so that you can use MIDI Note events, e.g. have a Note-On and then shortly after, a Note-Off. That is what you are using (a message with no argument) to produce short length notes.

    What about doing this from your controller? I believe it would make more sense to include the behavior right into your application. For example, when a pad is not sticky, send a 1 followed by a 0 (you can use [NSObject performSelector:withObject:afterDelay:] if you don't want to use a timer). If it is sticky, send OSC messages only when touch events occur. (which is basically the last option you suggested).

    Otherwise, I don't see a practical workaround for you that would not break behavior in the general case. Unless of course you have an idea to share!


    Best,
    Cam

    Comment


    • #3
      On a second thought, after reading again my previous reply made me think of a solution.
      I still advocate that two different OSC message signatures have two different meaning, but it would be surely more handy to support what you suggested.
      I will be back from holidays in a couple of weeks, I'll send you an update at my return.

      Cam

      Comment


      • #4
        ....withObject:afterDelay sounds good to me, didn't know about that one.

        Thanks for quick response!

        Comment

        Working...
        X