Skip to content

Commit

Permalink
Prepare version 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrosen committed Jun 15, 2024
1 parent 1c0775b commit 48e5f37
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

* Add swing to the playback

* Allow swing, bassprog, bassvol, chordprog, chordvol, and gchord to be set in the options.
* Allow swing, bassprog, bassvol, chordprog, chordvol, and gchord to be set in the options, and also on the fly.

* Add findSelectableElement and getSelectableArray functions to help with hover.

Expand Down
2 changes: 1 addition & 1 deletion dist/abcjs-basic-min.js

Large diffs are not rendered by default.

48 changes: 41 additions & 7 deletions dist/abcjs-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11429,7 +11429,7 @@ var pitchesToPerc = __webpack_require__(/*! ./pitches-to-perc */ "./src/synth/pi
drumDefinition = normalizeDrumDefinition(element.params);
alignDrumToMeter();
break;
case "gchord":
case "gchordOn":
chordTrack.gChordOn(element);
break;
case "beat":
Expand All @@ -11447,6 +11447,13 @@ var pitchesToPerc = __webpack_require__(/*! ./pitches-to-perc */ "./src/synth/pi
case "beataccents":
doBeatAccents = element.value;
break;
case "gchord":
case "bassprog":
case "chordprog":
case "bassvol":
case "chordvol":
chordTrack.paramChange(element);
break;
default:
// This should never happen
console.log("MIDI creation. Unknown el_type: " + element.el_type + "\n"); // jshint ignore:line
Expand Down Expand Up @@ -12979,13 +12986,13 @@ var parseCommon = __webpack_require__(/*! ../parse/abc_common */ "./src/parse/ab
break;
case "gchordoff":
voices[voiceNumber].push({
el_type: 'gchord',
el_type: 'gchordOn',
tacet: true
});
break;
case "gchordon":
voices[voiceNumber].push({
el_type: 'gchord',
el_type: 'gchordOn',
tacet: false
});
break;
Expand All @@ -13008,15 +13015,21 @@ var parseCommon = __webpack_require__(/*! ../parse/abc_common */ "./src/parse/ab
});
break;
case "vol":
case "volinc":
voices[voiceNumber].push({
el_type: 'vol',
el_type: elem.cmd,
volume: elem.params[0]
});
break;
case "volinc":
case "swing":
case "gchord":
case "bassprog":
case "chordprog":
case "bassvol":
case "chordvol":
voices[voiceNumber].push({
el_type: 'volinc',
volume: elem.params[0]
el_type: elem.cmd,
param: elem.params[0]
});
break;
default:
Expand Down Expand Up @@ -13369,6 +13382,27 @@ ChordTrack.prototype.barEnd = function (element) {
ChordTrack.prototype.gChordOn = function (element) {
if (!this.chordsOff) this.gChordTacet = element.tacet;
};
ChordTrack.prototype.paramChange = function (element) {
switch (element.el_type) {
case "gchord":
this.overridePattern = parseGChord(element.param);
break;
case "bassprog":
this.bassInstrument = element.param;
break;
case "chordprog":
this.chordInstrument = element.param;
break;
case "bassvol":
this.boomVolume = element.param;
break;
case "chordvol":
this.chickVolume = element.param;
break;
default:
console.log("unhandled midi param", element);
}
};
ChordTrack.prototype.finish = function () {
if (!this.chordTrackEmpty())
// Don't do chords on more than one track, so turn off chord detection after we create it.
Expand Down
2 changes: 1 addition & 1 deletion dist/abcjs-basic.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/abcjs-plugin-min.js

Large diffs are not rendered by default.

0 comments on commit 48e5f37

Please sign in to comment.