Busy season in progress... Please note that due to a high volume of requests, the response time from our support is currently longer than usual. Chat is temporarily not available. We thank you for your understanding.

Tip - changing patterns on the Maschine JAM without changing focus

maschuser1
maschuser1 Member Posts: 1 Noise
edited August 2 in Maschine

If you're on a Mac, and you want to make it so Maschine JAM no longer changes the focused group when you select a pattern, then (after making a backup) change the section starting line 182 of

/Applications/Native Instruments/Maschine 2/Maschine 2.app/Contents/Resources/Scripts/Maschine/Helper/PatternHelper.lua

to read:

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


            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)
            end


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


    end


end
Tagged:

Comments

  • Deepmind
    Deepmind OsnabrückMember Posts: 1 Noise

    unbelievable, thank you so much. I've been waiting for Native Instruments to integrate this function for years. This was originally the reason for me to buy a Jam. 👍️

  • macchinista
    macchinista Member Posts: 7 Sine

    Don’t have a Jam with me at the moment, but if it works, this is awesome! Thanks so much for the tip 👏

  • D-One
    D-One PortugalModerator Posts: 858 mod
    edited August 1

    Wow... OK, now that's some awesome stuff to share, thanks! 👍

    I've shared so many edits over the years and I always hoped that it could inspire someone with actual knowledge to do something fancier than what I can do... I think you're the 1st person to share something like this, thanks so much.

    I don't have a Jam but I'll try to learn from your edit and maybe apply it to my M+ or KKS.

  • Kubrak
    Kubrak Member Posts: 1,346 Pulse

    What language is it? I might join you one day...

  • D-One
    D-One PortugalModerator Posts: 858 mod
  • Kubrak
    Kubrak Member Posts: 1,346 Pulse

    I see, for sure not C (it is not object oriented language), but it resembles C++ a bit.

Back To Top