コードブック

B's Chord Book

2026-08-09 / Takeda no Oto

A personal revival of a small tool I wrote many years ago.

I missed the right time to release it, then lost it to a hard drive crash before it was ever truly finished.

The version I released more than ten years ago was built with Macromedia Flash. Back then it was a rare cross-platform environment where the same program worked on both Mac and Windows. I even sampled my own guitar just for the playback.

Today, Flash has disappeared from modern browsers for security reasons. On the other hand, Modern browsers can generate sound using vanilla JavaScript, with no plugins or external libraries required at all.
That was enough to make me think, “Why not build it again?”

It originally started as a way to remember those mysterious chord shapes I discovered while experimenting with DADGAD tuning and open voicings.

Even if I wrote them on paper or saved them in a text file, they always seemed to disappear. I thought that if they could be printed neatly like a music sheet, I’d be much more likely to keep them. That simple idea became the starting point.

This isn’t just another chord book. It’s a notation tool for building your own chord book.

It draws chord diagrams directly in your browser, and clicking one plays a simple preview of the chord. That’s pretty much the entire user interface. Take the source, write your own CSS, and make it fit your own layout.

Basic Usage

In most cases, simply specify the chord name.

Common chord shapes are loaded from the built-in database. If you want a different fingering, simply describe it yourself.

<div class="chord"
     name="Intro"
     start="5"
     str="0,1,3,3,0,x">
</div>

If you don’t know the chord name, simply leave name="".
The played notes will be displayed instead. Keep them as a memo, or ask your favorite AI:

What is the best chord name for these notes?

Layout

Just arrange the chord diagrams in order, and you’ll have something that feels like a lead sheet.

<div class="chord" name="D"></div>
<div class="chord same"></div>
<div class="chord" name="G"></div>

<div class="break"></div>

<div class="chord" name="A"></div>

class="chord same"
duplicates the previous chord. Useful when the same shape appears repeatedly.

class="break"
simply starts a new line. Arrange the diagrams however you like.

The rest is just CSS. Make it yours. The source code is intentionally kept simple. Feel free to look inside and make it your own.

Sometimes it’s better to preserve the sound than the name.

Print

Adjust the print layout however you like using @media print. Hiding navigation bars, headers, and other on-screen elements with display: none; usually works well. Here’s one example.
@media print {
 .site-header,
 .breadcrumb,
 .post-navigation,
 .site-footer nav {
   display: none;
 }
}

Reference

  • Sample1
  • Download
  • There are no restrictions on modification or redistribution. Add your own spice, then pass it on.