Artifact Content
Artifact 2463609aeb77bd2cd407e5f0d1ac9a6a13ab6cfe3511740b5b04c0148a0af501:
- File public/teoria-master/lib/sugar.js — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 449)
var knowledge = require('./knowledge'); module.exports = function(teoria) { var Note = teoria.Note; var Chord = teoria.Chord; var Scale = teoria.Scale; Note.prototype.chord = function(chord) { var isShortChord = chord in knowledge.chordShort; chord = isShortChord ? knowledge.chordShort[chord] : chord; return new Chord(this, chord); }; Note.prototype.scale = function(scale) { return new Scale(this, scale); }; };