Mechanical Music Digest  Archives
You Are Not Logged In Login/Get New Account
Please Log In. Accounts are free!
Logged In users are granted additional features including a more current version of the Archives and a simplified process for submitting articles.
Home Archives Calendar Gallery Store Links Info

Spring Fundraising Drive In Progress. Please visit our home page to see this and other announcements: https://www.mmdigest.com     Thank you. --Jody

MMD > Archives > August 1995 > 1995.08.10 > 05Prev  Next


Re: Making new music box cylinders
By Will Dahlgren

On this subject, Larry Smith replied to my questions:

>>What are the basic sizes of the cylinders you want to make?
>
>I would say, somewhere between a foot long and three inches
>wide, up to about two feet long, and about six inches wide.
>
>>Do you know how to program in say, Basic on a PC?
>
>;)  I can program in anything, on anything.
>
>>How many cylinders do you want to make?
>
>Don't know, really.  Mostly I'm in this for my
>own amusement, and to that extent, perhaps a dozen or two
>over a period of years.  However, like the fellow who does
>disks out in Ca. this could become a nice sideline hobby -
>if it pays for at least some of my music box habit, I can
>defend it.  =)
>
>>Do you have a capital budget of $1500-2500 or so for equipment?
>
>Yes, I could pull that together.  What dost thou have in mind?
>
>regards,
>Larry

As others in this group have replied, Numerical Control equipment can
certainly do the hole drilling. Automatic pin insertion is probably not in
the offing for this small a project.

There are two major alternatives:  Find a shop with the right blend of CNC
equipment or build your own.

I am going to assume that the Music is in MIDI.  The first step is to extract
the required information from a MIDI file.  I have tried decoding binary MIDI
files and basically gave up.  I found it is much easier to run a program that
translates binary MIDI into ASCII text files.  One such public domain program
is MF2ASC.EXE written by David Fetter.  What you get looks something like:

