UI custom component strange behaviour

Home Forums General Programming UI custom component strange behaviour

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #72337
    human fly
    Participant
      • Topics: 124
      • Replies: 1070
      • Total: 1194
      • ★★★★

      something very strange happened with this panel:
      waveshapes v06
      https://app.box.com/s/qd55qj2wik6t0xenorx1thaxqsgosk7j
      (no extra resources needed)

      it is a waveform shape derived from the Matrix1000 panel,
      and shows a square wave or sawtooth wave with pulsewidth,
      which can also show adjustment for pitch.

      i had it working pretty well, then reopened the panel
      after saving (i had another file open at the time as well).
      my new work had disappeared, so i closed and re-opened from
      the saved version – no joy, same.

      so i did the work again, re-copying the ‘pitch’ control,
      and checking everything thoroughly. now i had PWM working,
      but ‘pitch’ no longer worked in real time. sometime a pitch
      was applied, sometime not – ie: different waveshape on the
      UIcustom component. i checked it several times, deleted the
      pitch object and re-made it, – and even cleared the Roaming
      folder. nothing worked.

      so then i changed the name of ‘pitch’, to ‘speed’, and it
      started working again. ??!!! what’s going on ?

      (the code uses ‘getModulator’, instead of ‘getModulatorByName’.
      is there a difference between these forms?)

      #72338
      proton
      Participant
        • Topics: 19
        • Replies: 94
        • Total: 113
        • ★★

        Check your variable names, it is often the case with bad naming conventions that methods try to access variables that share the same name so the program freaks out. You said that after the name change it worked again so I would try the troubleshooting there first.

        Cheers!

        #72339
        human fly
        Participant
          • Topics: 124
          • Replies: 1070
          • Total: 1194
          • ★★★★

          well, you’re right: it appears to be a naming problem.
          here are 2 versions of the previous file, with the
          culprit modulator called ‘osc_Pitch’, and then called
          ‘oscPitch'(no hyphen). the 2nd one works.

          the other modulators all start with ‘osc_..’
          could that be the problem?

          https://app.box.com/s/g850bm88qfvyrhruzrgsxoso30y5s1mc
          (zip with 2 small *.panel files, ext. no resources)

          anyway: seems to be sorted now.
          (now i have to figure out how to get it to do it’s
          PWM the other way round.. ie: invert the maths)

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 52 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr