Skip to content

Commit

Permalink
prepare 6.2.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrosen committed Nov 12, 2023
1 parent 85eb3d4 commit 01ec19a
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 57 deletions.
39 changes: 37 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
# Version 6.2.2
# Version 6.2.3

## Features

* Add expandToWidest option

* Added synonyms for glissando: ~( and ~)

* Extracted arrays in parse/abc_parse_music to parse/abc_parse_settings
* allow passing in soundfont and debug callback when playing an event directly.

* Add a `getIsRunning()` function to enable play/pause

## Bugs

* fix placement of triangle notehead

* Guard against crash when the synth note wasn't loaded.

* fix crash when skipping a staff when creating tablature

* protect against spurious mouse click in selection

* Add paddingleft to the size of the SVG - it was cut off if the padding was larger than the default.

* various typescript fixes

* afterParsing now works with line wrapping.

* Put start and end char on slurs so they can be selected.

* fixed type of timing callback: TimingEvent is now NoteTimingEvent

## Documentation

* Add tablature to typescript types

* add missing items to documentation

# Version 6.2.2

## Features

* Make "mandolin" and "fiddle" synonyms for "violin" in tablature.

Expand All @@ -17,6 +51,7 @@
* Fix bug in Firefox that causes staff lines, bar lines, and stems to be missing.

* Fix bug in Firefox that cuts off the last line of the SVG.

# Version 6.2.1

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

Large diffs are not rendered by default.

