The keyboard you should be able to use a midi to usb cable (or just a generic usb cable if the keyboard has usb out). This would plug into a usb port on your computer (either laptop or desktop).

I'm assuming you're talking about inputting an electric guitar. You could try the line output from your amp into the mic input on your soundcard, but I expect the sound quality may be poor (you'd probably need a 1/4" to 1/8" adapter to try this - probably only a few bucks at Radio Shack). You'd probably get better sound quality from a dedicated audio interface designed for guitar input. This will, though, get into more money...

Lower end type device would be something like this:

http://pro-audio.musiciansfriend.com/product/Behringer-Guitar-Link-UCG102-USB-Interface?sku=241228

You can get higher end devices, with more inputs, more input options, bundled software, etc.

Bruce


Macbook Pro 2018
2.6 GHz 6-core Intel Core i7, 16 GB RAM
OS Monterey
BIAB for Mac 2022