Return playhead to where play started: "manual auto return" ;)

Is there a way to return the playhead to the position where it started? “Auto return” always returns the playhead, but I want to manually send the playhead back to the start position with a keybind, either while playing or when stopped.

This is really powerful when auditioning or editing details on your recording.

Years back I had this on Cubase “Return to Last Start Position” and every time I use Ardour I still miss this :wink:

1 Like

On my system, the Spacebar handles the Start/Stop function. And within the loop, it is the L key or the Spacebar that manages this. Or am I misinterpreting your description?

I want to return the playhead to the last start position while playing (or while stopped). This is completely separate from any loops or other regions.

If I’m editing a crossfade, I don’t want to loop that but I do want to be able to return the playhead to the position I started the playback.

Sometime after a recording, I want to return to the beginning of my recording (where play started) to edit the start of the recording, but not always.

So a keybind to return the playhead to where it last started, without affecting start/stop would be really nice.

Agreed. This is basically the only thing I miss from ye ole Cubase 5.

1 Like

I have tried to write a lua script for this using CoPilot; but that just created a bunch of nonsense …

The essential part for the Lua script would be:

Session:request_locate (Session:last_transport_start(), false, ARDOUR.LocateTransportDisposition.MustStop, ARDOUR.TransportRequestSource.TRS_UI);

You can try this from Ardour Menu Window > Scripting.

Alternatively you may want to replace MustStop with any of https://manual.ardour.org/lua-scripting/class_reference/#ARDOUR.LocateTransportDisposition.

3 Likes

I’ve created this script using RollIfAppropriate and bound it to a keyboard shortcut … this might be exactly what I needed!

ardour {
    ["type"]    = "EditorAction",
    name        = "Return playhead to last start position",
    license     = "MIT",
    author      = "MrHaroldA"
}

function factory ()
    return function ()
        Session:request_locate(
            Session:last_transport_start(),
            false,
            ARDOUR.LocateTransportDisposition.RollIfAppropriate,
            ARDOUR.TransportRequestSource.TRS_UI
        )
    end
end
1 Like

Did you get it working? I had little time yesterday to test it, but it looked to be working perfectly!

No yet, but hope to be able to try it out later today.

1 Like

My muscle memory from Cubase 5 is that it worked like this:

Enter = Roll playhead
KP_0 (first press) = Stop at current position
KP_0 (second press) = Return to last start position
KP_0 (third press) = Return to session start

I now have a close-enough solution in Ardour as follows:

KP_Enter = Roll (normal custom key binding)
KP_0 while rolling = Stop playback and stay at current position (Lua action script)
KP_0 while stopped = Return to the position where playback started (Lua action script)
KP_Decimal = Go to Start (normal custom key bindings)

Lua script assigned to KP_0:
(NB: In no way can I vouch for the quality of the below script. It is vibe coded using Chat GPT – if the developers think it should be removed from the board, please let me know.)

ardour {
    ["type"]    = "EditorAction",
    name        = "Cubase Stop Return",
    author      = "Vibe coded by Chat-GPT"
}

function factory ()

    return function ()

        if Session:transport_rolling() then

            -- Stop playback
            Editor:access_action("Transport", "Stop")

        else

            -- Return to playback start
            Session:request_locate(
                Session:last_transport_start(),
                false,
                ARDOUR.LocateTransportDisposition.MustStop,
                ARDOUR.TransportRequestSource.TRS_UI
            )

        end

    end

end

I’ll try using this during my next mixing session and see how it feels. When playing around with it, I realised I have actually internalised the default Ardour bindings pretty well, so I might not use it in the end, but perhaps someone else will.

1 Like

This brings back memories; I’ll try your script as well.