Skip to content

a simple way to transcribe and visualize music across stringed instruments

Notifications You must be signed in to change notification settings

dbetchkal/stringtranscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stringtranscribe

A simple class to transcribe and visualize music across stringed instruments.

Imagine you're playing music with an unconventional ensemble made up of an electric bass ukulele, 5-string electric octave mandolin, and a lap steel guitar in C6 tuning. Outside of the most basic chords, odds are that you and your friends are not going to have a clear way of communicating song structure to one another. To further complicate things, casual musicians may only be familiar with one type of notation (say, tabulature,) further constraining the ability of the group to learn new songs.

The purpose of this repository is to provide a way to transcribe music across a wide variety of stringed instruments. By visualizing notes directly on the fretboard of the musician's instrument it attempts to facilitate the exploration of more nuanced harmony when learning compositions. It also allows musicians to choose the notation that suits their learning best.

Fidelity to the harmonic structure of a song is expressed by the concept of raag within the context of Indian classical music:

"A harmonious note, melody, formula, or building block of music available to a musician to construct a state of experience in the audience."

A note on the color scheme

Throughout this module I use a color scheme that leverages the agreement between the chromatic scale in music and the chromatic color wheel in pigments, both of which have twelve values. The module allows for use of either letter notation or integer notation, where "C" = 0.

To maximize contrast in the plots, progressive colors of the chromatic color wheel are assigned to progressive notes of the circle of 5ths - each representing seven steps of the chromatic scale. Note D#/3 (blue-violet) is shown as pink, and G/7 (red-orange) is shown as brown.

The Instrument class

We begin using the module by initializing an instrument.

For now, instruments are assumed to have:

  • a fingerboard (fretted or not) with a certain range of notes feasible for the musician to play
  • a certain number of strings, each tuned to a specific note

Here's how you would initialize an acoustic guitar in Open C tuning using letter notation:

openC_guitar = Instrument(num_frets = 14, tuning = ["C", "G", "C", "E", "G", "C"], notation = "letter")

This one's a fiddle, where the player only uses the 1st, 2nd, and 3rd hand positions:

fiddle = Instrument(num_frets = 10, tuning = ["G", "D", "A", "E"], notation = "letter")

Since the guitar is in a major open tuning we know one obvious way to play a D-major chord is to barre across the 2nd fret. But what other ways of voicing D-major are available? Knowing the letter names of the notes in a D-major chord we can use the .raag() method to find out:

openC_guitar.raag(["D","F#","A"])

Quite a few playable possibilities!

It turns out we can return the same information even if we didn't know the note names in a 'D' chord. Instead we can use our pre-existing knowledge of the 2nd fret barre chord to provide alternative fingerings. We convert from tabulature to letter notation using the .tabToLetter() method:

openC_guitar.raag(openC_guitar.tabToLetter([2, 2, 2, 2, 2, 2]))


Now, what can the fiddler play that would sound good along with the guitar? Any notes the guitar is playing might be a good start (others could work within the harmonic structure of the song, but this module can't suggest those!) Use .raag() to transfer the letter notes from the guitar onto the fiddle fingerboard:

fiddle.raag(openC_guitar.tabToLetter([2, 2, 2, 2, 2, 2]))


The real power of this tool is when fidelity to a subtle chord progression is paramount. Take for instance the following chord (a C11 with no 5th):

openC_guitar.raag(openC_guitar.tabToLetter([0, 9, 10, 8, 10, "x"]))


Here are the same notes mapped onto the neck of a lap steel guitar in C6 tuning:

steelGuitar = Instrument(24, [0, 4, 7, 9, 0, 4])
steelGuitar.raag(openC_guitar.tabToLetter([0, 9, 10, 8, 10, "x"]))

Lots of choices for moving counter-melody!


Downloading and using this module

Use git to clone the repository. Using the path to the repository on your local disk, import the Instrument class:

import sys
sys.path.append(r"\*\*\stringtranscribe")

from stringtranscribe import Instrument 

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

About

a simple way to transcribe and visualize music across stringed instruments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages