SHIFT + STOP Combo or double press STOP to go to the start.

D-One
D-One Moderator Posts: 3,579 mod
edited November 6 in Maschine

So, I was replying to yet another thread about the Stop button behavior, basically how it does not return the Playhead to the beginning with a double-press like most music SW does and while looking at Maschine's code I realized it's actually pretty simple to hack / modify...

EDIT: For anyone on MacOS NIPatcher can modify the software for you, here:


So I added a function that makes a Shift+Stop combo to both stop the playback and bring the Playhead to the start. There's not much more to explain but here's a short video:

To do it manually on MacOS:

  • Right-click the Maschine.app or VST/AU, choose "Show Package Contents" and replace the TransportSection.lua file in Contents / Resources / Scripts / Shared / Components with the one attached in this thread. (unzip it first)


  • On Windows it's trickier and requires ResourceHacker, I'm not sure if one can drag-and-drop a file to replace another with the ResourceHacker app so just copy-paste the code as explained below:

in Line107 I basically changed this:

To this:

Here is the code if you need to paste it:

function TransportSection:onStop(Pressed)

    if self.Controller:getShiftPressed() then
      NI.DATA.TransportAccess.restartTransport(App)
      NI.DATA.TransportAccess.togglePlay(App)
    else
    if Pressed and MaschineHelper.isPlaying() then
      NI.DATA.TransportAccess.togglePlay(App)
    end

  end

end

If instead of Shift+STOP you prefer a double of STOP then it's this code:

function TransportSection:onStop(Pressed)

  if Pressed and MaschineHelper.isPlaying() then
   NI.DATA.TransportAccess.togglePlay(App)
  else
   if Pressed and not MaschineHelper.isPlaying() then
     NI.DATA.TransportAccess.restartTransport(App)
     NI.DATA.TransportAccess.togglePlay(App)
   end

  end

end

NI devs are free to use my code BTW 🤣🤣🤣

«13

Comments

  • Kaldosh
    Kaldosh Member Posts: 414 Advisor

    Nice ! But jeez…I don’t have a stop button 🤪

  • Nico_NI
    Nico_NI Administrator Posts: 1,124 admin

    D-One strikes again! 😎

  • D-One
    D-One Moderator Posts: 3,579 mod
    edited July 2022

    Did you yank it out because it serves no purpose or do you have a Maschine Studio? 🤣

    I can look into how to do it for the studio if this is something you want.

  • Kubrak
    Kubrak Member Posts: 3,067 Expert

    Everyone has the stop button, but it may be pressed just once a lifetime.... ;-)

  • Kaldosh
    Kaldosh Member Posts: 414 Advisor

    Indeed, still have my trusty Studio. I like those little mods. So many things I’d want just for the play button like having choices like play from start, play from last start position, continue playing option would be a great addition . Like a shift long press on play or something to open play menu and choose play behavior, can you do that ?😜

    even if NI put that in I’d probably have to upgrade in 2031 😉

  • D-One
    D-One Moderator Posts: 3,579 mod
    edited August 2022


    A full custom menu would be a whole lot of work, maybe I could do that if I actually finish my beginner dev course 😂 but... there's not much incentive given that NI will never care about user tweaks and implement them even if they work perfectly, I can't host modified software anywhere as it's against NI's policies and also this kind of thing has super low support/engagement from the community... Probably due the dificulty of applying the tweaks to the average Joe 🤷‍♂️😢

    Hummm 'Play from last start position' might also be too fancy for my skills, I would have to store the playhead position in a variable each time you press Play/Stop to be able to use that value later... But I'll have a look at this as it's super useful when we are working on a specific part of a song and for some reason setting a loop brace is not optimal. This is another one of those features that all software has.

    I'm confused about 'Continue playing' ? This is already the normal behavior of the Play button, it resumes from where it stops.

  • Kaldosh
    Kaldosh Member Posts: 414 Advisor

    is just the normal behavior that should not be suppressed if any additions 😅 enough overpriced downgrades everywhere already 😏.

    i hope you beginner dev course starts by installing the coding software and setting up a working environment 😉

  • D-One
    D-One Moderator Posts: 3,579 mod
    edited August 2022

    Ohh, OK gotcha; adding secondary functions with hold or shift does not mess with the original ones.

    All courses start with that, 😂 I just skip that chapter as I've always had IDE's and editors installed anyway.

  • Kaldosh
    Kaldosh Member Posts: 414 Advisor

    Seriously most programming beginner guides talk to just out of school programmers. Dig enough on YouTube you could potentially find anything you need to know about music production. In France they say they lack of dev but accessing to it is like a maze with a lot of fake stuff that will bring you nowhere . Would be happy to find genuine content transmitting genuine knowledge in that field…

  • D-One
    D-One Moderator Posts: 3,579 mod
    edited August 2022

    Depends on what you search for... For Audio development yes, those assume you're already a dev that wants to dive into the Audio part specifically, there's not much content about it on youtube besides what the folks from theaudioprogrammer.com share, that's the best resource I am aware of, they also got a community discord that might be a great source of info but without the basics, you'll go nowhere. You can't learn audio development without knowing C++ and standard libraries afaik... so if you're interested then you have to learn that first.

    The most annoying thing is 90% of basic beginner dev content is aimed at mobile stuff nowadays, apparently that's where the $$ is at now and for the foreseeable future.

    From what I can tell most audio devs specialized on their own after college, lots of reading. Big Music companies are constantly hiring devs, NI has had job openings all year long for as long as I remember, devs seem to bounce around between companies a lot, like some sort of small circle so I assume it's not easy to find professionals and train them on the companies codebase catalog and way of working.

    As for me, I'm super far away from all that, I'm just taking a basics swift/c++ course on udemy for other purposes and tbh by the time I'm in lesson #15 I have already forgotten lesson #5 so this won't ever be something serious for me 😂

  • basehead617
    basehead617 Member Posts: 137 Advisor

    That's some serious hackery D-One!


    I kind of wish there was a 'use at your own risk' scriptability of Maschine that was a little more friendly but not officially supported..

  • D-One
    D-One Moderator Posts: 3,579 mod
    edited August 2022

    That would be cool, not sure how it could be implemented tho. The easiest way for users would be a patcher application I think, where the user just select the tweaks he/she wants and applies them but I have no skills for a such a thing especially if cross-compatible between mac and windows... I could do a script like the one I did for sample sorting but that's not user-friendly for the average user either. That's why to simplify I just attached the modified file here. Maybe one day a real dev will make something for the community.

    As opposed to what? The M+ in standalone mode? I have no way to access the files on an M+ and even if I find a way it would prob be too complicated.

    As for the MAS plugin version it doesn't make much sense to use this particular hack since all DAW's already have double tap of Stop to bring the playhead t the start.

  • tribepop
    tribepop Member Posts: 176 Pro

    @D-One this is awesome, thanks for sharing. I didn’t realize we could use a decompiler to modify the source code for Maschine. I’m a software engineer and I haven’t used Lua but at first glance it seems pretty straightforward. Have you had any issues with re-compiling the application? In my experience building stuff from source is a pain in the ass because of dependencies but if this is as straight forward as it sounds I may have to hack my Maschine software to do what I need it to do 😜

Back To Top