Use mic input as a toggle switch?

Matt_C75

Commendable
Aug 24, 2016
3
0
1,510
Howdy there.

I'm pretty new to this forum, but I have a question. You know those old Playstation 2 Rockband drumsets? Yeah, those ones. You know the foot pedal? The one with the 3.5mm jack as its plug? I've got one of those plugged into the microphone jack on my laptop right now. I was wondering if I could extrapolate the input from this pedal into a push to talk switch for a VOIP program. While this thing is plugged in, there's no audible sound, but when I push my foot down I hear a slight power thud sound from the mic input through my headphones while listening to the device. Any help on this would be great.

Thanks!
 
Solution


1) Have you ever programmed a complex windows api program from scratch?
2) Have you ever programmed something with a hardware driver interface?
3) Have you ever programmed something with WASAPI or DirectSound?
4) Are you willing to add a...
Could you? Sure. BUT using that would mean that you lose all ability to use a normal mic. Instead, buy a $5 raspberry zero (or ardiuno if you already have one), make a simple voltage divider (since rasp pi will fry with 5V), and then make a USB interface for it. Much easier to integrate into current software that way (no reason to deal with Windows audio driver code and possible interference with the voip program), and you can simply have it mute/unmute the audio that way.
 

Matt_C75

Commendable
Aug 24, 2016
3
0
1,510


I like the suggestion. The thing is that I've got an external sound card for my microphone, so I'm all set up there. I was wondering if I could get some sort of program to interpret the sound wave coming from the switch in the pedal as a keypress. I am not looking to take the sound from the pedal, just the waveform to be turned into a keypress.
waveform.png
 


Don't think you understood my suggestion. There's literally no point in doing that, it can cause issues if you're not careful and it will take a lot of computing power if you're not smart about it. Going with a simple "arduino" style project will let you be done in under an hour
 

Matt_C75

Commendable
Aug 24, 2016
3
0
1,510


I'm not looking for any type of hardware solution for this. I am looking for solely software. I've got everything hooked up and ready for input into some sort of software. Be it some Java code that takes the mic input and activates a key when the dB is over a certain amount, or something similar. I'm not an expert coder, so I was asking for some help in the software aspect of this. I see no "issues" this could cause, and I have so much computing power that I have no idea what to do with.
 


1) Have you ever programmed a complex windows api program from scratch?
2) Have you ever programmed something with a hardware driver interface?
3) Have you ever programmed something with WASAPI or DirectSound?
4) Are you willing to add a significant computation load to the computer? Not talking about tiny amounts either, unless you are absolutely brilliant with coding you could very well end up with permanent 25-50% load on a single core on a i7 6700!

If you answered no to any of them (especially 1 and 2, and definitely 4), I don't think you're ready to write that type of software.

It seems you don't understand just what you are actually asking to do. If you had gotten the PI you would have been done already!
 
Solution