Forum
    • Categories
    • Register
    • Login

    Saving MIDI CC assignments in user presets?

    Scheduled Pinned Locked Moved Scripting
    36 Posts 4 Posters 304 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk @David Healey
      last edited by ustk

      @David-Healey Absolutely, then the mah.setUpdateCallback allows you to easily write the file, that's why I said "or just rewrite what you already saved" in the post above

      Hise made me an F5 dude, any other app just suffers...

      David HealeyD 1 Reply Last reply Reply Quote 1
      • David HealeyD
        David Healey @ustk
        last edited by

        @ustk Yeah I've got it working now. I've set it to fall back to the preset's automation if the one loaded from the file is empty. That way I can setup my "defaults" in the preset file.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - HISE tutorials
        My Patreon - More HISE tutorials

        ustkU 2 Replies Last reply Reply Quote 1
        • ustkU
          ustk @David Healey
          last edited by

          @David-Healey said in Saving MIDI CC assignments in user presets?:

          That way I can setup my "defaults" in the preset file.

          Clever! 👍

          Hise made me an F5 dude, any other app just suffers...

          1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @David Healey
            last edited by

            @David-Healey Till today I wasn't aware of this setEnableUserPresetPreprocessing, this will save me from other situations where I was tinkering with the pre/post save/load in order to keep parameters persistent...
            I'll keep that in mind now!

            Hise made me an F5 dude, any other app just suffers...

            Christoph HartC dannytaurusD 2 Replies Last reply Reply Quote 1
            • Christoph HartC
              Christoph Hart @ustk
              last edited by Christoph Hart

              the Midi CC settings are part of the data model of a user preset that is saved in the DAW project, otherwise it would loose the connections when you reload a DAW project.

              If you want to clear the Midi assignments when browsing user presets, you can easily just clear it in the post load callback and guard it behind the !uph.isInternalPresetLoad() check.

              And any Midi CC connection reacts the same way as note input, so if you have armed multiple tracks it will control multiple instances. Feature, not a bug.

              dannytaurusD 1 Reply Last reply Reply Quote 0
              • dannytaurusD
                dannytaurus @Christoph Hart
                last edited by dannytaurus

                @Christoph-Hart said in Saving MIDI CC assignments in user presets?:

                the Midi CC settings are part of the data model of a user preset that is saved in the DAW project

                Are you referring here to the saved DAW session, or the saved user preset? Or both?

                Saving as part of the DAW session is cool, I just don't want them saved in the user presets.

                Meat Beats: https://meatbeats.com
                Klippr Video: https://klippr.video

                Christoph HartC 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart @dannytaurus
                  last edited by

                  @dannytaurus HISE treats a user preset and a DAW state exactly the same - it reloads everything in the data model including the CC assignments.

                  If you want to distinguish between the two, you need this method:

                  https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#isinternalpresetload

                  I wouldn't start hacking around in the source code for this, the data model needs to stay consistent, this is just an UX problem while preset browsing that you can solve easily on the script level.

                  dannytaurusD 2 Replies Last reply Reply Quote 0
                  • dannytaurusD
                    dannytaurus @ustk
                    last edited by

                    @ustk From what Claude says, this is minimally useful for my situation.

                    Although you can preprocess the preset data before loading it, you still have to set all the values to something, meaning you can't just say "don't overwrite the existing CC assignments". I suppose you could read the current assignments, then preprocess to replace the preset assignments with the current ones. Phew!

                    But as I replied to David earlier, that leads to there being lies on disk.

                    Meat Beats: https://meatbeats.com
                    Klippr Video: https://klippr.video

                    1 Reply Last reply Reply Quote 0
                    • dannytaurusD
                      dannytaurus @Christoph Hart
                      last edited by dannytaurus

                      @Christoph-Hart I don't really want lies in my user preset data. Might be confusing to anyone who read/edits the XML

                      Meat Beats: https://meatbeats.com
                      Klippr Video: https://klippr.video

                      1 Reply Last reply Reply Quote 0
                      • dannytaurusD
                        dannytaurus @Christoph Hart
                        last edited by

                        @Christoph-Hart said in Saving MIDI CC assignments in user presets?:

                        If you want to distinguish between the two, you need this method:

                        https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#isinternalpresetload

                        Personally, I don't need to distinguish between a DAW session reload and a preset load. I just want no MIDI CC data saved to, or loaded from, user presets.

                        Meat Beats: https://meatbeats.com
                        Klippr Video: https://klippr.video

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        14

                        Online

                        2.4k

                        Users

                        13.8k

                        Topics

                        120.6k

                        Posts