Grasshopper

algorithmic modeling for Rhino

# Guitar Nut conundrum: equal spaces and equal centers question

hello,

i'm playing around trying to make a nut-slot template maker for guitars. Basically there are two ways to cut the little grooves on the top end of the guitars neck (the nut):

1. equal centres:  the nut's width is divided in equal segments resulting in queal spacing from string center to string center but the spacing bewteen the top strings is smaller than between the lower strings. It's not very comfortable to play, on bass guitar it's really awkward

2. equal spaces: the nut is divided so that the spacing between the outer edges of all 6 strings is the same. Since eachstring has a different width (gauge) this requires some calculations but is much more comfortable to play

i have attached my pathetic simple attempt at creating this. It works for 'equal centres' but i can't really figure out several things:

A. how to use a table or list of values as an input for the string gauges. Ideally i would like to select from different 'sets' of strings so that i can create different nut templates for different thickness strings easily. So ideally i would like to select a preset like: 'light', 'ultra light', 'medium', 'light top heavy bottom' and then it would adjust everything according to the different string gauges defined in those sets/lists.

B. how to use metric units for the spacing of the top and bottom strings to the fretboard/neck edge. I have tried to do it by eyeballing it with the 'point on curve' element which i'm pretty sure is not the way to do it properly. I want to be able to simply input this in mm, so for example a 4mm distance from the strings to the fretboard edge.

C. how to figure out the 'equal spaces' and divide the bridge and nut curves accordingly so that the distance from the outside edge of the top and bottom strings to the fretboard is equal, and the spacing between the strings outer edges (not the centres) is equal.

would really appreciate any help or tips to point me into the right direction :)

Views: 937

Attachments:

### Replies to This Discussion

Hide the V2 preview ("edge space" group) to see the segments of 'eNut' and 'eBridge':

ok i have to be honest and admit that i am a bit lost for the moment, i really want to learn from your patch but it's going to take me time, when i finished school in the final math exam i got 1 out of 15 points and my teacher said to  me afterwards: "Chris, you know that the one point was a sympathy point don't you ?" ... so baby steps but i'm catchin up ..

to help me follow the breadcrumbs through the patch could you maybe dumb it down extremely for me and just list a couple of steps how the system functions, sth like. 1) define string gauge- 2) draw neck liine 3) calculate spacing or sth like that, like a super high level overview. it's great that you have grouped, named and colored everything (many many thx for that !) this helps a lot for my understanding but you are using so many components i have never used that it's a bit difficult at the moment to follow the logical flow.

BUT: everything pans out now and spacing is perfect and all is centered ... with this one can build guitars :-)

BUT: everything pans out now and spacing is perfect and all is centered ... with this one can build guitars :-)

Thank you, sir, that is high praise indeed!

The model evolved from your original question about keeping the same gap between six strings of different diameters (gauges).  Then different length bass and treble scales were added, to be aligned by fret number, without affecting string lengths or spacing.

The "virtual loom" defines important aspects of the guitar's neck geometry, with its 'vNut', 'vBridge' and 'vStrings'.  It is the basis for all that follows.

I created clusters here and there, simple, reusable components like 'NeckL' and 'Frets'.  Open them!  See how they work.

Alignment of the bass string/scale by fret happens by plane intersection from the treble string fret points.  The difference between that point and it's own fret point is the vector used to slide the base scale (string, line, curve) along the 'vBass' string ('bass cntr').

After that, lines are adjusted and trimmed accordingly.  Cheers.

Attachments:

Added another pair of offset tables for the intersection points along the edges ('eBass' and 'eTreble') of the extended frets.  I added a 'Frets' cluster to get fret points along the same edge, to see if they are different - and they are!  Slightly... and easily fixed.

Slight adjustment of the 'Edge_Bridge' slider, from 4.5 to 4.5487 yields "perfect" alignment!

Attachments:

I'll just add this update to the end.  Mostly cosmetic puttering, trying to make the code clearer.  Added some tables for X and Y offsets.

Attachments:

• View All