electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Faux Pas Quartet and friends Music From Last Thursday
Please visit the chat
 Forum index » DIY Hardware and Software » Developers' Corner
Punch Card Sequencer Concept
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 2 [26 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
MyPasswordIs123456



Joined: Nov 05, 2007
Posts: 25
Location: account is locked

PostPosted: Wed May 13, 2009 8:24 am    Post subject: Punch Card Sequencer Concept
Subject description: Using digital image recognition
Reply with quote  Mark this post and the followings unread

I am brainstorming for ideas.
All comments and suggestions are welcome.

Mockup in MsPaint

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Objective:
Use punch cards as step sequencer pattern preset.
The goal is to create a controlled image acquisition environment to read the card values.

Hardware construction:
Hardware should be easy to build using off the shelf consumer products.
Power switch is just the light switch.
Lighting source should not spill directly into the camera objective.
Punch card tray color should show through card holes.
Stickers overlays will be used to personalize the numpad.

Software development:
Custom VST Plugin will use an imaging library to recognize the punched holes.
USB camera and numpad will be connected to the software.
Plugin will output card values to a step sequencer that will be handled by third party sotware, most probably Plogue Bidule.

Material :
1 x black box
1 x usb camera
1 x usb numpad
1 x powerful led light
1 x tray

Process:
1. Punch the blank card
2. Put the card in the machine tray
3. Use numpad command to capture image of the card
4. Analyze punch card with digital image recognition
5. Send card values to a step sequencer
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Wed May 13, 2009 9:54 am    Post subject: Reply with quote  Mark this post and the followings unread

This reminds me of an old style player piano, and i'm sure there's lots of precedent for using punched cards in music. I'm wondering if you would like to use printed sheets instead of punched cards? Then you could print your sequences out using any ordinary printer... Hmmm...

I'd have to ask what is the main goal here. Is it that you would like a tangible recoord of the sequence so that you can replay it without setting it up again? Or is is just for the sheer DIY fun of it? Certainly an original idea, sort of a new twist on an old theme. Very retro.

Well, one thing you could do is get some old fashioned punched cards that were used in player pianos or other musical applications and read those. That would be like preserving the past or something. Just a thought.

Anyone else with comments?

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
RF



Joined: Mar 23, 2007
Posts: 1493
Location: Northern Minnesota, USA
Audio files: 28

PostPosted: Wed May 13, 2009 10:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Ooooh Optical card readers...oh what fun we had with them (not) in 1974)
I can't imagine why you would do this except for the novelty....

We had such issues with minor irregularities in the cards getting them to read properly.... I can't begin to discourage you enough. But maybe I just had a bad experience...

10 LPRINT "SO...HOW BAD DO YOU WANT THIS? (1 TO 10 )";
20 INPUT A
30 IF A < 1 THEN 120
35 LPRINT "OH DANG.... SHADES OF 1974 .... PUNCH CARDS!"
40 LPRINT "AS MUCH FUN AS #2 PENCIL OPTICAL CARDS AND PAPER TAPE."
50 FOR B= 1 TO (A*100)
60 LPRINT "ARE YOU SURE THIS A PRACTICAL, TIME SAVING IDEA?";
70 NEXT B
80 INPUT C$
90 IF C$ <> "NO" THEN 10
100 FOR C=1 TO 10000 REM: PAUSE FOR REFLECTION
110 NEXT C
120 LPRINT "EXCELLENT - I HEAR DIGITAL MEMORY IS CHEAP NOW."
130 IF A>0 THEN 10
140 END

RUN

Dang BASIC error edit

_________________
www.sdiy.org/rfeng

"I want to make these sounds that go wooo-wooo-ah-woo-woo.”
(Herb Deutsch to Bob Moog ~1963)

Last edited by RF on Wed May 13, 2009 1:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Wed May 13, 2009 10:56 am    Post subject: Reply with quote  Mark this post and the followings unread

RF wrote:


10 LPRINT "SO...HOW BAD DO YOU WANT THIS? (1 TO 10 )";
20 INPUT A
30 IF A < 1 THEN 120
35 LPRINT "OH DANG.... SHADES OF 1974 .... PUNCH CARDS!"
40 LPRINT "AS MUCH FUN AS #2 PENCIL OPTICAL CARDS AND PAPER TAPE."
50 FOR B= 1 TO (A*100)
60 LPRINT "ARE YOU SURE THIS A PRACTICAL, TIME SAVING IDEA?";
70 NEXT A
80 INPUT C$
90 IF C$ <> "NO" THEN 10
100 FOR C=1 TO 10000 REM: PAUSE FOR REFLECTION
110 NEXT C
120 LPRINT "EXCELLENT - I HEAR DIGITAL MEMORY IS CHEAP NOW."
130 IF A>0 THEN 10
140 END

