I have to agree 100% with Mario. Melodyne is the way to go. I have used it to create parts that I've played on guitar into other instruments.

The polyphonic piano part on this one is me playing guitar.
https://soundcloud.com/ray_legnini/everything-i-love

All the piano melody parts are from my guitar playing on this one (and it's a BIAB track as well):
https://soundcloud.com/ray_legnini/au-privave

All the vibraphone parts you hear on this one are me playing guitar, extracted by Melodyne.
https://soundcloud.com/ray_legnini/no-more-blues


RayL

Mac Studio M2 mid 2024 64 GB RAM
MacOS Sonoma 14.5

Logic Pro 11.2
Studio One 7.2
PreSonus USB AudioBox 1818VSL

Running BIAB from the external HD supplied by PG