Controled messages to [counter] to have specific outputs (ie. 3, 7, 11, etc)

    Dec 10 2012 | 9:57 am
    Why is this not working? I am trying at some elegance and falling short. I have several video planes being called to be displayed. Each [] has a timer that can be altered thus when that timer expires I want the video to change. This [counter] is selecting which video to play next from a [umenu] ([counter] returns 0, play 0th and so on).
    I cannot just directly bang the [counter] as I want these videos in order (say I have 4 videoplanes, I would like each [counter] to have a global count but only produce the correct number when that particular video's time is up. I.e. a specific videoplane will play videos 2, 6, 10, etc while another videoplane will play videos 3, 7, 11, etc)

    • Dec 10 2012 | 11:54 am
      add coll or table after the counter ?
    • Dec 10 2012 | 12:32 pm
      @Stephane, I dont think I am following you. I dont want the counter to be spitting out numbers except at specific points in time and to be giving are specific numbers. I dont see how an array would work towards that as its function is namely for recording / assembling data to be shipped off to other programs
    • Dec 10 2012 | 2:05 pm
      No max on this computer for now so it seems I misunderstood your problem just by reading your post.
    • Dec 10 2012 | 4:29 pm
      See patch above. to take the text string and have max produce a working patch (minus what I dont understand).
      Question: why doesnt this work?
      Expectations: by incrementing (inc) the starting value at these inlets of [counter], shouldnt one only output a value while the other's result is internal. Thus I can be counting away (banging the desired inc message) and have [counter] output numbers only at specific values (when I choose to bang the correct inc message. The max of [counter] will be set high enough and is immaterial.
      Reality: it seems like sending inc to any part of [counter] works just like a bang on the first inlet (boob of a wrapper for getting my hopes up). Are there get arounds to this?
      [b]does this work?[/b] :( bum of a forum for having no formatting. but the line break (br) tag works? wtf
    • Dec 10 2012 | 5:47 pm
      im not looking for the obvious that i know but rather practical solution. I dont really want to define [mycounter] but I can if I have to. I just assume cycling 74 has made an object for most occasions, and they would have if I could inc specific inlets with the desire change that aspect. I have to assume an object has more than 1x i/o so that something useful can be done of these.
      [i]is this valid[/i] still no formatting
    • Dec 10 2012 | 6:58 pm
      As Nicholas states, the inc message only controls the count itself, not any other internal parameters of counter. It's not clear to me what you are trying to accomplish from your patch.
    • Dec 10 2012 | 7:33 pm
      My output needs to be an int to select an item from the [umenu]. How this int is determined is on the following:
      •I have 4 of the same functions. A given function is playing a video ([]). That video has a timer for how long it will play once the timer expires, the function will call the next video in order.
      •I have a list of 100 some videos that I want them played in order. function0 will start with video0, a few seconds later video1 will be played with function1 and so on. Once video0 is finished then function0 will select the next video that has not been played. This is where the above segment of code would be enabled. Each video will be played only once thus I need some global connection between each call of [].
      Is there a way of not writing out my own version of [counter]? I would prefer to stay away from a solution relaying copious amounts of math. Even though the logic would be fun on some level, I foresee this project to be expanded so making the math flexible per n instances of [] is something I do not have time / patients for.
      Maybe if you can ask more specific questions as I am running out of ways of explaining what isnt working here :(
    • Dec 10 2012 | 8:24 pm
      Maybe an approach like this would work for you?
    • Dec 11 2012 | 4:28 am
      I think it is working out. I am trying a variation. I forgot about how initializing videos where going to update my values so I am just using s/r but I think it will sort itself nicely.
      I did have the code distilled to 6 lines (if it was done in processing but with the max lib. Thanks for your spark and driving direction though!
    • Dec 11 2012 | 12:31 pm
      Nicolas! Merci beaucoup! Maintenant, cela semble être une meilleure solution. Il semble plus facile à mettre en œuvre.
      Community! thank you very much, I think I am sorted now. Thanks again for your ideas. I am still trying to get my head around max (coming only from HMTL, scheme, other similar cmd line environments, Java, css web styling, Ben Fry's Processing)