GithubHelp home page GithubHelp logo

kellycode / chordialjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laher/chordialjs

0.0 0.0 0.0 516 KB

Chord chart utility for web. Make progressions and interactive tabluation apps

Home Page: http://www.laher.net.nz/ChordialJS/

License: Other

JavaScript 100.00%

chordialjs's Introduction

ChordialJS

Chord chart utility for web. Make progressions and interactive tabluation apps.

Draw guitar chords inside an html5 Canvas, harness a library of chords, and some other bells and whistles in the making.

ChordJS was originally based on top of ChordJS, but Aaron's code has been rewritten a bit now.

Samples

Give it a try

Features

ChordialJS.chords:

ChordialJS comes with a small but growing chord library.

  • Chord types: so far 'major', 'minor', 'seventh', 'sus2', 'sus4' and 'dim' chords included
  • Tunings: so far, guitar (standard tuning) and ukulele (gCEA)

ChordialJS.data.scales, and chord progressions:

  • You can use the ChordialJS.data.scales data to tabulate chord progressions.
  • Initially just the major keys are available for building chord progressions.

Other options:

  • any chord chart can easily be reversed for 'lefties'
  • support for different 'tuning's (currently limited to standard guitar or ukulele).

Code

Fork me on GitHub

For full details, see the samples included, but the following snippets should give you an idea.

  1. Include dist/Chordial-x.x.x.js (e.g. Chordial-0.0.3.js) in script tags. Chordial doesn't need JQuery or any other libraries.

  2. Lay down some chords.

    • Tabulate a collection of chords. In this case, the major chords for standard guitar tuning:
<script>
   var definitions=[];
   for (var note in ChordialJS.data.chords.standard.major) {
	definitions.push({ note: note, 'size': 3, 'lefty': false });
   }
   ChordialJS.renderChords(document.getElementById('container1'),definitions);
</script>
- Or, make a chord progression. In this example I'm creating a I,IV,V progression for each key.
<script>
   var defs= [];
   for (var note in ChordialJS.data.scales.major) {
	var ch= ChordialJS.data.scales.major[note];
	defs.push({ note: ch[0][0] });
	defs.push({ note: ch[3][0] });
	defs.push({ note: ch[4][0] });
   }
   ChordialJS.renderChords(container, defs);
</script>

Build

If you already have grunt.js, just type grunt.

Grunt can be installed using 'npm' - the Node.js package manager.

On Debian Linux, you install grunt as follows:

 sudo apt-get install npm
 sudo npm install -g grunt
 grunt

chordialjs's People

Contributors

laher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.