When I connect my electric guitar to have my imac simulate an amp, all I get is this horrible high pitched screeching sound. I have a converter piece for the amp cord.

Any ideas?