Author Topic: Guitar/Bass Fret Board Modeler (s)  (Read 10163 times)

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Guitar/Bass Fret Board Modeler (s)
« on: September 30, 2015, 06:51:26 am »
Hello all.  This is my first post to the CamBam forum.  I've been browsing around, picking up bits of information and I finally think I have something tangible to share.

I built my CNC machine to make custom basses and guitars.  I've been using CamBam to prototype some instruments for the last few weeks and I've written a simple script to automate several tedious aspects of the initial layout for a new instrument.

This Fret Board Modeler allows you to specify a number of fretboard characteristics such as width at nut, width at some reference fret, scale length, number of frets, fretboard radius, and more and sets up the primitives for radiusing the fretboard, cutting the fret slots, routing the outline of the fretboard (and a matching neck pocket).  It uses a function that is readily available online to calculate the fret spacing based on scale length.

In addition to laying out essential cuts the tool also allows you to specify string gauges and preferred spacing at the nut (equal centers vs. equal spaces) as well as bridge spacing and draws a representation of the strings which could be used to lay out tuner placement and headstock shapes.  Other reference marks are also generated.

Each object (outline, neck pocket, fretboard radius, fret slots, etc.) is created in its own layer.  Some layers are hidden by default.

I should also mention this tool is written using inch measurements.

I'm no VBScript programmer (C/Unix is my trade) and I certainly haven't been coding CB scripts for very long so I may have implemented something that could be done more easily or elegantly.  Suggestions for improvement are welcome.

I've done somewhat to document what could be the more confusing math involved but, to be honest, a lot of the script is outputting bunches of polylines to keep me from having to tediously enter offsets and values manually every time I want to try something new.  There are loads of global variables at the top of the script to modify to specify fretboard characteristics which should be fairly self explanatory.

Please take a look if you're interested.  Open a new CB document and run it..  change values..  experiment.  Hopefully one or more of the forum members will find it useful or at least amusing.

Dan

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #1 on: September 30, 2015, 08:51:19 am »
Dan,
Thanks for the effort, I'll give it a go and report back.  ;D
Regarding fret slots, what cutter are you using ?
Also are you considering string numbers ranging 4 to 8 , compound radius, and fan fret instruments ?
« Last Edit: September 30, 2015, 09:02:15 am by EddyCurrent »
Made in England

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2985
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #2 on: September 30, 2015, 11:46:16 am »
WELCOME here Dan! Thanks for your contribution. Even thou I'm not onto instrument making I'm pretty sure somebody will find your script useful. Good luck on your project.
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #3 on: September 30, 2015, 14:41:24 pm »
Dan,
Thanks for the effort, I'll give it a go and report back.  ;D
Regarding fret slots, what cutter are you using ?
Also are you considering string numbers ranging 4 to 8 , compound radius, and fan fret instruments ?

Hmm...  "whoa!! baby steps!"  :)

At the moment I'm using a very narrow (20 degree) V cutter/ PCB engraving bit I picked up on eBay, really just to mark the fret slots so I can take my (manual) fret saw to them.  I have to say I'm only looking for this script to produce something I can take and hand-sand to final shape since so much of neck work relies on having the instrument fully assembled and under string tension.

I do have a PreciseBits fret cutting bit in mind (item #MM3I8-0230-009FC) for the eventual cutting and I think StewMac also sells one.  They're a bit pricey and at this prototyping stage I'm trying to avoid the waste of time and money on broken bits.  I've put the PreciseBits cutter on my Christmas wish list.

This script is tested to 5 strings on a 35 inch scale length.  I'm focusing primarily on bass layout for now but the concept should carry over to guitar with little to no modification.  The attached picture shows the result of a 22.5 inch scale length 4 string "micro-bass" (similar to Liuteria 3G).

I will eventually get to compound radius but for now this only handles fixed radius.  Fanned fret is also a future improvement but my son, the bass player I'm doing all this for, doesn't really like fanned fret basses so it's pretty low on my priority list.

I failed to mention, the radius cutting is based on 10bulls' sloped surface and should be cut as an engraving operation in a similar way (0 depth, no optimization).  The fret slots should be engraved as well but depending on the cutter I imagine using multiple passes and appropriate feeds and speeds).  Everything else is your usual pocket or profile as you'd expect.

Also, I sort of shamelessly lifted the MakeNewLayer function from one of your own scripts.  Thanks for that!  If I recall, I also borrowed some concepts from scripts submitted by lloydsp and dh42 besides the aforementioned 10bulls so all credit where credit is due.  I felt like I was borrowing so much that I should give something back.  I do have a "Sloped Surface Following A Polyline" script I've been working on (also based on 10bulls' and others' concepts) for defining the belly cut contour on the back of a bass body.  I will share that after I run another test or two.

As mentioned, there's plenty of room for improvement in this script.  Like, I realize if I connect the arcs that define the fretboard radius then the machine won't get such a workout in the z-axis and I also realize the radius is only approximate since I and using an end mill and I'm not properly compensating for the bit diameter.  Any software is a work in progress until it's no longer used.  Your feedback is appreciated. :)

D

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 3978
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #4 on: September 30, 2015, 15:18:03 pm »
I have a couple of the Stewart MacDonald downcut endmills that I use for name engraving in wood, and I have to say I really like them for it.  Once you buy something from them they email you periodic little tidbits and tips on instrument making.  Not something I actually have any use for, but its nice that their periodic emails are not "just" spam.  When you consider the price of other high quality micro end mills like Harvey Tool or MicroCut USA The StewMac aren't all that expensive. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #5 on: September 30, 2015, 15:50:17 pm »
Dan,
Nice and tidy code that works well, excellent job. As for using code from other peoples projects, well that's what it's all about, we all do it  :D

I tried it with some settings for a 24 fret 7 string similar to an Ibanez, it worked a treat. see pic.

I can see you are going to be an excellent contributer to CamBam Dan.

Here's one I made earlier  ;D
« Last Edit: September 30, 2015, 19:10:56 pm by EddyCurrent »
Made in England

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #6 on: September 30, 2015, 18:45:29 pm »
WELCOME here Dan! Thanks for your contribution. Even thou I'm not onto instrument making I'm pretty sure somebody will find your script useful. Good luck on your project.
I have a couple of the Stewart MacDonald downcut endmills that I use for name engraving in wood, and I have to say I really like them for it...

Bubba and Bob,

Thanks for the warm welcome and info.  As I mentioned I've been lurking around for a bit before actually trying to contribute something and I am thoroughly impressed by the way you guys all interact with each other.  Seems like there's a strong sense of community.  That's the sort of dynamic I like to see and be part of.

D

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #7 on: September 30, 2015, 18:57:25 pm »
Dan,
Nice and tidy code that works well, excelent job. As for using code from other peoples projects, well that's what it's all about, we all do it  :D

I tried it with some settings for a 24 fret 7 string similar to an Ibanez, it worked a treat. see pic.

I can see you are going to be an excellent contributer to CamBam Dan.

Here's one I made earlier  ;D


EddyCurrent that's comforting validation of the work.  So often I create tools just to meet my own needs and simply hope anyone might find it passingly interesting if not actually sort of useful.

Your 7 string image looks good and I'm curious as to whether you set the fretboard corner radius to 0 or modified the layout afterward to get the sharp corners.  I added in the corner radius calculations because..  well.. router bits cut round holes :D.  My wife, the high school math teacher, is especially proud of those little arcs since she "took over" the quadratic equation while I "inherited" cooking dinner one night.

I have to say the pic of the guitar is just gorgeous.  Something to aspire to since I'm really just starting out on the "build from scratch" effort.  Plenty of "buy broken stuff from eBay and fix it" though...

D

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #8 on: September 30, 2015, 19:06:44 pm »

Your 7 string image looks good and I'm curious as to whether you set the fretboard corner radius to 0 or modified the layout afterward to get the sharp corners.  

Yes I set corner radius to 0, the reason being that the fretboard ends just on the perimeter of the pickup cavity so nothing to route out for it.

Quote
I have to say the pic of the guitar is just gorgeous.  Something to aspire to since I'm really just starting out on the "build from scratch" effort.  Plenty of "buy broken stuff from eBay and fix it" though...

