remove a space before a coma in a message


    Nov 01 2008 | 11:17 pm
    Hello, I need to store the initial value before getting the target and ramp time for a line object. I've been searching and trying a few things but cant get any solution that doesn't generate a space before the coma in a message. Here are the two ways I've tried to get rid of it without success.
    thank's for help

    • Nov 01 2008 | 11:24 pm
      This message sent to a line object:
      0, 100 1000
      is exactly the same as sending a separate message of:
      0
      followed by a separate message of:
      100 1000
      The comma in "0, 100 1000" only tells max to separate those two parts of the message into two different messages. So, instead of trying to get rid of the comma, just send the initial value to the line, and then send the ramp information to the line directly afterwards.
    • Nov 02 2008 | 11:06 am
      Removing the space before the + character in your [sprintf] should work. However, if I've properly understood what you're trying to do a much simpler method would be to use [sprintf %ld, %ld %ld] which will give you the messages formatted for the [line] object. The trick here is the slash which escapes the special meaning of a the next character.
      lh
    • Nov 02 2008 | 11:44 am
      Oh yes, of course, I was focusing on the loop problem that comes because the output of the line object drives the same object that might sends the new initial value. a simple int is my solution thanks for your help
    • Nov 04 2008 | 1:56 pm
      FXRobert schrieb: > Oh yes, of course, I was focusing on the loop problem that comes > because the output of the line object drives the same object that > might sends the new initial value. a simple int is my solution
      Your solution works of course, but you could still benefit from learning how to use the trigger object. In your case a [t l b]... It not only helps to point to the correct order of execution, it also prevents breaking your patch by moving around some of the objects...
      Stefan
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com