• Advertisement
Sign in to follow this  

Plugging my guitar into my computer

This topic is 4328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my electric guitar pluged into the mic jack on my computer. I can record using windows recorder. I'm trying to write a java program that plays the guitar over the system speakers in real time. I looked around and could only find help recording the sound and then playing it back from a file. Any help on how to do this or a link to a helpful website would be great. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You need to record and play back at the same time; record into buffers in memory and then shuffle those buffers to be played back by the playback device.

What you're going to notice is that the latency involved will be pretty bad. Real-time audio processing requires latencies below 20 ms end-to-end, which is pretty hard to do with Java (and even harder to do with the APIs available under standard Java).

Most tools that do this kind of work either use DirectSound (ideally the "secret" Ks version for kernel streaming), or use ASIO from Steinberg (which needs special sound card drivers). Neither API is available in standard edition Java.

Share this post


Link to post
Share on other sites
Line In is, by default, bridged to the speaker out. Plug it into line in instead, make sure your line level is up and not muted, and it should work.

Edit: You'll have problems with latency if you're moving audio around within the OS, doubleplus especially if you're do this with Java as it probably won't have a low level interface to the sound hardware. I would avoid it.

Edit 2: Oops, hplus0603 beat me to that last point.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement