December 3rd, 2002, 02:24 PM
Storing Guitar Songs in a Database
I am wondering if anyone knows of a good way to store/organize guitar music in a database. This would include lyric text, guitar tabulature and how the two are coordinated. Does anyone have any ideas?
Thanks in advance
December 3rd, 2002, 11:27 PM
Hmm, a long list of chords per track?
Well, two simple tables:
and a look-up table:
FINGER_PATTERN VARCHAR(5) ... assuming you use five fingers.
Would store the data.
GUITAR_TAB could be a long sequence of two digit numbers from 00 (a rest) upwards that represent a CHORDID in the look-up table. This way you simply do a while loop in your program to get all the chords back.
Now, as you rightly say, you need to calculate the coordination of the two... hence you need to replicate some sequencing method such as Cubase where each value is given a duration. This is easy for the guitar tabliture as you simply add another two digits to the two for the chord, these two representing the duration. How you do the duration of the lyrics though is something I can't work out. Possibly you give each word a duration, but then it makes the adding and extraction of lyrics a complicated one, no simple cut and paste job. When extracting the lyrics you have to somehow get the figure and the word separate, not impossible but not easy.
December 18th, 2002, 04:28 PM
Based on the info provided, two tables would exist. One table for the guitar tabs and one for the lyric text. When you say database, hopefully that is a reference to a SQL DBMS with relational qualities. The reason why is so you query information from both tables. Anyway the most important part is having a surrogate key (a computer created unique identifier), which exist in both tables (same surrogate key in both tables). That way if the lyric text changes and the guitar tab does not, then you can update the lyric text table without creating any update anomalies and vice versa. The two tables are connected via the surrogate key, which provides referential intergrity.