How to get audio samples to be stored locally in memory

I would like to get audio input via a microphone and store a std file of samples locally (wav, aif, etc.).
What is the shortest path that involves the least amount of pain?

Thank you!

anyone?