Skip to content

mittelmark/tcrd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcrd

license Release Downloads Commits Docu Package

Writing chord sheets from lyrics and chord diagrams using Tcl.

Description

The package tcrd allow you to write chord sheets from lyrics with embedded chords and create svg graphics from short text descriptions like 0003 for an Ukulele C chord diagram or xx0231 for a Guitar Dm chord.

Synopsis

package require tcrd
package require tsvg
tcrd transpose A 1 ;# - Bb
tcrd svgchord C 0003 -outfile uke-c.svg ;# Uke Chord
puts [tcrd chordsheet {[Dm]Are you going to [C]Scarborough [Dm]Fair?}]

Example

package require tcrd
tcrd svgchords C  x32010 -outfile guitar-c.svg -width 150
tcrd svgchords Dm xx0231 -outfile guitar-dm.svg -width 150
tcrd svgchords Em 022000 -outfile guitar-em.svg -width 150
tcrd svgchords F  x03211 -outfile guitar-f.svg -width 150
tcrd svgchords G  320003 -outfile guitar-g.svg -width 150
tcrd svgchords Am x02210 -outfile guitar-am.svg -width 150

And here how we can create a chord sheet:

puts [tcrd chordsheet {
[Dm]Are you going to [C]Scarborough [Dm]Fair? 
[F]Parsley, [Dm]sage, rose [F]mary [G]and [Dm]thyme 
Remember [F]me to one who [C]lives there 
[Dm]He once [C]was a true love of [Dm]mine
}]

Output:

Dm               C           Dm     
Are you going to Scarborough Fair?  
F        Dm         F    G   Dm     
Parsley, sage, rose mary and thyme  
         F             C            
Remember me to one who lives there  
Dm      C                  Dm   
He once was a true love of mine 

Changes

  • 2026-01-01 - v0.0.1 - initial release as Tcl package

SEE ALSO

  • tsvg - writing svg files with Tcl
  • mndoc - converting Markdown output of tmdoc to HTML
  • tmdoc - literate programming with Tcl using the tcrd package to display music chord sheets and chord diagrams

AUTHOR

@ 2025 - Detlef Groth, University of Potsdam, Germany - dgroth(at)uni(minus)potsdam(dot)de

LICENSE

BSD 3-Clause License

Copyright (c) 2020-2025, Detlef Groth, University of Potsdam, Germany

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.