report the state of toggle?


    Apr 09 2006 | 4:12 pm
    hi
    i am trying to find a way to report, at any time, the state of a Toggle without changing its value.....
    of course Bang'ing a toggle changes its state - placing an [i] after the toggle might work (banging the left input of the [i]) but only if the said toggle was used in the patch so far (the default state of a toggle being 0, if it was not used i'd like to have it reported as well)
    there certainly must be a way, i just don't seem to be able to find it (of course I could loadbang 0 at init or something.... but maybe someone has a nicer idea)
    thanks
    kasper -- Kasper T. Toeplitz noise, composition, bass, computer http://www.sleazeArt.com

    • Apr 09 2006 | 4:34 pm
      If you put a fake value in the int box, you can isolate this value after easily.
      Best, ej
    • Apr 09 2006 | 4:37 pm
      you could use the pattr system. Give the toggle a name (ie mytoggle), and use a "getmytoggle"->[pattrstorage].
      T_
    • Apr 09 2006 | 4:39 pm
      On 4/9/06, Thijs Koerselman wrote: > > you could use the pattr system. Give the toggle a name (ie mytoggle), and > use a "getmytoggle"->[pattrstorage]. > > T_ >
      PS: grab might be useful in this case.
    • Apr 09 2006 | 4:50 pm
      > >PS: grab might be useful in this case. > >
      thank Thijs and emmanuel
      _i did not knew the grab object, it works!!!
      but then of course once you give an default value to [i] - zero in this case since the load state of toggle is 0 - it's even simpler !!!
      many thanks
      kasper -- Kasper T. Toeplitz noise, composition, bass, computer http://www.sleazeArt.com
    • Apr 12 2006 | 9:39 am
      Kasper T Toeplitz wrote: > (the default state of a toggle being 0, if it was not used i'd like > to have it reported as well) > > there certainly must be a way, i just don't seem to be able to find > it (of course I could loadbang 0 at init or something.... but maybe > someone has a nicer idea)
      But toggle and int do have the same default (0). Beside the grab your suggested solution is all you need...
      Stefan
      --
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09