That was the second guitar I ever made, but I had 'studied' them for a long time. I used a overhead pin router to cut some parts. The body is swamp ash with a wenge top. Laminated neck with volute at the headstock (Gibson style angled neck scarf joint, see pic.)

Did you read this thread ? http://www.cambam.co.uk/forum/index.php?topic=4333.0
« Last Edit: October 01, 2015, 15:59:28 pm by EddyCurrent »
Made in England

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #9 on: September 30, 2015, 21:28:27 pm »
Yes I set corner radius to 0, the reason being that the fretboard ends just on the perimeter of the pickup cavity so nothing to rout out for it.

Wow, I'd better actually write code to handle a 0 corner radius then.  Chances are there's the tiniest little arc you've ever seen in each of those corners which is totally absurd when you think about it. :D

Quote
That was the second guitar I ever made, but I had 'studied' them for a long time. I used a overhead pin router to cut some parts. The body is swamp ash with a wenge top. Laminated neck with volute at the headstock (Gibson style angled neck scarf joint, see pic.)


Did you read this thread ? http://www.cambam.co.uk/forum/index.php?topic=4333.0

That's a beauty for sure and you've now given my son ideas as to what I will be accomplishing for him.  Thanks  :-[

Yes I have read that thread and I decided rather than using a second tool to lay out the belly cut contour I'd rather write a script based on 10bulls' sloped surface script.  It requires 2 or 3 open polylines selected in a particular order:

1) curve you want the slope to follow
2) single segment vector-like line segment defining direction and length of slope
3) optional bounding curve

I cut the belly contour on my second prototype micro-bass body using it..  shown in the pic.

Since I cut that prototype I added in some very basic optimization and correction for bit diameter.  I'm planning on uploading that script by the end of the weekend since I want to test the new stuff somewhat before showing it to anyone else.

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #10 on: September 30, 2015, 21:36:10 pm »
For the belly cut I used a drawknife, very satisfying tool to use; http://www.axminster.co.uk/english-pattern-drawknife
Made in England

Offline HLMEI

  • Ewok
  • *
  • Posts: 16
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #11 on: October 01, 2015, 22:32:17 pm »
For the belly cut I used a drawknife, very satisfying tool to use; http://www.axminster.co.uk/english-pattern-drawknife

Ha!  I'd probably find a way to lop my arm off even while holding that thing with both hands.  But, point taken... there's only so much I should expect the machine to do for me before I attack the work with other hand/power tools.

In reading through that thread you mentioned above I see several other concepts I think I'll probably try to implement as some sort of CB script - like a sloped surface meeting a curve (instead of from a curve), and I'd really like to derive/find the math to route the back of the neck from simple specifications instead of using Rhino or Sketchup or something to generate an STL etc.

No promises on that stuff..  it's pretty "pie in the sky".

This should be fun.

D

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #12 on: October 02, 2015, 07:48:24 am »
This may be of interest ? http://www.cambam.co.uk/forum/index.php?topic=5146.msg40402#msg40402

Wow, I'd better actually write code to handle a 0 corner radius then.  Chances are there's the tiniest little arc you've ever seen in each of those corners which is totally absurd when you think about it. :D

Maybe it's okay as it is, there should be not sharp edges on a guitar, comfort is one reason but another is that lacquer will not cover a sharp edge, it must have a radius to flow around, however small.
« Last Edit: October 02, 2015, 11:23:37 am by EddyCurrent »
Made in England

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2985
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #13 on: October 02, 2015, 11:53:59 am »
Dan,
Nice and tidy code that works well, excellent job. As for using code from other peoples projects, well that's what it's all about, we all do it  :D

I tried it with some settings for a 24 fret 7 string similar to an Ibanez, it worked a treat. see pic.

I can see you are going to be an excellent contributer to CamBam Dan.

Here's one I made earlier  ;D


Wow, nice looking piece of work Eddy, and I like the contrasting wood combination. ;)
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4468
    • View Profile
Re: Guitar/Bass Fret Board Modeler (s)
« Reply #14 on: October 02, 2015, 12:03:37 pm »
Bubba, thanks for that, it's partly due to the good photo my son took  ;D
Made in England