I produce music via Logic Pro X and so far I only had one keyboard connected to my Mac via a midi USB cable. I wanted to buy a guitar now and I'm wondering if I need an amplifier or an audio interface or I can simply connect the guitar to my Mac using a jack to USB cable. Do I need an audio interface if I 'only' connect two devices to the laptop?
What guitar? An electric guitar or an acoustic instrument with a pickup?
With an electric guitar, one usually takes off amplifiers with a microphone. This is the standard procedure for acquiring Grammy Awards.
Acoustic guitars are usually picked up with a microphone. Unless the circumstances are terrible and / or you don't care about the actual sound of the instrument. I like to run electromagnetic pickups on western guitars over a nice guitar amplifier and then microphone them.
But of course you can also record the pickup signal dry with the computer. The sound is usually so-so - but you can still do a lot with the signal. Amplifier and loudspeaker simulations for example.
How do you imagine the function of a "jack to usb cable"?
If you take your jack plug and connect the contacts to the data performance of the USB plug and insert it into the computer, nothing happens and works.
The analog signal from the guitar first has to be preamplified and if it then has a level that provides meaningful signal / noise ratios for the analog to digital converter, it is then translated by it; so the computer that only speaks binary can do something with it.
So the cable described is basically an interface, although usually a pretty bad one.
If you want to receive pickup signals in the computer, an interface with a corresponding high-impedance input (instrument input / high-Z) would be useful. And everything that can't be adjusted (gain) is a toy.
If you want to record a passive piezo, you should use the best cable you can find and use a DI box.
So I thought I could just connect the electric guitar directly to the laptop and then use the guitar as 'hardware' and then download sounds and play them with the guitar.
Do you want to use an electric guitar as a controller for the computer?
There are e.g. The Fishman Triple Play System. Simply install the pickup on your guitar, connect the radio dongle to your computer via USB and then you can control everything you want via MIDI.
Whether you need it depends on what sound quality and latency you want to achieve and what type of input signal you have.
Is your input signal of an analogue type (as is the standard case for microphones and guitars) and would you give your goals with the predicates, good, sophisticated, reasonable, decent, or similar. To designate, an audio interface would be advisable for you.
You don't really need an amplifier these days to record. Inexpensive exercise amplifiers are also completely unworthy to be included.
Unfortunately, you have not described how you imagine your recording ambition, what you would potentially do, and what equipment you are aiming for. In this respect, I leave it at the following simplified statement: If your budget does not give more than 500 euro, and your room acoustics are not reasonably ok, it is better to use a decent VST program that virtually models the guitar for you.
Do I need an audio interface if I 'only' connect two devices to the laptop?
The number of devices has no relevance whether an AIF is necessary or not. (in simple words).