RUN

Dang BASIC error edit


Hey! You forgot to put in the Winning Lottery #'s code! Surprised Surprised Laughing

Violent memories for me, with punch cards and Fortran from 1978 or so.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Wed May 13, 2009 10:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Hahahahaha! Such sweet sarcasm! Well, it's just a little brainstorming after all, lots of good ideas come from impractical origins... Smile

Oh, and they stopped using punched cards one year before my class in college, so I guess I lucked out.

Thanks for the laugh, RF.

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
RF



Joined: Mar 23, 2007
Posts: 1493
Location: Northern Minnesota, USA
Audio files: 28

PostPosted: Wed May 13, 2009 11:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Wink
I'm just messin around MyPasswordIs123456....
Don't let me discourage you from a fun project.

bruce

_________________
www.sdiy.org/rfeng

"I want to make these sounds that go wooo-wooo-ah-woo-woo.”
(Herb Deutsch to Bob Moog ~1963)
Back to top
View user's profile Send private message
MyPasswordIs123456



Joined: Nov 05, 2007
Posts: 25
Location: account is locked

PostPosted: Wed May 13, 2009 11:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you very much for your feedback.

Why I would do this project?

First of all, I'd like to have a physical data preset system so I can store and recall my sequences. And I figured it would be fun to pick up a blank card, use a punch tool to make the melody and feed it to the machine to hear the bleeps and bloops. I also think people without much musical knowledge (like me) could have a blast with this system. Traditional piano and music notation is also very old. To me it feels really obsolete even compared to this project.

Other reasons you have mentioned:
It is a novelty retro idea.
Reminds me of a mechanical piano too.
It does have some major geek appeal.

And it would fit great beside my dotcom modular synth.
Not really into it for the fun of diy, I'd rather buy it but whoever running a business with this idea would be crazy.

Quote:
We had such issues with minor irregularities in the cards getting them to read properly.... I can't begin to discourage you enough. But maybe I just had a bad experience...


Actually you're right, optical systems (old and new) aren't known for their reliability.
Although I have experience with image recognition, I am pretty sure this is possible.
To be accurate I need to capture the image in a controlled environment, black box with constant lightning.

---

Making the punch card is definitely a tricky part. Ideally I'd want to have some thick cardboard paper, something rigid to punch holes into. But it needs to be flexible enough to go into a conventional printer feeder mechanism. Maybe I could get an online print shop to produce the cards.

---

Unrelated. I hijack my own thread Shocked

Inventor: I've taken a look at the connector clips we were talking about. Not sure how good this would be for your project but they sure are cheap at 15 cents a piece and no minimum order:
http://www.hobbytron.com/Fahnstalk-Clips.html
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Wed May 13, 2009 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

woohoo! thanks for the clips, MyPasswordIs123456, that might be just the thing if they are small enough.

For your punchcard idea, some more thoughts:

1. why not do the input scanning with a scanner that has a black paper backing on it? Then you don't need a camera box.

2. I'm sure there is some thick-ish paper for special purposes like printing your own business cards at any office supply store.

3. If you're going to punch the holes manually, then just use a leather punch, you know those pliers thingies with the star wheel on the end.

Best of luck and thanks for being a good sport about RF's little joke! Smile

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
jksuperstar



Joined: Aug 20, 2004
Posts: 2488
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Wed May 13, 2009 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Back to top
View user's profile Send private message Visit poster's website
RF



Joined: Mar 23, 2007
Posts: 1493
Location: Northern Minnesota, USA
Audio files: 28

PostPosted: Wed May 13, 2009 2:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

"Buy it Now" $95 for 500 unused IBM Punchcards

http://cgi.ebay.com/Vintage-IBM-Computer-Punch-Cards-LOT-of-500-Unused-New_W0QQitemZ110387602027QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item19b39d226b&_trksid=p3286.m20.l1116

..There is also a Card Punch machine here - only $300

http://cgi.ebay.com/Collectable-Vintage-IBM-129-Card-Punch_W0QQitemZ260409884665QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item3ca1a37ff9&_trksid=p3286.c0.m14&_trkparms=72:1205|66:2|65:12|39:1|240:1318|301:1|293:1|294:50

_________________
www.sdiy.org/rfeng

"I want to make these sounds that go wooo-wooo-ah-woo-woo.”
(Herb Deutsch to Bob Moog ~1963)
Back to top
View user's profile Send private message
MyPasswordIs123456



Joined: Nov 05, 2007
Posts: 25
Location: account is locked

