LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-20-2006, 08:13 AM   #1
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Rep: Reputation: 15
Parallel port drum triggers


Hello. I found myself in quite a fix a little while back when I came across the article on how to make cheap drum triggers, and I am badly in need of a drumset.

In the article it stated that to get your sound output (using midi) you must link the drum triggers (which are just piezo, or small microphones inside a drum pad) to a drum module which will take the triggers and produce the sound.

I looked up drum modules, and they are way out of my price range (I can buy the drumset for that price).

I then came across the parallel port, and an idea popped in, what if I could use the parallel port as the drum trigger inputs and then write a program (java) for the pc to play a sound when each of the triggers are triggered and a signal comes in.

I just want to know what you think of this, is it even possible to do? Will there be some kind of latency problem?

Thanks all for reading the rather, unusual post.
 
Old 06-20-2006, 01:01 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
well I don't think you can connect a pizeo element to a digital input as it generates current. you would need something like a transistor as a switch. how many pad's are you talking about? It's been a while since I used anything with a parallel port but I don't think it had very many inputs. If it was me I would use some thing like this:

http://www.instructables.com/ex/i/40...E506/?ALLSTEPS

Then it could have more inputs and a cool usb wire. and I'm not sure but you might even be able to find existing software that would alow you to control a software midi synth with your keyboard. you might not have to write anything.

EDIT:
found one midikb:

http://helgo.net/simon/midikb/

Quote:
This is a small program for unix style systems which turns your computer
keyboard into a MIDI keyboard. Pretty handy if you don't have a real
MIDI keyboard connected all the time. You can use it to control an
external MIDI device, or to control a realtime software synthesizer such
as csound.
It looks like you can set it to use any note with any key. then you'd have a cool usb drumkit that could use any midi synth. Now I might want to build something like this where did you get the article on cheap drum triggers?

Last edited by johnson_steve; 06-20-2006 at 04:14 PM.
 
Old 06-23-2006, 03:29 AM   #3
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Hmmmm, you know, the usb keyboard thing is a really good idea. I wonder if I can get it to work with one of the old PS/2 keyboard I have.

I am only planning to put about 4-5 drums (symbals included) so using serial/parallel port shouldn't be a problem. I wrote a java program which can detect when a input is triggered in the serial port.

Soooo.....if I send each piezo through a rectifier and then use that to activate a transistor as a switch and connect that circuit through the input pin and ground on the serial port, it just might work....right?

I will then try the excellent suggestion of hacking the keyboard. Brillant idea

You may have already come across this, but here's the link I was talking about
http://www.electronicdrums.com/pads/pads2.htm

Thanks for everything.
 
Old 06-23-2006, 07:55 AM   #4
Oxagast
Member
 
Registered: Aug 2003
Location: Mocksville, NC, USA
Distribution: Gentoo, Slackware.
Posts: 410