[TIMEBASE]
480
[VARS]
Now=0   ; (DWORD) Now
marker time
From=0  ; (DWORD)
From marker time
Thru=60752      ; (DWORD) Thru
marker time
KeySig=0        ; (BYTE) Key signature (0=C, 1=C#, ... 11=B)
Clock=0 ; (BYTE) Clock Source (0=Internal, 1=MIDI,
2=FSK)
AutoSave=0      ; (BYTE) Autosave (0=disabled, 1..256=minutes)
PlayDelay=0     ; (BYTE) PlayDelay
ZeroCtrls=0     ; (BOOL) Zero continuous controllers?
SendSPP=1       ; (BOOL) Send Song Position
Pointer?
SendCont=1      ; (BOOL) Send MIDI Continue?
PatchSearch=0   ; (BOOL) Patch/controller search-
back?
AutoStop=0      ; (BOOL) Auto-stop?
StopTime=4294967295     ; (DWORD) Auto-stop time
AutoRewind=0    ; (BOOL) Auto-rewind?
RewindTime=0    ; (DWORD) Auto-rewind time
MetroPlay=0     ; (BOOL) Metronome on during playback?
MetroRecord=1   ; (BOOL) Metronome on during recording?
MetroAccent=0   ; (BOOL) Metronome accents primary
beats?
CountIn=1       ; (BYTE) Measures of count-in (0=no
count-in)
ThruOn=1        ; (BOOL) MIDI Thru enabled?
AutoRestart=0   ; (BOOL) Auto-restart?
CurTempoOfs=1   ; (BYTE) Which of the 3 tempo offsets is
used
TempoOfs1=32    ; (BYTE) Fixed-point ratio value of offset 1
TempoOfs2=64    ; (BYTE) Fixed-point ratio value of offset 2
TempoOfs3=128   ; (BYTE) Fixed-point ratio value of offset 3
PunchEnabled=0  ; (BOOL) Auto-Punch enabled?
PunchInTime=0   ; (DWORD)
Punch-in time
PunchOutTime=0  ; (DWORD)
Punch-out time
EndAllTime=60752        ; (DWORD) Time of latest event (incl. all tracks)
[TRACK]
0 "" "" 1 0 0 0 0 255
[STREAM]
0
1617
1 0 N 65 64 256
1 0 N 53 64 199
1 343 N 46 64 840
1 372 N 53 64 811
1 400 N 62 64 610
1 432 N 65 64 753
1 460 N 70 64 752
1 489 N 74 64 756
1 692 C 64 127
1 998 C 64 0
1 1240 N 38 64 288
1 1240 N 57 64 346
.
1 123861 N 86 64 867
1 124152 N 94 64 636
1 124785 N 34 64 1272
1 125958 C 64 0
1 126288 C 123 0
[METERMAP]
1
1 4/4
[TEMPOMAP]
1
0 120
[END]

The only area we need is the [STREAM].  If one can program in Basic, or
something, it is relarively simple to read in this text file and extract the
stuff we need.  Below, the "1617" is the number of events.  The lines with an
"N" are note events.  The fields are channel number, time (in ticks), N, note
number, on velocity, and duration (again, in ticks).  For cylinders, the only
info we need is the time (which will be converted to distance around the
circumference and note number, which will convert to didtance along the
length.

So, are frist event below happens at time 0 and is note 65 (F5 on most
sequencer programs).

[STREAM]
0
1617
1 0 N 65 64 256
1 0 N 53 64 199
1 343 N 46 64 840

Note that there may be control events which have a "C" in them.  These can be
ignored.

1 692 C 64 127

So we read in the N events and maybe put the numbers we need in an array.
 Now we can use that information to control our equipment.

If we are going to use a machine shop, then we have to learn the CNC codes
that control the equipment.  Hopefully there will be a manual that will give
the details.  If not, then studying the codes from a simple hand entered job
will probably teach us enough.  I haven't looked at CNC codes for years, but
essentially there will be some preamble stuff, a goto X,Y (our Y will be
rotation) and a drill subroutine for the Z azis.  Repeat the X,Y,drill
sequence for all the holes.

Hopefully, the machine shop will be able to take an IBM disk that has our
program output.  This will just be part of finding the right machine shop.
 Most shops in a given area know the capabilities of the others so just take
a sample into the nearest shop and they can probably steer you on.

Personally, the really fun part would be building my own machine.  I would
start with a "junk" metal lathe.  By junk, I mean one that has a broken part
or is worn past it's usefullness for precision machine work.  I would drive
the head and lead screw with stepper motors geared down by timing belts.  The
drilling operation could be stepper driven or done by hand.  If done by hand,
the program would stop at each hole and wait for a keystroke before going on
to the next hole.  A drill press bolted to the lathe should do the job.

To drive the steppers, there are probably 10-15 "kits" on the market that
have PC boards that plug into your PC.  Some have a control box that accepts
the commands via the serial or parallel port.  So, for this direction, our
translation program, running on our PC, would directly control our homemade
machine.  Costs range from $150 to $300 per axis.  One point is that you do
not need very powerful steppers if you gear them down enough.  The tradeoff
is time, which is not a big concern here.

Well, that's the "easier said than done" basics.  Any questions, feel free.

Will Dahlgren

[ Editor's Note:
[    I like the approach of converting MIDI files to ASCII using a
[ public-domain program as a way of "simplifying" the programming problem.
[ For those with a good background in C programming and access to the Internet,
[ there is an archive of MIDI "stuff" at UCSD:    ftp://ftp.ucsd.edu/midi
[ which includes documentation, scores, C Source code for reading MIDI files,
[ and other "good" stuff.  I've used some of the documentation and program
[ source code and its good for "free" stuff.  Serious programming efforts would
[ benefit from a copy of the official specs from the Midi Manufacturer's
[ Association.  I suppose I'll have to put that address and phone number
[ in (doesn't-exist-yet) FAQ.
[
[ Jody


(Message sent Thu 10 Aug 1995, 19:19:51 GMT, from time zone GMT-0400.)

Key Words in Subject:  box, cylinders, Making, music, new

Home    Archives    Calendar    Gallery    Store    Links    Info   


Enter text below to search the MMD Website with Google



CONTACT FORM: Click HERE to write to the editor, or to post a message about Mechanical Musical Instruments to the MMD

Unless otherwise noted, all opinions are those of the individual authors and may not represent those of the editors. Compilation copyright 1995-2024 by Jody Kravitz.

Please read our Republication Policy before copying information from or creating links to this web site.

Click HERE to contact the webmaster regarding problems with the website.

Please support publication of the MMD by donating online

Please Support Publication of the MMD with your Generous Donation

Pay via PayPal

No PayPal account required

                                     
Translate This Page