PostPosted: Wed May 13, 2009 2:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:

1. why not do the input scanning with a scanner that has a black paper backing on it? Then you don't need a camera box.

2. I'm sure there is some thick-ish paper for special purposes like printing your own business cards at any office supply store.

3. If you're going to punch the holes manually, then just use a leather punch, you know those pliers thingies with the star wheel on the end.


1. I thought about using a scanner first. There really isn't any reason why that wouldn't work. But I did experiment with the camera box technique before so I am already familiar with what to expect from this technique. It's easier to acquire the image too, no need to mess with legacy twain drivers.

Also, the cost of a good scanner these days seems to be pretty high. I can get all my material from Hong Kong for less than the price of a scanner. It will look more like an integrated unit and be an easy build. Still, it would be nice if I could find an affordable sheet fed photo scanner that doesn't use a clumsy tray.

2 & 3. Thanks for this information, this is exactly what I was planning to use. It's nice to have reassurance that the solutions I came up with are possible to implement.

Quote:

Best of luck and thanks for being a good sport about RF's little joke! Smile


Hehehe Very Happy
I did say all comments and suggestions are welcome.

And they say every joke has some truth in it.
Although I am a youngster I can feel where you guys are coming from.
Having worked with legacy programming technology (namely PLC), I understand how this can bring back painful memories.
Back to top
View user's profile Send private message
Kenneth



Joined: Apr 16, 2009
Posts: 43
Location: Stockholm, Sweden

PostPosted: Wed May 13, 2009 3:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Use large punch cards made of cardboard boxes, place them at good distance and take out your shotgun...

-----

Seriuosly, to improve the reading you can put the light under a pice of glass, put the card on top so it totaly blacks out all light exept what is comming through the holes.
Back to top
View user's profile Send private message
MyPasswordIs123456



Joined: Nov 05, 2007
Posts: 25
Location: account is locked

PostPosted: Thu May 14, 2009 10:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Kenneth wrote:
Seriuosly, to improve the reading you can put the light under a pice of glass, put the card on top so it totaly blacks out all light exept what is comming through the holes.


I am not sure if this would improve the readings. Shooting light directly at the camera lens would produce unpredictable artifacts such as: lens flare, light spill and image distortion.
Back to top
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2488
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Thu May 14, 2009 12:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

flat black on flat white probably seems best?
Marker, rather than punch holes, would probably seem best. I like the idea of a camera, and the fact that it can then be extended into real-time, unlike a scanner.
You can add some type of feducial marker or two on the paper, so you don't have to spend as much time aligning the paper to the camera. Just get it in view, and the camera will do the rest (sizing, realignment, etc).
Back to top
View user's profile Send private message Visit poster's website
Kenneth



Joined: Apr 16, 2009
Posts: 43
Location: Stockholm, Sweden

PostPosted: Thu May 14, 2009 4:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Na, I did not ment you shall put the camera direct over the light, you can still have it angled...

But even better, put the glass on a frame and several smaller lights arond the the frame, at the side under the frame but not under the glass.

Code:
  -------------
|  _O ______O__ <- Lights
| |            |
|O| Glass area |
| |____________|
| Frame....
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Fri May 15, 2009 12:52 am    Post subject: Reply with quote  Mark this post and the followings unread

You know, to be totally honest I think this is kind of a bizarre project idea, but what I really like is all the interesting feedback that we're tossing around. Of course it goes without saying that creative imagineering is perhaps the most fun part of any project, and also it shows the community spirit and positiveness that abounds at electro-music.com. Awww, ain't I sentimental?

p.s. For a good buzz, I recommend two extra-large coffees with cream and sugar from Dunkin Donuts. Works for me!

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Fri May 15, 2009 12:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh, and I should also mention that the whiteboard idea is very interesting. Point your webcam at a whiteboard and draw your music instead of wiring it up on a synth or mousing your way through complex software. That concept brings to mind some interesting possibilities.

For example, the upper left corner of your whiteboard is your sequencer, to the right are your oscillators, below you draw waveforms, something like that. You could use electrical tape to demarcate the "instrument" regions and act as fiducials for the image processing software. Different color markers could have some sort of additional meaning to the sound produced.

Isn't imagineering fun?

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
hugues_bc



Joined: May 15, 2009
Posts: 14
Location: Montreal

PostPosted: Fri May 15, 2009 9:32 am    Post subject: Reply with quote  Mark this post and the followings unread

I am the Original Poster [MyPasswordIs123456], new account due to obvious reasons.

Yes indeed the term imagineering fits really well, the community has lots of skills and imagination. Lots of bizarre projects around here, the plants biofeedback pops in mind. It all ends up to what interface is better suited to the individual. The more projects, the more options for musicians.

What I find interesting at the moment is that I could just create the generic camera box and then implement many different algorithms to recognize different material.

Somebody could build a jukebox using these techniques, just pop a cd box inside and the software will try to match it with previously captured cover art, select the track on the numpad and software will play the corresponding mp3.

I am considering the whiteboard/marker idea.
Although from a technical point of view it would be harder to implement the recognition algorithm. It's easier to process geometrically perfect blobs with solid edges, uniform colors. And my drawing skills are really poor.

Color filtering is an easy and powerful technique so I'll probably stick with bright Red/Green/Blue instead of black and white.

This is an easy image recognition process I have thought about:
This would be the blank material:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

This would be the recorded material:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Using color filtering and auto-crop algorithms:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

After binary color conversion I can use edge and blob detection:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

The last image represents the detected blob, at this point I would have access to the X-Y coordinates of the center of each blob. I would use this value to peek in the previous color picture to check if the value is True or False depending on the color.
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20615
Location: The Netherlands, Enschede
Audio files: 148
G2 patch files: 318

PostPosted: Fri May 15, 2009 9:34 am    Post subject: Reply with quote  Mark this post and the followings unread

hugues_bc wrote:
I am the Original Poster [MyPasswordIs123456], new account due to obvious reasons.


Please check your PM box, the one for this new account.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Fri May 15, 2009 9:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Sorry to hear about your account troubles, good luck with that.

About the whiteboard and drawing sloppily, let's say in the upper left where your sequencer is you have painted black circles that you fill in with colored markers, then neatness is easy enough.

At the bottom you have say three or four horizontal areas outlined with the same black paint, and you draw waveforms in them that you want to hear. Any sloppiness there just makes the sound more interesting.

Not sure what else you would put in the upper right. Just some ideas...

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
jksuperstar



Joined: Aug 20, 2004
Posts: 2488
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Fri May 15, 2009 10:26 am    Post subject: Reply with quote  Mark this post and the followings unread

In my field (ASIC design) it's pretty common for people to have whiteboards in their office, and many will use permanent marker to draw in a clock (square wave) along the top. So, paper, or whiteboard, you can start off with some permanent markings (plus the usual fiducial markings). Maybe different paper or whiteboards for a given function? The fiducials could tell the image detection software what the board is used for, and how to interpret it. So, you could have 1 fiducial for a 4x8 step sequencer, another for a 2x16 step sequencer, for example?

http://reactivision.sourceforge.net/ has some good libs for image detection, with a good & large set of fiducials.
Back to top
View user's profile Send private message Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Fri May 15, 2009 10:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Great thinking, jksuperstar, if I may say so. I didn't even think of paper instead of whiteboard. You know, those presentation easels that are like gigantic notepads. That way each song that you made would be preserved for future use.

And for the paper version the fiducials and demarkation lines and circles could be projected onto the paper.

Also this concept, if it worked, would make a great performance demo. People would definitely applaud that one. I want to see it in action at EM10, so let's get to it!

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
hugues_bc



Joined: May 15, 2009
Posts: 14
Location: Montreal

PostPosted: Fri May 15, 2009 11:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I want to see it in action at EM10, so let's get to it!

EM10 ? I'd love to go to USA. Perhaps Youtube in the meantime.

I got a bunch of ideas now. I think it's time to dive in experiment see what works best and let other threads bump to the top.

Thank you very much for your interest, comments and suggestions.
Back to top
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2488
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Fri May 15, 2009 1:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure I fully explained my intent: By using permanent marker on a dry erase baord, one could erase the "data", but everything else (fiducials, demarkation, etc) would all still be there. Then use dry-erase markers for your "data". Quickly edit & change what's being played, probably in real-time. I'd think academia would love this, as it's not too far away from what most profs do anyway Wink
Back to top
View user's profile Send private message Visit poster's website
hugues_bc



Joined: May 15, 2009
Posts: 14
Location: Montreal

PostPosted: Mon May 18, 2009 3:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes I understood what you mean JK.

- I began experimenting with the following technique:
Printed template on paper
Color marker
Scanner

First test pictures Very Happy

Template, image file
Posted Image, might have been reduced in size. Click Image to view fullscreen.

* Scan, template with handwritten red marker
Posted Image, might have been reduced in size. Click Image to view fullscreen.

* Image recognition, filters and algorithms
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Intersect, test to verify proper alignment
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Animation
Posted Image, might have been reduced in size. Click Image to view fullscreen.

* Actual scanned files and pictures processed within my application
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 2 [26 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use