Rep: Reputation: 30
That sounds like it would work. I did something similar to that once with a parallel port, although not with drums. Prolly cost a few bucks to get some breadboards/wires/transistors/etc from radioshack. Also, get one of those little thingies that you can plug into the parallel or serial port that has pin imputs (I think they're origionally designed for jumpers), it makes it alot easier to wire the parallel/serial port into a breadboard. The hardest part about it is the wires like to jump out... so once you get the layout and figure out how it all works and how you want it wired up, you may want to solder it onto a PC board or something... I was never very good at that. :X
 
Old 06-23-2006, 08:08 PM   #5
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
a ps2 keyboard would work but if your computer keyboard is also ps2 you wouldn't be able to use them at the same time (technically you are not supposed to plug or unplug ps2 devices without shutting the computer down.) I think your idea is spot on for only a few pads and should work quite well. as I'm a bassist and not a drummer I have no use for this exact project but I will probably build some kind of usb-keyboard midi device, and I wouldn't have had the idea if not for your post; so thank you.
 
Old 06-23-2006, 08:50 PM   #6
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks very much to all who have posted here.

I will try out both methods and post here my results on each to help others trying to do the same thing.

I've taken apart my ps/2 keyboard and since my main one is usb their both working simultaneously. I've just tried connecting two of the contacts from the chip inside the keyboard, and I can type letters.

I'm now going to attempt to hook that up to the drumset using either a piezo, or some kind of contact/plate system.

Thanks everybody for your help.
 
Old 06-24-2006, 07:36 AM   #7
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Drum triggers using contact plate system successful.

Hello all, I've tested the contact plate method. Which consists of something like this.

A biscuit tin lid (The round kind a little less than a foot in diameter). Two pieces of conductive metal (I got mine from the metal sliding pieces of floppies). Take the floppy piece and cut it down the middle, so you have two sections.

Attach a wire to one section of the floppy metal and the other end of the wire to the usb keyboard pin (that mod is shown in the article above). Now, tape that piece of metal by the wire to the top of the tin lid.

Take the other piece and secure it to the base (whatever is under the tin lid). Attach a wire to that and the other end to the other pin on the keyboard you want.

When you take apart your keyboard you should find little rubber squishy things under the keys which are used to make them spring back up. Take a few of these and put the tin lid on them (metal piece side facing downwards). This should be on top of the other metal piece.

Now obtain a software which plays drum sounds when keys are pressed. I use Pyro's drum set which you can get from here
http://www.hitsquad.com/smm/programs/KeyboardDrums/

Now, tap your plate so that the two metal pieces touch, causing the circuit to be made and the equivalent of pressing a key. Pyro's drumset should now pick this up and play a sound. You can reassign the sound to whatever key you want.

If it doesn't work make sure the metal pieces and indeed contacting when you press the plate. Check all other connections, in particular the ones on the usb keyboard.

This needs great improvement which I'm working on (needs frame, better positioning, etc.) but you've got yourself a basic drum pad.

Enjoy!
 
Old 06-24-2006, 08:15 PM   #8
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Cool I'm glad you got it working. I would personally avoid the tape, but I'm the type who solders just about anything. Re-using the "little rubber squishy things under the keys" is a very good idea; one that I probably wouldn't have had.
 
Old 06-24-2006, 11:21 PM   #9
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the reply johnson_steve.

This post is more about the usb keyboard module than the drum triggers themselves.
I found it much easier to just take a piece of paper, and put it on the pins, then using a pen mark the pins on the paper.

Then get your wires and tape them to the paper according to your marking. Just place the paper on top of the chip so that the wires are touching the contacts. Everything should then be in order, no soldering, no gluing, and probably nothing touching each other.

Thanks all.
 
Old 06-25-2006, 08:28 AM   #10
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Hello all.

I've attemped to try out the serial port method.
I can't seem to get the connection to be made properly. I think I'm wiring it wrong.

Does anybody know how to connect a current to the serial port as an input.
Code:
                  ________
          _______|-      +|______ Drum__
         |        --------              |
         |                              |
         |                              |
        CTS port                     Ground
The above it what I've been doing. I'm quite sure this is wrong though. I searched all over the internet but could not find any sources on how to input data, only output.

I'm assuming that inside the serial port chip there is a connection between CTS port and Ground, but it isn't behaving that way.

Any help would be appreciated.
Thanks.

Last edited by danga1993; 06-25-2006 at 08:30 AM.
 
Old 06-25-2006, 09:48 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,742

Rep: Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923
You can not use the CTS signal in this fashion. RS-232 logic levels are high = +12 and low = -12. As stated before you can damage parallel and serial ports easily trying to pull to much current.

The cheap method would be to use a relay. Connect an open contact of the relay to RTS and CTS. Connect your circuit to the relay coil and ground. Use a relay that can handle the output voltage of your circuit. Your software can then monitor the state of CTS.
 
Old 06-25-2006, 10:54 AM   #12
danga1993
LQ Newbie
 
Registered: Oct 2005
Location: In a house......
Distribution: Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Hello, I just tried what you said and it works, so problem solved.

Just out of curiousity, why won't it work when I connect the + terminal of a 12v power supply to CTS pin and the - of the terminal to the ground pin.

Isn't that how modems etc. communicate with the pc? How do they do it?

Thanks for solving the problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel port mehro Linux - Hardware 5 01-31-2006 06:43 AM
Where is the parallel port? kwyjibo99 Linux - Hardware 5 07-20-2005 05:47 PM
What's using my parallel port?! DiBosco Linux - Hardware 10 06-20-2004 10:18 AM
Cannot use parallel port under 2.6.4 jimbob1234 Slackware 2 03-14-2004 08:34 PM
Parallel Port Crashed_Again Linux - Hardware 1 01-20-2003 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration