Recording user actions

Home Forums General Programming Recording user actions

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31952
    synth
    Participant
      • Topics: 13
      • Replies: 35
      • Total: 48

      I am thinking of making it possible to record user actions in a script. Lets say the user creates a panel by adding modulators. Then he makes some property changes to make the modulators look correct(colors, position, font etc). Then he adds some lua code in the callbacks and he is done.

      Now he wants to make a similar panel again but does not want to start from scratch. If I could provide a way to record all these property changes and modulator creation, into a lua script that can simply be ‘played back’ in the lua context of a new panel, then it would produce the same panel again.

      If I want to implement this where would be the best place to track property changes for modulators that are added to a panel ? Do I need to add code to record property changes, in each modulator’s class ?

      Like to record changes for CtrlrImageSlider do I add code in CtrlrImageSlider::setComponentValue() ?

      Creating a new panel itself is not currently possible to record as an equivalent Lua command I guess. But maybe modulator creation is ?

      #31954
      synth
      Participant
        • Topics: 13
        • Replies: 35
        • Total: 48

        I am looking at CtrlrModulatorProcessor::setValueFromGUI() now

        It seems to get called for every user GUI interaction. Seems like an ideal place to record a lua string for the property change.

        #31957
        synth
        Participant
          • Topics: 13
          • Replies: 35
          • Total: 48

          Hmm that wasnt a good idea. Doesnt work in panel edit mode :

          void CtrlrSlider::sliderValueChanged (Slider* sliderThatWasMoved)
          {
              if (sliderThatWasMoved == &ctrlrSlider)
              {
          		if ((bool)owner.getOwner().getEditor()->getProperty(Ids::uiPanelEditMode) == true)
          			return;
          
          		setComponentValue (ctrlrSlider.getValue(), true);
              }
          }

          I ll probably need to go in and record at each sliderChanged listener function I guess.

        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 161 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