Tip - changing patterns on the Maschine JAM without changing focus

2»

Comments

  • Cutty2k
    Cutty2k Member Posts: 1 Member
    edited December 2023

    OH MY GOD thank you. This will completely change my live performance game.


    absolute legend.

  • DoppelPAt
    DoppelPAt Member Posts: 1 Member

    I have maschine software 3 with Maschine hardware and Jam hardware, and it seems to not work (no change in the focus behaviour). Is there any trick or update?

  • 2A2E
    2A2E Member Posts: 48 Member
    edited December 2024

    Hi! I just tried it out and luckily it still works with 3.01, of course I changed the line below to 3

    /Applications/Native Instruments/Maschine 3/Maschine 3.app/
    

    Big thanks again to @Maschuser1 !!

    😃

    EDIT: And I would like to add like mentioned above that this should be the standard behavior because it makes so much more sense! I wished anyway I could use more controllers at the same time for different groups, e.g. KKS49 for one group and Maschine for another one.

  • 2A2E
    2A2E Member Posts: 48 Member

    Hm I have to reply to myself :) I did some more playing around with it lately and I believe it is only working partly, looks like if you have more than 1 bank of groups it will no longer work. Unless I messed something up.

    Not sure if anyone is still using this hack with 3, because it is awesome. would like to hear your experiences…

  • dmori
    dmori Member Posts: 92 Advisor

    Haven't got 3 yet, but this may be a reason to get it. Thanks for keeping thread alive and sharing your experience.

  • 2A2E
    2A2E Member Posts: 48 Member

    So here is the problem with that hack, and it is something I can live with but maybe someone knows how to fix it:

    When you have more than 8 groups and you have selected group A of the second bank, changing a pattern on Jam in the first bank with then switch the focus to the second bank on Jam.

    So then you will have to use the cursor to move back to the first bank.

    Hope that makes sense.

  • maschuser1
    maschuser1 Member Posts: 16 Helper
    edited February 24

    This should be fixable by changing the code to call JamHelper.getGroupOffset before switching pattern, then JamHelper.setGroupOffset after switching, something like this (note this is untested):

            local CurrentOffset = JamHelper.GetGroupOffset()
            if HasFocus then
    if FocusSection then
    NI.DATA.SectionAccess.removePattern(App, FocusSection, Group)
    else -- In Idea Space we work on Scenes directly.
    NI.DATA.SceneAccess.removePattern(App, FocusScene, Group)
    end
    else
    NI.DATA.GroupAccess.insertPatternAndFocus(App, Group, Pattern)
    end
    if FocusGroup ~= GroupIndex then JamHelper.SetGroupOffset(CurrentOffset)
    MaschineHelper.setFocusGroup(FocusGroup + 1, false)
    end

    re: "I wished anyway I could use more controllers at the same time for different groups, e.g. KKS49 for one group and Maschine for another one."

    In my most recent post, I show my setup which when I select drum group on the Mk3, has its pads controlling that group, but the KKS keys controlling the last selected non-drum group. But there was a lot of complexity involved getting that working.

  • 2A2E
    2A2E Member Posts: 48 Member

    Cool thanks I will give that a try! Saw your video and 🤯Really cool!

  • maschuser1
    maschuser1 Member Posts: 16 Helper

    I just did a quick test, this is the working code:

    function PatternHelper.focusPatternByGroupAndByIndex(GroupIndex, PatternIndex, CreateIfEmpty)


    if PatternIndex == nil or PatternIndex < 0 or GroupIndex == nil or GroupIndex < 0 then
    return
    end


    local FocusGroup = NI.DATA.StateHelper.getFocusGroupIndex(App)
    local Group = MaschineHelper.getGroupAtIndex(GroupIndex)


    if Group then


    local Pattern = Group:getPatterns():find(PatternIndex)


    if Pattern then


    local FocusSection = NI.DATA.StateHelper.getFocusSection(App)
    local FocusScene = NI.DATA.StateHelper.getFocusScene(App)
    local FocusScenePattern = FocusScene and NI.DATA.SceneAccess.getPattern(FocusScene, Group)
    local HasFocus = Pattern == FocusScenePattern
    local CurrentOffset = NHLController:getContext():getGroupOffsetParameter():getValue()

    if HasFocus then
    if FocusSection then
    NI.DATA.SectionAccess.removePattern(App, FocusSection, Group)
    else -- In Idea Space we work on Scenes directly.
    NI.DATA.SceneAccess.removePattern(App, FocusScene, Group)
    end
    else
    NI.DATA.GroupAccess.insertPatternAndFocus(App, Group, Pattern)
    end
    if FocusGroup ~= GroupIndex then
    MaschineHelper.setFocusGroup(FocusGroup + 1, false)
    NI.DATA.ParameterAccess.setSizeTParameter(App, NHLController:getContext():getGroupOffsetParameter()
    , CurrentOffset)

    end


    elseif CreateIfEmpty == true then
    -- note: AudioPatterns can't currently be empty, so CreateIfEmpty is n/a
    PatternHelper.insertNewPattern(PatternIndex, Group)
    end


    end


    end
  • 2A2E
    2A2E Member Posts: 48 Member

    Wow that is awesome, I will check it as soon as I am back! Many thanks!!

Back To Top