chance in max


    Sep 03 2006 | 7:44 pm
    hi all,
    Im a bit rusty on using max so any help would be greatly appreciated!
    Heres the setup: i want to have 2 bangs with some code in between them...with this code i want to be able to specify the chance of a bang getting through...so if i input 1.0 and repeatedly hit the first bang the second should light up every time.if i input 0.0 then the second bang should never light up...then if i input 0.5 the second bang should light up on average every other time that the first bang is hit.And so on....
    0.25 - 1 in 4
    0.9 - 9 in 10
    0.66r - 2 in 3 etc etc.
    Im sure theres an easy way to do it using 'random' but im feeling dim so please help...
    thanks very much,
    joe

    • Sep 03 2006 | 8:08 pm
      Here is one way to do it.
    • Sep 03 2006 | 8:23 pm
      Max Tutorial 25. Scroll to the right.
      I can't believe that I'm answering a question about randomness
      without plugging Litter Power, but there you have it.-
      On 3-Sep-2006, at 21:44, Joe Canti wrote:
      >
      > hi all,
      >
      > Im a bit rusty on using max so any help would be greatly appreciated!
      >
      > Heres the setup: i want to have 2 bangs with some code in between
      > them...with this code i want to be able to specify the chance of a
      > bang getting through...so if i input 1.0 and repeatedly hit the
      > first bang the second should light up every time.if i input 0.0
      > then the second bang should never light up...then if i input 0.5
      > the second bang should light up on average every other time that
      > the first bang is hit.And so on....
      > 0.25 - 1 in 4
      > 0.9 - 9 in 10
      > 0.66r - 2 in 3 etc etc.
      >
      > Im sure theres an easy way to do it using 'random' but im feeling
      > dim so please help...
      >
      > thanks very much,
      >
      > joe
      >
      -------------- http://www.bek.no/~pcastine/Litter/ -------------
      Peter Castine +--> Litter Power & Litter Bundle for Jitter
      Universal Binaries on the way
      iCE: Sequencing, Recording &
      Interface Building for |home | chez nous|
      Max/MSP Extremely cool |bei uns | i nostri|
    • Sep 03 2006 | 8:46 pm
      thanks very much for both replies...
      it was as easy as that!
      cheers,
      joe