{"id":17860141,"url":"https://github.com/dbetchkal/stringtranscribe","last_synced_at":"2025-04-02T20:14:43.559Z","repository":{"id":160105465,"uuid":"132296749","full_name":"dbetchkal/stringtranscribe","owner":"dbetchkal","description":"a simple way to transcribe and visualize music across stringed instruments","archived":false,"fork":false,"pushed_at":"2020-10-01T20:17:03.000Z","size":340,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T10:43:16.346Z","etag":null,"topics":["music-composition","music-notation","music-theory","stringed-instruments"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbetchkal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-06T01:17:57.000Z","updated_at":"2021-05-06T17:47:09.000Z","dependencies_parsed_at":"2023-07-06T10:16:05.669Z","dependency_job_id":null,"html_url":"https://github.com/dbetchkal/stringtranscribe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbetchkal%2Fstringtranscribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbetchkal%2Fstringtranscribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbetchkal%2Fstringtranscribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbetchkal%2Fstringtranscribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbetchkal","download_url":"https://codeload.github.com/dbetchkal/stringtranscribe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246884767,"owners_count":20849554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["music-composition","music-notation","music-theory","stringed-instruments"],"created_at":"2024-10-28T07:22:45.999Z","updated_at":"2025-04-02T20:14:43.538Z","avatar_url":"https://github.com/dbetchkal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stringtranscribe\n\u003cb\u003e A simple class to transcribe and visualize music across stringed instruments. \u003c/b\u003e\n\nImagine 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](https://en.wikipedia.org/wiki/Tablature),) further constraining the ability of the group to learn new songs.\n\nThe 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.\n\nFidelity to the harmonic structure of a song is expressed by the concept of [_**raag**_](https://en.wikipedia.org/wiki/Raga) within the context of Indian classical music:\n\u003e\"A harmonious note, melody, formula, or building block of music available to a musician to construct a state of experience in the audience.\"\n\n\n## A note on the color scheme\n\nThroughout 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](https://en.wikipedia.org/wiki/Letter_notation) or [integer notation](https://en.wikipedia.org/wiki/Pitch_class#Integer_notation), where \"C\" = 0. \n\nTo maximize contrast in the plots, progressive colors of the chromatic color wheel are assigned to progressive notes of the [circle of 5ths](https://en.wikipedia.org/wiki/Circle_of_fifths) - 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.\n\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/ColorNotationWheel_altScheme.png\" width=\"400\"\u003e\n\n\n## The `Instrument` class\n\nWe begin using the module by initializing an instrument. \n\nFor now, instruments are assumed to have:\n\n- a fingerboard (_fretted or not_) with a certain range of notes feasible for the musician to play\n- a certain number of strings, each tuned to a specific note\n\nHere's how you would initialize an acoustic guitar in [Open C tuning](https://en.wikipedia.org/wiki/Open_C_tuning) using letter notation:\n```\nopenC_guitar = Instrument(num_frets = 14, tuning = [\"C\", \"G\", \"C\", \"E\", \"G\", \"C\"], notation = \"letter\")\n```\n\nThis one's a fiddle, where the player only uses the 1st, 2nd, and 3rd hand positions:\n```\nfiddle = Instrument(num_frets = 10, tuning = [\"G\", \"D\", \"A\", \"E\"], notation = \"letter\")\n```\n\n---\n\nSince 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.\nBut 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:\n```\nopenC_guitar.raag([\"D\",\"F#\",\"A\"])\n```\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/D_chord-OpenC_guitar_letter.png\" width=\"1200\"\u003e\n\nQuite a few playable possibilities! \u003cbr\u003e\u003cbr\u003e\n\nIt 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:\n\n```\nopenC_guitar.raag(openC_guitar.tabToLetter([2, 2, 2, 2, 2, 2]))\n```\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/D_chord-OpenC_guitar_letter.png\" width=\"1200\"\u003e\n\n---\n\nNow, 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:\n\n```\nfiddle.raag(openC_guitar.tabToLetter([2, 2, 2, 2, 2, 2]))\n```\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/D_chord-fiddle_letter.png\" width=\"800\"\u003e\n\n---\n\nThe 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_):\n```\nopenC_guitar.raag(openC_guitar.tabToLetter([0, 9, 10, 8, 10, \"x\"]))\n```\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/unknown_chord-OpenC_guitar.png\" width=\"1200\"\u003e\n\n\u003cbr\u003e\n\nHere are the same notes mapped onto the neck of a lap steel guitar in C6 tuning:\n```\nsteelGuitar = Instrument(24, [0, 4, 7, 9, 0, 4])\nsteelGuitar.raag(openC_guitar.tabToLetter([0, 9, 10, 8, 10, \"x\"]))\n```\n\u003cimg src=\"https://github.com/dbetchkal/stringtranscribe/blob/master/static/unknown_chord-lapsteelC6.png\" width=\"1200\"\u003e\n\nLots of choices for moving counter-melody!\n\n\u003cbr\u003e\n\n## Downloading and using this module\n\nUse [git](https://git-scm.com/) to clone the repository.  Using the path to the repository on your local disk, import the `Instrument` class: \n\n```\nimport sys\nsys.path.append(r\"\\*\\*\\stringtranscribe\")\n\nfrom stringtranscribe import Instrument \n```\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis work is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003eCreative Commons Attribution 4.0 International License\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbetchkal%2Fstringtranscribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbetchkal%2Fstringtranscribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbetchkal%2Fstringtranscribe/lists"}