Bass track Legato with sustain pedal

Hi,

Is it possible to send a note off to the previous note, when I use the sustain pedal on a virtual bass guitar track? It should stop when a new note is pressed on the keyboard

Thx

What’s the reasoning for using the sustain pedal if you don’t want the notes to sustain?

Just hold the notes for the duration you want, then release and press the next note.

Sounds simple, but:
→ that´s not the question I posed…