Windows 8 ! Can Audacity record something from an external source. For example, I would like to hook my digital piano up to the computer and record something. 2d question, is that even necessary? Could a mile attached to the laptop pick up the sound of the piano?
If your computer sound card has a “Line In” (most desktop computers do, but only some laptop computers do), and if your keyboard has a “Line Out” or “Aux Out”, then you could connect the keyboard to the computer (with an appropriate cable) using those.
I presume that you mean a “microphone” attached to the laptop?
If your laptop has a buit-in microphone the that will probably be able to pick up the keyboard a bit, but I’d expect the sound quality to be dreadful.
If you connect an external mic to the “mic in” socket of your computer and put the mic close to your keyboard speakers, then I’d expect it to sound marginally better, but still quite poor because the mic inputs on laptop computers are usually very poor quality (designed for Skype and similar where “telephone quality” is acceptable).
If your computer does not have a “Line In” connection, then you could buy a USB sound card that has “Line level” inputs.
If your keyboard does not have “Line out” or “Aux out” then you may be able to use the “headphone output”, but in order to also be able to hear what you are playing you would need to use a “headphone splitter” cable so that you can use headphones at the same time as recording from the headphone socket.