guitar chord html5,GitHub - czp1623/react-chord-generator: Generator for generating chords of guitar...

react-chord-generator

Generator for generating chords of guitar or ukulele in the form of svg.

This project is a sub project of Guitar-Editor.

I got the inspiration from website 有谱么 (A Chinese guitar tabs website).

However, the ways we define a chord are totally different. It takes me

2 days to transfer all their chords data into mine. I have to say their way

to define a chord is easier.

Screenshot

42daad8dc84226199812157221985cc0.png

Directory

├── README.md

├── package.json

├── src

│   ├── App.js ## Entry point

│   ├── components

│   │   └── Chord

│   │   ├── Chord.jsx

│   │   ├── CustomChord

│   │   │   ├── CustomChord.jsx ## CustomChord component

│   │   │   ├── styles.css

│   │   │   └── utils.js ## Files to calculate position of svg

│   │   └── chords.js ## Normal chord component

│   ├── dataSource

│   │   └── chords.js ## All chords data

│   ├── index.js

│   └── registerServiceWorker.js

└── yarn.lock

How to run

$ npm install

$ npm start

How to use

chordName can be 'Am', 'C', 'Fm' ...

All Chords

4f6bf4f87858cd6555a0eb23734960bf.png

e0243790ff31965c8f329a3b92366110.png

2404a344c5cbcd2e9bb427f98dce2b9b.png

Advanced

How to define a chord

There is a component called CustomChord nested in Chord component.

For this component, everything should be well defined by yourself.

chord should be an object like this:

let chord = {

"name": "F",

"crosses": [],

"points": [{"x": 1, "y": 2.5, "text": "3"}, {"x": 2, "y": 2.5, "text": "4"}, {"x": 3, "y": 1.5, "text": "2"}],

"lines": [{"text": 1, "start": {"x": 0, "y": 0.5}, "end": {"x": 5, "y": 0.5}}],

"min": {"text": "", "x": -1, "y": -1},

"max": {"text": "", "x": -1, "y": -1}

}

Then put it into the component.

The rules are as followed:

Instruction.JPG

Guitar Lyrics

Want to see how to use this to compo with text? Please check this out.

Guitar tabs editor

If you like this project, maybe you love my Guitar-Editor.

You can edit a guitar tab with the online editor.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值