128 changes: 76 additions & 52 deletions dist/abcjs-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -6345,6 +6345,18 @@ var multilineVars;
var tune;
var tuneBuilder;
var header;
var _require = __webpack_require__(/*! ./abc_parse_settings */ "./src/parse/abc_parse_settings.js"),
legalAccents = _require.legalAccents,
volumeDecorations = _require.volumeDecorations,
dynamicDecorations = _require.dynamicDecorations,
accentPseudonyms = _require.accentPseudonyms,
accentDynamicPseudonyms = _require.accentDynamicPseudonyms,
nonDecorations = _require.nonDecorations,
durations = _require.durations,
pitches = _require.pitches,
rests = _require.rests,
accMap = _require.accMap,
tripletQ = _require.tripletQ;
var MusicParser = function MusicParser(_tokenizer, _warn, _multilineVars, _tune, _tuneBuilder, _header) {
tokenizer = _tokenizer;
warn = _warn;
Expand Down Expand Up @@ -6412,7 +6424,6 @@ var MusicParser = function MusicParser(_tokenizer, _warn, _multilineVars, _tune,
// double-quote: chord symbol
// less-than, greater-than, slash: duration
// back-tick, space, tab: space
var nonDecorations = "ABCDEFGabcdefgxyzZ[]|^_{"; // use this to prescreen so we don't have to look for a decoration at every note.

var isInTie = function isInTie(multilineVars, overlayLevel, el) {
if (multilineVars.inTie[overlayLevel] === undefined) return false;
Expand Down Expand Up @@ -6821,7 +6832,7 @@ MusicParser.prototype.parseMusic = function (line) {
// Create a warning if this is not a displayable duration.
// The first item on a line is a regular note value, each item after that represents a dot placed after the previous note.
// Only durations less than a whole note are tested because whole note durations have some tricky rules.
var durations = [0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.25, 0.375, 0.4375, 0.46875, 0.484375, 0.4921875, 0.125, 0.1875, 0.21875, 0.234375, 0.2421875, 0.24609375, 0.0625, 0.09375, 0.109375, 0.1171875, 0.12109375, 0.123046875, 0.03125, 0.046875, 0.0546875, 0.05859375, 0.060546875, 0.0615234375, 0.015625, 0.0234375, 0.02734375, 0.029296875, 0.0302734375, 0.03076171875];

if (el.duration < 1 && durations.indexOf(el.duration) === -1 && el.duration !== 0) {
if (!el.rest || el.rest.type !== 'spacer') warn("Duration not representable: " + line.substring(startI, i), line, i);
}
Expand Down Expand Up @@ -6969,11 +6980,6 @@ function durationOfMeasure(multilineVars) {
if (!meter.value || meter.value.length === 0) return 1;
return parseInt(meter.value[0].num, 10) / parseInt(meter.value[0].den, 10);
}
var legalAccents = ["trill", "lowermordent", "uppermordent", "mordent", "pralltriller", "accent", "fermata", "invertedfermata", "tenuto", "0", "1", "2", "3", "4", "5", "+", "wedge", "open", "thumb", "snap", "turn", "roll", "breath", "shortphrase", "mediumphrase", "longphrase", "segno", "coda", "D.S.", "D.C.", "fine", "beambr1", "beambr2", "slide", "marcato", "upbow", "downbow", "/", "//", "///", "////", "trem1", "trem2", "trem3", "trem4", "turnx", "invertedturn", "invertedturnx", "trill(", "trill)", "arpeggio", "xstem", "mark", "umarcato", "style=normal", "style=harmonic", "style=rhythm", "style=x", "style=triangle", "D.C.alcoda", "D.C.alfine", "D.S.alcoda", "D.S.alfine", "editorial", "courtesy"];
var volumeDecorations = ["p", "pp", "f", "ff", "mf", "mp", "ppp", "pppp", "fff", "ffff", "sfz"];
var dynamicDecorations = ["crescendo(", "crescendo)", "diminuendo(", "diminuendo)", "glissando(", "glissando)"];
var accentPseudonyms = [["<", "accent"], [">", "accent"], ["tr", "trill"], ["plus", "+"], ["emphasis", "accent"], ["^", "umarcato"], ["marcato", "umarcato"]];
var accentDynamicPseudonyms = [["<(", "crescendo("], ["<)", "crescendo)"], [">(", "diminuendo("], [">)", "diminuendo)"]];
var letter_to_accent = function letter_to_accent(line, i) {
var macro = multilineVars.macros[line[i]];
if (macro !== undefined) {
Expand Down Expand Up @@ -7100,19 +7106,6 @@ var letter_to_bar = function letter_to_bar(line, curr_pos) {
if (retRep.len === 0 || retRep.token[0] === '-') return [orig_bar_len, ret.token];
return [ret.len + retRep.len, ret.token, retRep.token];
};
var tripletQ = {
2: 3,
3: 2,
4: 3,
5: 2,
// TODO-PER: not handling 6/8 rhythm yet
6: 2,
7: 2,
// TODO-PER: not handling 6/8 rhythm yet
8: 3,
9: 2 // TODO-PER: not handling 6/8 rhythm yet
};

var letter_to_open_slurs_and_triplets = function letter_to_open_slurs_and_triplets(line, i) {
// consume spaces, and look for all the open parens. If there is a number after the open paren,
// that is a triplet. Otherwise that is a slur. Collect all the slurs and the first triplet.
Expand Down Expand Up @@ -7246,38 +7239,6 @@ var addEndBeam = function addEndBeam(el) {
if (el.duration !== undefined && el.duration < 0.25) el.end_beam = true;
return el;
};
var pitches = {
A: 5,
B: 6,
C: 0,
D: 1,
E: 2,
F: 3,
G: 4,
a: 12,
b: 13,
c: 7,
d: 8,
e: 9,
f: 10,
g: 11
};
var rests = {
x: 'invisible',
X: 'invisible-multimeasure',
y: 'spacer',
z: 'rest',
Z: 'multimeasure'
};
var accMap = {
'dblflat': '__',
'flat': '_',
'natural': '=',
'sharp': '^',
'dblsharp': '^^',
'quarterflat': '_/',
'quartersharp': '^/'
};
var getCoreNote = function getCoreNote(line, index, el, canHaveBrokenRhythm) {
//var el = { startChar: index };
var isComplete = function isComplete(state) {
Expand Down Expand Up @@ -7565,6 +7526,67 @@ module.exports = MusicParser;

/***/ }),

/***/ "./src/parse/abc_parse_settings.js":
/*!*****************************************!*\
!*** ./src/parse/abc_parse_settings.js ***!
\*****************************************/
/***/ (function(module) {

module.exports.legalAccents = ['trill', 'lowermordent', 'uppermordent', 'mordent', 'pralltriller', 'accent', 'fermata', 'invertedfermata', 'tenuto', '0', '1', '2', '3', '4', '5', '+', 'wedge', 'open', 'thumb', 'snap', 'turn', 'roll', 'breath', 'shortphrase', 'mediumphrase', 'longphrase', 'segno', 'coda', 'D.S.', 'D.C.', 'fine', 'beambr1', 'beambr2', 'slide', 'marcato', 'upbow', 'downbow', '/', '//', '///', '////', 'trem1', 'trem2', 'trem3', 'trem4', 'turnx', 'invertedturn', 'invertedturnx', 'trill(', 'trill)', 'arpeggio', 'xstem', 'mark', 'umarcato', 'style=normal', 'style=harmonic', 'style=rhythm', 'style=x', 'style=triangle', 'D.C.alcoda', 'D.C.alfine', 'D.S.alcoda', 'D.S.alfine', 'editorial', 'courtesy'];
module.exports.volumeDecorations = ['p', 'pp', 'f', 'ff', 'mf', 'mp', 'ppp', 'pppp', 'fff', 'ffff', 'sfz'];
module.exports.dynamicDecorations = ['crescendo(', 'crescendo)', 'diminuendo(', 'diminuendo)', 'glissando(', 'glissando)', '~(', '~)'];
module.exports.accentPseudonyms = [['<', 'accent'], ['>', 'accent'], ['tr', 'trill'], ['plus', '+'], ['emphasis', 'accent'], ['^', 'umarcato'], ['marcato', 'umarcato']];
module.exports.accentDynamicPseudonyms = [['<(', 'crescendo('], ['<)', 'crescendo)'], ['>(', 'diminuendo('], ['>)', 'diminuendo)']];
module.exports.nonDecorations = 'ABCDEFGabcdefgxyzZ[]|^_{'; // use this to prescreen so we don't have to look for a decoration at every note.

module.exports.durations = [0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.25, 0.375, 0.4375, 0.46875, 0.484375, 0.4921875, 0.125, 0.1875, 0.21875, 0.234375, 0.2421875, 0.24609375, 0.0625, 0.09375, 0.109375, 0.1171875, 0.12109375, 0.123046875, 0.03125, 0.046875, 0.0546875, 0.05859375, 0.060546875, 0.0615234375, 0.015625, 0.0234375, 0.02734375, 0.029296875, 0.0302734375, 0.03076171875];
module.exports.pitches = {
A: 5,
B: 6,
C: 0,
D: 1,
E: 2,
F: 3,
G: 4,
a: 12,
b: 13,
c: 7,
d: 8,
e: 9,
f: 10,
g: 11
};
module.exports.rests = {
x: 'invisible',
X: 'invisible-multimeasure',
y: 'spacer',
z: 'rest',
Z: 'multimeasure'
};
module.exports.accMap = {
dblflat: '__',
flat: '_',
natural: '=',
sharp: '^',
dblsharp: '^^',
quarterflat: '_/',
quartersharp: '^/'
};
module.exports.tripletQ = {
2: 3,
3: 2,
4: 3,
5: 2,
// TODO-PER: not handling 6/8 rhythm yet
6: 2,
7: 2,
// TODO-PER: not handling 6/8 rhythm yet
8: 3,
9: 2 // TODO-PER: not handling 6/8 rhythm yet
};

/***/ }),

/***/ "./src/parse/abc_tokenizer.js":
/*!************************************!*\
!*** ./src/parse/abc_tokenizer.js ***!
Expand Down Expand Up @@ -18719,10 +18741,12 @@ Decoration.prototype.dynamicDecoration = function (voice, decoration, abselem, p
};
this.startCrescendoX = undefined;
break;
case '~(':
case "glissando(":
this.startGlissandoX = abselem;
glissando = undefined;
break;
case '~)':
case "glissando)":
glissando = {
start: this.startGlissandoX,
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 01ec19a

Please sign in to comment.