Upload 337 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .babelrc +5 -0
- .gitignore +11 -0
- .gitmodules +3 -0
- .npmignore +20 -0
- CODE_OF_CONDUCT.md +76 -0
- CONTRIBUTING.md +1 -0
- Dockerfile +9 -0
- LICENSE.md +21 -0
- README0.md +127 -0
- RELEASE.md +2770 -0
- SECURITY.md +9 -0
- abcjs-audio.css +187 -0
- deploy-docs.sh +19 -0
- dist/.gitignore +1 -0
- dist/abcjs-basic-min.js +0 -0
- dist/abcjs-basic-min.js.LICENSE +23 -0
- dist/abcjs-basic.js +0 -0
- dist/abcjs-basic.js.map +0 -0
- dist/abcjs-plugin-min.js +0 -0
- dist/abcjs-plugin-min.js.LICENSE +23 -0
- docker-build.sh +1 -0
- docker-compose.yml +10 -0
- docker-start.sh +1 -0
- docs/.vuepress/client.js +12 -0
- docs/.vuepress/components.js +37 -0
- docs/.vuepress/components/AbcjsEditor.vue +67 -0
- docs/.vuepress/components/CheckBox.vue +130 -0
- docs/.vuepress/components/ExampleTuneBook.vue +199 -0
- docs/.vuepress/components/FieldSet.vue +28 -0
- docs/.vuepress/components/FoundClasses.vue +95 -0
- docs/.vuepress/components/NumTunes.vue +27 -0
- docs/.vuepress/components/RadioGroup.vue +111 -0
- docs/.vuepress/components/RenderAbc.vue +39 -0
- docs/.vuepress/components/RenderAudio.vue +40 -0
- docs/.vuepress/components/SandboxCode.vue +39 -0
- docs/.vuepress/components/SandboxContainer.vue +127 -0
- docs/.vuepress/components/SandboxInput.vue +135 -0
- docs/.vuepress/components/SandboxOutput.vue +87 -0
- docs/.vuepress/components/ShowAndRenderAbc.vue +42 -0
- docs/.vuepress/components/TimingCallbacks.vue +189 -0
- docs/.vuepress/components/TuneBookInfo.vue +85 -0
- docs/.vuepress/components/example-strings-css.js +55 -0
- docs/.vuepress/components/example-strings-js-audio.js +208 -0
- docs/.vuepress/components/example-strings-js-cursor.js +126 -0
- docs/.vuepress/components/example-strings-js-drag.js +100 -0
- docs/.vuepress/components/example-strings-js.js +79 -0
- docs/.vuepress/components/example-strings.js +107 -0
- docs/.vuepress/config.js +16 -0
- docs/.vuepress/public/favicon.ico +0 -0
- docs/.vuepress/public/fonts/itim-music.svg +16 -0
.babelrc
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"presets": [
|
| 3 |
+
"@babel/preset-env"
|
| 4 |
+
]
|
| 5 |
+
}
|
.gitignore
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.idea/*
|
| 2 |
+
tmp/*
|
| 3 |
+
/node_modules
|
| 4 |
+
/coverage
|
| 5 |
+
to-*.sh
|
| 6 |
+
docs/.vuepress/.cache/*
|
| 7 |
+
docs/.vuepress/.temp/*
|
| 8 |
+
docs/.vuepress/.dist/*
|
| 9 |
+
dist/report.html
|
| 10 |
+
.eslintrc.json
|
| 11 |
+
.DS_Store
|
.gitmodules
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[submodule "docs/.vuepress/dist"]
|
| 2 |
+
path = docs/.vuepress/dist
|
| 3 |
+
url = https://github.com/paulrosen/abcjs.git
|
.npmignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.idea/
|
| 2 |
+
dist/*.html
|
| 3 |
+
build-utils/
|
| 4 |
+
docs/
|
| 5 |
+
examples/
|
| 6 |
+
font_generator/
|
| 7 |
+
tests/
|
| 8 |
+
tmp/
|
| 9 |
+
|
| 10 |
+
.babelrc
|
| 11 |
+
.eslintrc
|
| 12 |
+
.gitmodules
|
| 13 |
+
deploy-docs.sh
|
| 14 |
+
docker-start.sh
|
| 15 |
+
docker-build.sh
|
| 16 |
+
docker-compose.yml
|
| 17 |
+
Dockerfile
|
| 18 |
+
start-version.sh
|
| 19 |
+
webpack.config.js
|
| 20 |
+
to-*.sh
|
CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributor Covenant Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
In the interest of fostering an open and welcoming environment, we as
|
| 6 |
+
contributors and maintainers pledge to making participation in our project and
|
| 7 |
+
our community a harassment-free experience for everyone, regardless of age, body
|
| 8 |
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
| 9 |
+
level of experience, education, socio-economic status, nationality, personal
|
| 10 |
+
appearance, race, religion, or sexual identity and orientation.
|
| 11 |
+
|
| 12 |
+
## Our Standards
|
| 13 |
+
|
| 14 |
+
Examples of behavior that contributes to creating a positive environment
|
| 15 |
+
include:
|
| 16 |
+
|
| 17 |
+
* Using welcoming and inclusive language
|
| 18 |
+
* Being respectful of differing viewpoints and experiences
|
| 19 |
+
* Gracefully accepting constructive criticism
|
| 20 |
+
* Focusing on what is best for the community
|
| 21 |
+
* Showing empathy towards other community members
|
| 22 |
+
|
| 23 |
+
Examples of unacceptable behavior by participants include:
|
| 24 |
+
|
| 25 |
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
| 26 |
+
advances
|
| 27 |
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
| 28 |
+
* Public or private harassment
|
| 29 |
+
* Publishing others' private information, such as a physical or electronic
|
| 30 |
+
address, without explicit permission
|
| 31 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
| 32 |
+
professional setting
|
| 33 |
+
|
| 34 |
+
## Our Responsibilities
|
| 35 |
+
|
| 36 |
+
Project maintainers are responsible for clarifying the standards of acceptable
|
| 37 |
+
behavior and are expected to take appropriate and fair corrective action in
|
| 38 |
+
response to any instances of unacceptable behavior.
|
| 39 |
+
|
| 40 |
+
Project maintainers have the right and responsibility to remove, edit, or
|
| 41 |
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
| 42 |
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
| 43 |
+
permanently any contributor for other behaviors that they deem inappropriate,
|
| 44 |
+
threatening, offensive, or harmful.
|
| 45 |
+
|
| 46 |
+
## Scope
|
| 47 |
+
|
| 48 |
+
This Code of Conduct applies both within project spaces and in public spaces
|
| 49 |
+
when an individual is representing the project or its community. Examples of
|
| 50 |
+
representing a project or community include using an official project e-mail
|
| 51 |
+
address, posting via an official social media account, or acting as an appointed
|
| 52 |
+
representative at an online or offline event. Representation of a project may be
|
| 53 |
+
further defined and clarified by project maintainers.
|
| 54 |
+
|
| 55 |
+
## Enforcement
|
| 56 |
+
|
| 57 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
| 58 |
+
reported by contacting the project team at blog@paulrosen.net. All
|
| 59 |
+
complaints will be reviewed and investigated and will result in a response that
|
| 60 |
+
is deemed necessary and appropriate to the circumstances. The project team is
|
| 61 |
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
| 62 |
+
Further details of specific enforcement policies may be posted separately.
|
| 63 |
+
|
| 64 |
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
| 65 |
+
faith may face temporary or permanent repercussions as determined by other
|
| 66 |
+
members of the project's leadership.
|
| 67 |
+
|
| 68 |
+
## Attribution
|
| 69 |
+
|
| 70 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
| 71 |
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
| 72 |
+
|
| 73 |
+
[homepage]: https://www.contributor-covenant.org
|
| 74 |
+
|
| 75 |
+
For answers to common questions about this code of conduct, see
|
| 76 |
+
https://www.contributor-covenant.org/faq
|
CONTRIBUTING.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Information about contributions to abcjs is available here: [Developers](https://paulrosen.github.io/abcjs/developers/pull-requests.html)
|
Dockerfile
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20.14.0
|
| 2 |
+
|
| 3 |
+
RUN npm install -g npm@8.19.2
|
| 4 |
+
|
| 5 |
+
RUN mkdir /srv/app && chown node:node /srv/app
|
| 6 |
+
|
| 7 |
+
# USER node
|
| 8 |
+
|
| 9 |
+
WORKDIR /srv/app
|
LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 4 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 5 |
+
in the Software without restriction, including without limitation the rights
|
| 6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 7 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 8 |
+
furnished to do so, subject to the following conditions:
|
| 9 |
+
|
| 10 |
+
The above copyright notice and this permission notice shall be included in
|
| 11 |
+
all copies or substantial portions of the Software.
|
| 12 |
+
|
| 13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 19 |
+
THE SOFTWARE.
|
| 20 |
+
|
| 21 |
+
**This text is from: http://opensource.org/licenses/MIT**
|
README0.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+

|
| 2 |
+
|
| 3 |
+
# Javascript library for rendering standard music notation in a browser.
|
| 4 |
+
|
| 5 |
+
This library makes it easy to incorporate **sheet music** into your **websites**. You can also turn visible **ABC** text into sheet music on websites that you don't own using a greasemonkey script, or change your own website that contains ABC text with no other changes than the addition of one javascript file. You can also generate **MIDI files** or play them directly in your browser.
|
| 6 |
+
|
| 7 |
+
[List of Examples](https://cdn.rawgit.com/paulrosen/abcjs/main/examples/toc.html)
|
| 8 |
+
|
| 9 |
+
Full documentation is here: [abcjs documentation](https://paulrosen.github.io/abcjs/)
|
| 10 |
+
|
| 11 |
+
There is an organization that has a collection of useful projects related to abcjs called [abcjs-music](https://github.com/abcjs-music). See some examples there. If you have a project that you think would be of general interest and would like to add it to that organization, contact me.
|
| 12 |
+
|
| 13 |
+
## Announcement: version 6.4.0
|
| 14 |
+
|
| 15 |
+
The method for creating chord accompaniment has changed. Hopefully there aren't any regressions but if you have an example that doesn't match what it used to be, please open an issue.
|
| 16 |
+
|
| 17 |
+
## Announcement: version 6.3.0
|
| 18 |
+
|
| 19 |
+
Most users won't see any difference, but there was some changes to the underlying SVG structure for the top (the title, etc.) and bottom (the notes, etc.) text, so if your code depends on particular classes then this might be a breaking change. Hopefully the new structure will be clearer and will allow css to target particular parts easier.
|
| 20 |
+
|
| 21 |
+
## Announcement: version 6.2.2
|
| 22 |
+
|
| 23 |
+
There was a major bug in Firefox 112 that causes some lines to disappear. That is supposed to be fixed in Firefox 113 but in the meantime this update will take care of the problem.
|
| 24 |
+
## Announcement: version 6.1.2
|
| 25 |
+
|
| 26 |
+
There is a little difference in the generated SVG: Now each line is surrounded with a `<g>` element. This probably won't affect your program unless you are doing very specific manipulation of the SVG.
|
| 27 |
+
|
| 28 |
+
## Announcement: version 6.1.0
|
| 29 |
+
|
| 30 |
+
There is a brand new transposing feature. This allows you to input an ABC string and get a new ABC back in a different key. See the documentation for details. I'm sure there are ways to expand this - let me know if your use case is missing.
|
| 31 |
+
|
| 32 |
+
## Announcement: version 6.0.0
|
| 33 |
+
|
| 34 |
+
After way too long, abcjs 6.0.0 is now out of beta.
|
| 35 |
+
|
| 36 |
+
There are only a few bug fixes since the last beta.
|
| 37 |
+
|
| 38 |
+
The current plan is to continue doing bug fixes and minor features to the 6.x.x branch, but version 7 is already in planning.
|
| 39 |
+
|
| 40 |
+
There are some minor features that will still be added to the version 6 branch, along with fixing transposition.
|
| 41 |
+
|
| 42 |
+
## Informal roadmap for version 7.0.0
|
| 43 |
+
|
| 44 |
+
There will be some architecture changes which will go in a 7.0.0 release:
|
| 45 |
+
|
| 46 |
+
* Improve the API for controlling the synth. That is, make the parameters less confusing.
|
| 47 |
+
* Create a plugin architecture so that large features that are not widely used can be added without bloating this library.
|
| 48 |
+
* Change the build to use typescript while still maintaining legacy browser capability.
|
| 49 |
+
* Reduce the size of the library by optimizing code.
|
| 50 |
+
* Control the spacing of the elements on the line better: support equal size measures, and support allowing control of the spacing between notes.
|
| 51 |
+
* Improved documentation, particularly for synth.
|
| 52 |
+
* Bug fixes.
|
| 53 |
+
|
| 54 |
+
I anticipate that for a user that wants the most common functionality, the size of the library might be cut in half.
|
| 55 |
+
|
| 56 |
+
Thanks, Paul
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## Major New Feature! 6.0.0-beta.36
|
| 60 |
+
|
| 61 |
+
String tablature is now available by adding an option to the `renderAbc` parameters. See [tablature documentation](https://paulrosen.github.io/abcjs/visual/tablature.html)
|
| 62 |
+
|
| 63 |
+
## Fix to audio in octave clefs 6.0.0-beta.31
|
| 64 |
+
|
| 65 |
+
If you are using an octave clef (for instance `K:C clef=treble-8`) it will now sound an octave different. The octave calculation was happening twice.
|
| 66 |
+
|
| 67 |
+
## Last version supporting midi.js is 6.0.0-beta.28
|
| 68 |
+
|
| 69 |
+
The file [abcjs version supporting midi.js](https://github.com/paulrosen/historical-abcjs-versions/blob/main/version-6/abcjs_midi-min.js) is the last version of the old style of sound production that will receive updates.
|
| 70 |
+
|
| 71 |
+
## Rename the default branch to `main`
|
| 72 |
+
|
| 73 |
+
The default branch is now named `main`. If you have cloned this repo previously, you can change it with:
|
| 74 |
+
```shell
|
| 75 |
+
git branch -m master main
|
| 76 |
+
git fetch origin
|
| 77 |
+
git branch -u origin/main main
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## New css for audio control 6.0.0-beta.27
|
| 81 |
+
|
| 82 |
+
Be sure to download the latest abcjs-audio.css file if you are using it. If you are styling the audio control with your own css, add the rule:
|
| 83 |
+
```css
|
| 84 |
+
.abcjs-css-warning {
|
| 85 |
+
display: none;
|
| 86 |
+
}
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Historical abcjs Packages 6.0.0-beta.27
|
| 90 |
+
|
| 91 |
+
Old versions of abcjs have been removed from this repo. If you are looking for them, you can find them here: [Historical Versions](https://github.com/paulrosen/historical-abcjs-versions)
|
| 92 |
+
|
| 93 |
+
## Breaking change when using midi.js for 6.0.0-beta.26
|
| 94 |
+
|
| 95 |
+
The midi.js package is no longer a direct dependency, it is now a peerDependency so it is not included by default. That way, users who aren't using the old style of sound generation won't need to load the package. If you are using the old style that uses midi.js, include this line in your `package.json` file:
|
| 96 |
+
|
| 97 |
+
```
|
| 98 |
+
"midi": "https://github.com/paulrosen/MIDI.js.git#abcjs"
|
| 99 |
+
```
|
| 100 |
+
Note that if you are using the minified version of the library with a `<script>` tag this does not apply to you.
|
| 101 |
+
|
| 102 |
+
## Change in wrapping behavior for 6.0.0-beta.25
|
| 103 |
+
|
| 104 |
+
There have been some tweaks to the way wrapping is calculated. Hopefully this will make your music layout a little better. If you start seeing odd results, let me know.
|
| 105 |
+
|
| 106 |
+
## Change in output folders for 6.0.0-beta.25
|
| 107 |
+
|
| 108 |
+
The files in `/bin` are being phased out. You can get the executables from `/dist` and the file names will not have the version number attached.
|
| 109 |
+
|
| 110 |
+
Many of the old versions that were in `/bin` are no longer kept in the active branches. If you need a particular old version then you can go to the branch with that tag to get it.
|
| 111 |
+
|
| 112 |
+
The last version in each major version number is still available in the active branch as well as many recent versions.
|
| 113 |
+
|
| 114 |
+
## Default soundfont change for 6.0.0-beta.21
|
| 115 |
+
|
| 116 |
+
In this beta the default soundfont was changed to https://paulrosen.github.io/midi-js-soundfonts/abcjs/ Hopefully you will find that sounds better. If you set the soundfont directly then you won't notice any change. If you prefer the old soundfont, use the `soundFontUrl: "https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/"` option when calling the synth functions.
|
| 117 |
+
|
| 118 |
+
## Issues
|
| 119 |
+
|
| 120 |
+
Thanks so much for the bug reports and feature requests that are pouring into the issues. I appreciate you taking the time to help improve abcjs. This is not a full time project, though, so I can't promise a quick turn around on the issues. I am going to attempt to be caught up on responding once a week at least.
|
| 121 |
+
|
| 122 |
+
And I would love some help on this project, including documentation, bug fixes, testing, refactoring, modernizing tools, and adding features. If you are so inclined, please get in touch.
|
| 123 |
+
|
| 124 |
+
## Supported by BrowserStack
|
| 125 |
+
If you aren't using the same browser and machine that I use, you can thank [BrowserStack](https://browserstack.com/) for their support of this open-source project.
|
| 126 |
+
|
| 127 |
+

|
RELEASE.md
ADDED
|
@@ -0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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Version 6.4.4
|
| 2 |
+
|
| 3 |
+
## Bugs
|
| 4 |
+
|
| 5 |
+
* Fix measure numbering when there are multi-measure rests.
|
| 6 |
+
|
| 7 |
+
* Fix crash when subtitle is right before setting the bar number.
|
| 8 |
+
|
| 9 |
+
* Don't allow the measure number to overlap the treble clef.
|
| 10 |
+
|
| 11 |
+
* Improved trill, mordent, and turn playback rendering.
|
| 12 |
+
|
| 13 |
+
* Increased measure number offset for wide measure numbers and treble clef.
|
| 14 |
+
|
| 15 |
+
* Not adding the top position if putting a measure number on the clef.
|
| 16 |
+
|
| 17 |
+
# Version 6.4.3
|
| 18 |
+
|
| 19 |
+
## Bugs
|
| 20 |
+
|
| 21 |
+
* If there is a slur or tie on the top or bottom of a line, make sure there is room for it.
|
| 22 |
+
|
| 23 |
+
* Fix for crash on malformed @ positioned annotations
|
| 24 |
+
|
| 25 |
+
* Fix call of getBpm() to use the specified tempo if it isn't supplied.
|
| 26 |
+
|
| 27 |
+
* Bring bass note in range if transposed out-of-range by a visual transpose
|
| 28 |
+
|
| 29 |
+
# Version 6.4.2
|
| 30 |
+
|
| 31 |
+
## Bugs
|
| 32 |
+
|
| 33 |
+
* Fix crash when there is a decoration on an invisible rest
|
| 34 |
+
|
| 35 |
+
* Fix crash when the same voice is set on a line
|
| 36 |
+
|
| 37 |
+
* Fix crash with rests in graces
|
| 38 |
+
|
| 39 |
+
* Fix crash with decoration on invisible rests
|
| 40 |
+
|
| 41 |
+
* Fix various crashes when declaring voices inline or after a line continuation
|
| 42 |
+
|
| 43 |
+
* Fix for */8 rhythm tempos for MIDI export
|
| 44 |
+
|
| 45 |
+
* Allow a midi volume of zero to mute a voice
|
| 46 |
+
|
| 47 |
+
* Fix bug in selecting the correct note for chord arpeggios
|
| 48 |
+
|
| 49 |
+
* Fix stemless chord parsing i.e. `[AB]0`
|
| 50 |
+
|
| 51 |
+
* Don't put lower decorations too low on beamed notes that are beamed up
|
| 52 |
+
|
| 53 |
+
## Features
|
| 54 |
+
|
| 55 |
+
* add power chords
|
| 56 |
+
|
| 57 |
+
* add patterns for 5/8, 7/8, 10/8 and 11/8
|
| 58 |
+
|
| 59 |
+
* Add octave= parameter to bassprog and chordprog
|
| 60 |
+
|
| 61 |
+
* allow an empty gchord to cancel a previously set gchord
|
| 62 |
+
|
| 63 |
+
# Version 6.4.1
|
| 64 |
+
|
| 65 |
+
## Bugs
|
| 66 |
+
|
| 67 |
+
* fix regression when playing a specified sequence instead of using visualObj
|
| 68 |
+
|
| 69 |
+
* don't inject a bass note when chords change mid-measure if the pattern doesn't start on a bass note.
|
| 70 |
+
|
| 71 |
+
# Version 6.4.0
|
| 72 |
+
|
| 73 |
+
## Features
|
| 74 |
+
|
| 75 |
+
* Support custom rhythm patterns in gChords
|
| 76 |
+
|
| 77 |
+
* Add swing to the playback
|
| 78 |
+
|
| 79 |
+
* Allow swing, bassprog, bassvol, chordprog, chordvol, and gchord to be set in the options, and also on the fly.
|
| 80 |
+
|
| 81 |
+
* Add findSelectableElement and getSelectableArray functions to help with hover.
|
| 82 |
+
|
| 83 |
+
* Add `drumOff` to the parameters so that the metronome can only be for the prep beats
|
| 84 |
+
|
| 85 |
+
* Allow an element to be passed into to the EditArea object in addition to an ID
|
| 86 |
+
|
| 87 |
+
* Add left alignment option ot time-based-layout
|
| 88 |
+
|
| 89 |
+
* Add timeBasedLayout parameter
|
| 90 |
+
|
| 91 |
+
* Add "stafftopmargin" directive
|
| 92 |
+
|
| 93 |
+
* Add tuneMetrics function
|
| 94 |
+
|
| 95 |
+
## Bugs
|
| 96 |
+
|
| 97 |
+
* Fix linespacing when using both oneSvgPerLine and scale
|
| 98 |
+
|
| 99 |
+
* fix placement of inverted fermata
|
| 100 |
+
|
| 101 |
+
* Fix end points of slurs when there are beams involved
|
| 102 |
+
|
| 103 |
+
* Fix bug with cursor not following a tie across a line break.
|
| 104 |
+
|
| 105 |
+
* Improve spacing on time-based layout when left aligned
|
| 106 |
+
|
| 107 |
+
* fix line distance when scaling
|
| 108 |
+
|
| 109 |
+
* fix abcjs-staff class appearing in two places
|
| 110 |
+
|
| 111 |
+
* fix bug in gchord sound when bass and chord programs are different
|
| 112 |
+
|
| 113 |
+
* Many small fixes to types
|
| 114 |
+
|
| 115 |
+
# Version 6.3.0
|
| 116 |
+
|
| 117 |
+
## Features
|
| 118 |
+
|
| 119 |
+
### Tablature
|
| 120 |
+
* Add tab feature `hideTabSymbol`
|
| 121 |
+
* Add 5-string tab named "fiveString"
|
| 122 |
+
|
| 123 |
+
### Synth
|
| 124 |
+
* change the default synth control options for "play" and "progress" to be true
|
| 125 |
+
* expose the MIDI creator function
|
| 126 |
+
|
| 127 |
+
### Rich Text
|
| 128 |
+
* allow up to 9 custom fonts in `%%setfont`
|
| 129 |
+
* for rich text fields, escape two dollar signs
|
| 130 |
+
* allow rich text in all non-music fields
|
| 131 |
+
* give all non-music fields a unique class
|
| 132 |
+
|
| 133 |
+
### Miscellaneous
|
| 134 |
+
* add abcjs-notehead class to note heads;
|
| 135 |
+
* add `accentAbove` parameter
|
| 136 |
+
* handle numbered tune names in the reverser
|
| 137 |
+
* support reversing tune names with ", a" and ", an", with a variable amount of whitespace and case-insensitive
|
| 138 |
+
|
| 139 |
+
## Bugs
|
| 140 |
+
* fix placement of tab staff when there is no label
|
| 141 |
+
* fix font placement bugs
|
| 142 |
+
* remove spurious quotes in font name in svg attribute
|
| 143 |
+
* Fix the name of the `abcjs-tab-number` class
|
| 144 |
+
* Fix tab staff height when there is a label
|
| 145 |
+
* Fix for crash when rendering multiple tab staves
|
| 146 |
+
* Offset breath mark to the right
|
| 147 |
+
* Center text when using `expandToWidest` set true
|
| 148 |
+
|
| 149 |
+
## Documentation
|
| 150 |
+
* add missing typescript types
|
| 151 |
+
* fix synth control types
|
| 152 |
+
* fixed some typescript types in the TimingCallbacks
|
| 153 |
+
|
| 154 |
+
# Version 6.2.3
|
| 155 |
+
|
| 156 |
+
## Features
|
| 157 |
+
|
| 158 |
+
* Add expandToWidest option
|
| 159 |
+
|
| 160 |
+
* Added synonyms for glissando: ~( and ~)
|
| 161 |
+
|
| 162 |
+
* allow passing in soundfont and debug callback when playing an event directly.
|
| 163 |
+
|
| 164 |
+
* Add a `getIsRunning()` function to enable play/pause
|
| 165 |
+
|
| 166 |
+
## Bugs
|
| 167 |
+
|
| 168 |
+
* fix placement of triangle notehead
|
| 169 |
+
|
| 170 |
+
* Guard against crash when the synth note wasn't loaded.
|
| 171 |
+
|
| 172 |
+
* fix crash when skipping a staff when creating tablature
|
| 173 |
+
|
| 174 |
+
* protect against spurious mouse click in selection
|
| 175 |
+
|
| 176 |
+
* Add paddingleft to the size of the SVG - it was cut off if the padding was larger than the default.
|
| 177 |
+
|
| 178 |
+
* various typescript fixes
|
| 179 |
+
|
| 180 |
+
* `afterParsing` now works with line wrapping.
|
| 181 |
+
|
| 182 |
+
* Put start and end char on slurs so they can be selected.
|
| 183 |
+
|
| 184 |
+
* fixed type of timing callback: TimingEvent is now NoteTimingEvent
|
| 185 |
+
|
| 186 |
+
## Documentation
|
| 187 |
+
|
| 188 |
+
* Add tablature to typescript types
|
| 189 |
+
|
| 190 |
+
* add missing items to documentation
|
| 191 |
+
|
| 192 |
+
# Version 6.2.2
|
| 193 |
+
|
| 194 |
+
## Features
|
| 195 |
+
|
| 196 |
+
* Make "mandolin" and "fiddle" synonyms for "violin" in tablature.
|
| 197 |
+
|
| 198 |
+
## Bugs
|
| 199 |
+
|
| 200 |
+
* Don't draw staff line for tabs twice if there are two voices on it.
|
| 201 |
+
|
| 202 |
+
* make the staff line the correct width in Firefox.
|
| 203 |
+
|
| 204 |
+
* Fix bug in Firefox that causes staff lines, bar lines, and stems to be missing.
|
| 205 |
+
|
| 206 |
+
* Fix bug in Firefox that cuts off the last line of the SVG.
|
| 207 |
+
|
| 208 |
+
# Version 6.2.1
|
| 209 |
+
|
| 210 |
+
## Bugs
|
| 211 |
+
|
| 212 |
+
* don't crash if "capo" is passed in to tablature as a string
|
| 213 |
+
|
| 214 |
+
* fix possible crash if setTiming is called before engraving
|
| 215 |
+
|
| 216 |
+
* Fix bug in Firefox 112 that causes lines to be missing.
|
| 217 |
+
|
| 218 |
+
* Add more debug messages when creating synth
|
| 219 |
+
|
| 220 |
+
* Fix type of prime return
|
| 221 |
+
|
| 222 |
+
* Protect against crash when selecting an element if the element selected is somehow outside of the music svg.
|
| 223 |
+
|
| 224 |
+
# Version 6.2.0
|
| 225 |
+
|
| 226 |
+
## Features
|
| 227 |
+
|
| 228 |
+
* implement %%MIDI bassprog, bassvol, chordprog, chordvol
|
| 229 |
+
|
| 230 |
+
* Add support for `[r: ... ]` remark
|
| 231 |
+
|
| 232 |
+
* add support for %%voicecolor
|
| 233 |
+
|
| 234 |
+
* add germanAlphabet option: display chords using German music alphabet
|
| 235 |
+
|
| 236 |
+
* add lineThickness option: allow tweaking of the size of the lines
|
| 237 |
+
|
| 238 |
+
* add a public access to the audio buffer through CreateSynth.getAudioBuffer() so that it can be processed outside of abcjs
|
| 239 |
+
|
| 240 |
+
## Bugs
|
| 241 |
+
|
| 242 |
+
* fix placement of ties when they extend to a new line
|
| 243 |
+
|
| 244 |
+
* fix crash with tablature and showDebug are used at the same time.
|
| 245 |
+
|
| 246 |
+
* fix bug in getting the location of the beat from TimingCallbacks when there are prep beats.
|
| 247 |
+
|
| 248 |
+
* Change D.C. and D.S. decorations to be right aligned
|
| 249 |
+
|
| 250 |
+
* fix metronome with changing meter
|
| 251 |
+
|
| 252 |
+
* don't indent unaligned words
|
| 253 |
+
|
| 254 |
+
* fix handling of accidentals in tablature
|
| 255 |
+
|
| 256 |
+
## Documentation
|
| 257 |
+
|
| 258 |
+
* Improved the typescript types somewhat.
|
| 259 |
+
|
| 260 |
+
## Refactoring
|
| 261 |
+
|
| 262 |
+
* Changed the names and moved a number of files in the engraver in anticipation of further refactoring.
|
| 263 |
+
|
| 264 |
+
* Did some simplification in tablatures.
|
| 265 |
+
|
| 266 |
+
# Version 6.1.9
|
| 267 |
+
|
| 268 |
+
## Features
|
| 269 |
+
|
| 270 |
+
* Add decorations for !D.C.alcoda!, !D.C.alfine!, !D.S.alcoda! and !D.S.alfine!
|
| 271 |
+
|
| 272 |
+
## Bugs
|
| 273 |
+
|
| 274 |
+
* keep transposing from crashing when K:none.
|
| 275 |
+
|
| 276 |
+
* mark the touch events as passive to prevent jank.
|
| 277 |
+
|
| 278 |
+
* fix crash when the M: line is missing and drum intro is used.
|
| 279 |
+
|
| 280 |
+
* fix midi output when using percussion voice.
|
| 281 |
+
|
| 282 |
+
## Documentation
|
| 283 |
+
|
| 284 |
+
* Improved the typescript types somewhat.
|
| 285 |
+
|
| 286 |
+
* Upgrade VuePress.
|
| 287 |
+
|
| 288 |
+
* Fix link for new synth in the docs.
|
| 289 |
+
|
| 290 |
+
# Version 6.1.8
|
| 291 |
+
|
| 292 |
+
## Features
|
| 293 |
+
|
| 294 |
+
* Implement 'octave' modifier for K: and V: fields.
|
| 295 |
+
|
| 296 |
+
## Bugs
|
| 297 |
+
|
| 298 |
+
* Handle accidentals in a measure in tablature.
|
| 299 |
+
|
| 300 |
+
* Fix accidental handling in tablature when there is a key signature.
|
| 301 |
+
|
| 302 |
+
* Add a little padding when tablature doesn't have a label.
|
| 303 |
+
|
| 304 |
+
* Fix the css styles applied to tablature.
|
| 305 |
+
|
| 306 |
+
* Allow percmap to use higher octave pitches.
|
| 307 |
+
|
| 308 |
+
* Fix cursor movement when playing synth and tablature is visible.
|
| 309 |
+
|
| 310 |
+
## Documentation
|
| 311 |
+
|
| 312 |
+
* Add example of getting lyrics out of a tune.
|
| 313 |
+
|
| 314 |
+
# Version 6.1.7
|
| 315 |
+
|
| 316 |
+
## Bugs
|
| 317 |
+
|
| 318 |
+
* don't draw measure numbers before the beginning of the line.
|
| 319 |
+
|
| 320 |
+
* guard against crash on touch selection
|
| 321 |
+
|
| 322 |
+
## Testing
|
| 323 |
+
|
| 324 |
+
* open the browser and run the test-server in parallel
|
| 325 |
+
|
| 326 |
+
* add a minimal server for serving test pages
|
| 327 |
+
## Documentation
|
| 328 |
+
|
| 329 |
+
* Add example of getting lyrics out of a tune
|
| 330 |
+
|
| 331 |
+
# Version 6.1.6
|
| 332 |
+
|
| 333 |
+
## Bugs
|
| 334 |
+
|
| 335 |
+
* Fix error when selecting notes
|
| 336 |
+
|
| 337 |
+
# Version 6.1.5
|
| 338 |
+
|
| 339 |
+
## Bugs
|
| 340 |
+
|
| 341 |
+
* Fix error when selecting notes
|
| 342 |
+
|
| 343 |
+
# Version 6.1.4
|
| 344 |
+
|
| 345 |
+
## Bugs
|
| 346 |
+
|
| 347 |
+
* Fix error when selecting notes
|
| 348 |
+
|
| 349 |
+
# Version 6.1.3
|
| 350 |
+
|
| 351 |
+
## Bugs
|
| 352 |
+
|
| 353 |
+
* fix placement of tablature staff when there is extra space used above the staff.
|
| 354 |
+
|
| 355 |
+
* Fix regression crash when using 'y' spacer
|
| 356 |
+
|
| 357 |
+
# Version 6.1.2
|
| 358 |
+
|
| 359 |
+
## Bugs
|
| 360 |
+
|
| 361 |
+
* fix combining oneSvgPerLine with responsive: "resize"
|
| 362 |
+
|
| 363 |
+
* fix drawing audio controls when the outer stylesheet changes the button's lineHeight
|
| 364 |
+
# Version 6.1.1
|
| 365 |
+
|
| 366 |
+
## Bugs
|
| 367 |
+
|
| 368 |
+
* rewrite oneSvgPerLine; fixes selection and keeping multiline items (like slurs) correctly.
|
| 369 |
+
|
| 370 |
+
## Features
|
| 371 |
+
|
| 372 |
+
* added mobile browser TouchEvent support for dragging
|
| 373 |
+
|
| 374 |
+
## Documentation
|
| 375 |
+
|
| 376 |
+
* fixed some typescript definitions
|
| 377 |
+
|
| 378 |
+
# Version 6.1.0
|
| 379 |
+
|
| 380 |
+
## Bugs
|
| 381 |
+
|
| 382 |
+
* Fix some bugs in startChar; endChar
|
| 383 |
+
|
| 384 |
+
## Features
|
| 385 |
+
|
| 386 |
+
* Add transposing feature
|
| 387 |
+
|
| 388 |
+
## Documentation
|
| 389 |
+
|
| 390 |
+
* Document transposing feature
|
| 391 |
+
* Clarify the way testing works
|
| 392 |
+
* Add tablature tests to "all"
|
| 393 |
+
|
| 394 |
+
# Version 6.0.4
|
| 395 |
+
|
| 396 |
+
## Bugs
|
| 397 |
+
|
| 398 |
+
* Fix position of staccato when a note is beamed and its stem is backwards.
|
| 399 |
+
* Write annotations above bar lines.
|
| 400 |
+
* fix placement of rhythm indicator (the R: field) on treble clef when there is nothing else above the staff.
|
| 401 |
+
* fix some broken tests; add test for staccato bug and rhythm word placement.
|
| 402 |
+
* fixed some Typescript warnings and errors
|
| 403 |
+
|
| 404 |
+
## Features
|
| 405 |
+
|
| 406 |
+
* Recognize backslash to escape lyrics.
|
| 407 |
+
* Add glissando
|
| 408 |
+
* pass back the start and end char positions with the audio callbacks.
|
| 409 |
+
|
| 410 |
+
## Documentation
|
| 411 |
+
|
| 412 |
+
* Add example of adding note names to a tune automatically.
|
| 413 |
+
* Add a mention for the VSCode extension.
|
| 414 |
+
* Add tune book example.
|
| 415 |
+
|
| 416 |
+
# Version 6.0.3
|
| 417 |
+
|
| 418 |
+
## Bugs
|
| 419 |
+
|
| 420 |
+
* Fix unhandled rejection if there is a problem with an input note when creating notes.
|
| 421 |
+
|
| 422 |
+
* put the height of ties/slurs in the line height calculation
|
| 423 |
+
|
| 424 |
+
* Measurements that used "px" were reporting a warning.
|
| 425 |
+
|
| 426 |
+
* Fix bass note in jazz chord when it contains a sharp or flat
|
| 427 |
+
|
| 428 |
+
## Features
|
| 429 |
+
|
| 430 |
+
* Quotation mark in a chord can be escaped.
|
| 431 |
+
|
| 432 |
+
## Documentation
|
| 433 |
+
|
| 434 |
+
* Add example of reusing created synth buffers.
|
| 435 |
+
|
| 436 |
+
* Fix example in docs on creating a drum rhythm
|
| 437 |
+
|
| 438 |
+
# Version 6.0.2
|
| 439 |
+
|
| 440 |
+
## Bugs
|
| 441 |
+
|
| 442 |
+
* Fix paper size so that the bottom of a narrow staff is not cut off.
|
| 443 |
+
|
| 444 |
+
* Fix example generator for synth
|
| 445 |
+
|
| 446 |
+
* Fix tablature parameter name and tuning examples
|
| 447 |
+
|
| 448 |
+
* Fix tablature default tuning for guitar (move A down octave)
|
| 449 |
+
|
| 450 |
+
# Version 6.0.1
|
| 451 |
+
|
| 452 |
+
## Bugs
|
| 453 |
+
|
| 454 |
+
* Make the printable example long enough to be on two pages.
|
| 455 |
+
|
| 456 |
+
* Fix paper size so that the bottom of a narrow staff is not cut off.
|
| 457 |
+
|
| 458 |
+
* Add a little padding to stems so they aren't cut off.
|
| 459 |
+
|
| 460 |
+
# Version 6.0.0
|
| 461 |
+
|
| 462 |
+
## Bugs
|
| 463 |
+
|
| 464 |
+
* Fix the bar number display when wrapping.
|
| 465 |
+
|
| 466 |
+
* Don't add extra padding when creating minimal music (like one note)
|
| 467 |
+
|
| 468 |
+
* Fix selection data for unaligned words
|
| 469 |
+
|
| 470 |
+
* Pass back actual selectable element when one of its children is clicked.
|
| 471 |
+
|
| 472 |
+
* Don't put extra classes and data- attributes on compound symbols (like "12/8")
|
| 473 |
+
|
| 474 |
+
* Fix spacing for triplet number
|
| 475 |
+
|
| 476 |
+
* Don't add extra space at the bottom if there is no bottom text.
|
| 477 |
+
|
| 478 |
+
* Allow aria-label to not be set.
|
| 479 |
+
|
| 480 |
+
* Fix adding class names to dynamics and some other elements.
|
| 481 |
+
|
| 482 |
+
* Fix regression where the left line of multi-staff music was misplaced if the bottom line is for percussion.
|
| 483 |
+
|
| 484 |
+
* gracenotes now are processed through %%percmap
|
| 485 |
+
|
| 486 |
+
# Version 6.0.0-beta.39
|
| 487 |
+
|
| 488 |
+
## Bugs
|
| 489 |
+
|
| 490 |
+
* Add some info to the return of the prime() method
|
| 491 |
+
|
| 492 |
+
* Fix iOS not playing because audioContext doesn't stay running
|
| 493 |
+
|
| 494 |
+
# Version 6.0.0-beta.38
|
| 495 |
+
|
| 496 |
+
## Bugs
|
| 497 |
+
|
| 498 |
+
* Regression: Fix return of CreateSynth.init
|
| 499 |
+
|
| 500 |
+
* Don't do audio on tablature lines.
|
| 501 |
+
|
| 502 |
+
* Wait until all notes are loaded before continuing to build audio buffer. (Caused the beginning of the buffer to possibly be arpeggiated if there is a race condition.)
|
| 503 |
+
|
| 504 |
+
* Don't crash when there is a blank staff on the second line.
|
| 505 |
+
|
| 506 |
+
* The pan option now works if the actual number of tracks doesn't match the panned tracks.
|
| 507 |
+
|
| 508 |
+
* Don't add chord track if it is empty.
|
| 509 |
+
|
| 510 |
+
## Documentation
|
| 511 |
+
|
| 512 |
+
* Get more detailed with the typescript declarations
|
| 513 |
+
|
| 514 |
+
# Version 6.0.0-beta.37
|
| 515 |
+
|
| 516 |
+
* Keep the correct line count when generating one svg per line. (Fixes analysis of the tune for playback and timing)
|
| 517 |
+
|
| 518 |
+
## Features
|
| 519 |
+
|
| 520 |
+
* Change the default soundfont to the improved Fluid one; add the anticipations on the abcjs soundfont.
|
| 521 |
+
|
| 522 |
+
# Version 6.0.0-beta.36
|
| 523 |
+
|
| 524 |
+
## Bugs
|
| 525 |
+
|
| 526 |
+
* Fix some typescript definitions.
|
| 527 |
+
|
| 528 |
+
* When stopping synth, return the position that it stopped at.
|
| 529 |
+
|
| 530 |
+
* Implement a fix for race conditions during note loading
|
| 531 |
+
|
| 532 |
+
* Don't call debugger when setting an annotation on an invisible note.
|
| 533 |
+
|
| 534 |
+
* Put try/catch in editor when creating music so there isn't an unhandled exception if there is an abcjs bug.
|
| 535 |
+
|
| 536 |
+
* Don't crash when creating audio and there is a suppressed blank line
|
| 537 |
+
|
| 538 |
+
* When suppressing blank lines, consider a line with only chords as not blank.
|
| 539 |
+
|
| 540 |
+
* Don't add too much spacing on chord symbols when placing them.
|
| 541 |
+
|
| 542 |
+
* Don't lose element's scrolling position when rendering music.
|
| 543 |
+
|
| 544 |
+
* Fix crash when creating timing array and there is a suppressed line because it is empty.
|
| 545 |
+
|
| 546 |
+
* Allow soundFontVolumeMultiplier to be set to zero.
|
| 547 |
+
|
| 548 |
+
## Features
|
| 549 |
+
|
| 550 |
+
* Add string tablature
|
| 551 |
+
|
| 552 |
+
* Implement %%jazzchord directive
|
| 553 |
+
|
| 554 |
+
## Documentation
|
| 555 |
+
|
| 556 |
+
* Add example page using multiple synths with program switcher
|
| 557 |
+
|
| 558 |
+
* Add jazzchords to example generator
|
| 559 |
+
|
| 560 |
+
# Version 6.0.0-beta.35
|
| 561 |
+
|
| 562 |
+
## Bugs
|
| 563 |
+
|
| 564 |
+
* Fix regression on creating oneSvgPerLine
|
| 565 |
+
|
| 566 |
+
* Fix notes that are one step apart from colliding.
|
| 567 |
+
|
| 568 |
+
* Fix crash on bad notelength
|
| 569 |
+
|
| 570 |
+
* Fix note durations in triplets where p != r
|
| 571 |
+
|
| 572 |
+
* Don't crash if a browser doesn't contain AudioContext
|
| 573 |
+
|
| 574 |
+
* Don't swallow warning after wrapping.
|
| 575 |
+
|
| 576 |
+
* Fix some regressions with placing and styling text.
|
| 577 |
+
|
| 578 |
+
* Fix font on relatively positioned annotations.
|
| 579 |
+
|
| 580 |
+
* Protect the editor from crashing when synth is attempted and the browser doesn't support AudioContext.
|
| 581 |
+
|
| 582 |
+
## Features
|
| 583 |
+
|
| 584 |
+
* Create parameter `jazzchords`
|
| 585 |
+
|
| 586 |
+
* Add many types to the typescript definitions.
|
| 587 |
+
|
| 588 |
+
* Add `units` to TimingCallback.start
|
| 589 |
+
|
| 590 |
+
* Add staccato to midi creation.
|
| 591 |
+
|
| 592 |
+
* Add classes to dynamics elements.
|
| 593 |
+
|
| 594 |
+
* Add more info to the click handler
|
| 595 |
+
|
| 596 |
+
* Limit the size of the warning message if there is a long string.
|
| 597 |
+
|
| 598 |
+
* Add initialClef option
|
| 599 |
+
|
| 600 |
+
* Keep and pass back current time from the timer callbacks.
|
| 601 |
+
|
| 602 |
+
## Documentation
|
| 603 |
+
|
| 604 |
+
* Fix path for favicon in docs
|
| 605 |
+
|
| 606 |
+
* Tweak to printing example
|
| 607 |
+
|
| 608 |
+
* Move examples to github pages.
|
| 609 |
+
|
| 610 |
+
* Add MIDI download example.
|
| 611 |
+
|
| 612 |
+
* Fixes to doc building from the vuepress upgrade.
|
| 613 |
+
|
| 614 |
+
* Add mention of a CDN to load library from.
|
| 615 |
+
|
| 616 |
+
* Add a couple of errors to analysis demo to show the warning data.
|
| 617 |
+
|
| 618 |
+
* Option to only render the clef on the first line.
|
| 619 |
+
|
| 620 |
+
# Version 6.0.0-beta.33
|
| 621 |
+
|
| 622 |
+
## Bugs
|
| 623 |
+
|
| 624 |
+
* Fix crash when there is a missing close bracket on an inline command.
|
| 625 |
+
|
| 626 |
+
* Fix the startChar position of chords
|
| 627 |
+
|
| 628 |
+
* Fix overriding the tempo.
|
| 629 |
+
|
| 630 |
+
* Fix passing qpm in.
|
| 631 |
+
|
| 632 |
+
* Fix stem direction bug on wrap.
|
| 633 |
+
|
| 634 |
+
* Fix bug in calculating the endpoint of the audio when there are multiple voices.
|
| 635 |
+
|
| 636 |
+
## Features
|
| 637 |
+
|
| 638 |
+
* Add getBarLength() and getTotalTime() to the tune object;
|
| 639 |
+
|
| 640 |
+
* Add second parameter to seek() for the units percent, seconds, and beats.
|
| 641 |
+
|
| 642 |
+
* Add `detuneOctave` parameter
|
| 643 |
+
|
| 644 |
+
## Documentation
|
| 645 |
+
|
| 646 |
+
* Example of controlling the tempo.
|
| 647 |
+
|
| 648 |
+
## Build
|
| 649 |
+
|
| 650 |
+
* Remove bin folder
|
| 651 |
+
|
| 652 |
+
# Version 6.0.0-beta.32
|
| 653 |
+
|
| 654 |
+
## Bugs
|
| 655 |
+
|
| 656 |
+
* Some fixes to startChar and endChar when there are line continuations
|
| 657 |
+
|
| 658 |
+
* Error messages now report the absolute line in the file that the error occurs, not the offset from the first music line.
|
| 659 |
+
|
| 660 |
+
* Fix bug where multiple text lines would duplicate text.
|
| 661 |
+
|
| 662 |
+
* `a b !+!c` removing the end `!` from the `!+!` will cause the decoration to bleed to the first element in the line.
|
| 663 |
+
|
| 664 |
+
* Fix audio control buttons on Safari
|
| 665 |
+
|
| 666 |
+
* Make creating audio more efficient. (was creating buffer twice as long as needed.)
|
| 667 |
+
|
| 668 |
+
* Fix click-a-note-to-play-it to handle microtones.
|
| 669 |
+
|
| 670 |
+
* Get rid of audio warning when key changes.
|
| 671 |
+
|
| 672 |
+
* Fix Safari not making sound when first using playEvent.
|
| 673 |
+
|
| 674 |
+
* Fix crash when wrapping when using oneSvgPerLine.
|
| 675 |
+
|
| 676 |
+
## Features
|
| 677 |
+
|
| 678 |
+
* Change the pitch change variable from "warp" to "cents".
|
| 679 |
+
|
| 680 |
+
* support microtones in midi output.
|
| 681 |
+
|
| 682 |
+
## Refactoring
|
| 683 |
+
|
| 684 |
+
* Improvements to the handling of line continuations
|
| 685 |
+
|
| 686 |
+
* Remove some midi.js remnants
|
| 687 |
+
|
| 688 |
+
* Refactoring of the parser
|
| 689 |
+
|
| 690 |
+
## Build
|
| 691 |
+
|
| 692 |
+
* update dependencies and fix webpack for v5
|
| 693 |
+
|
| 694 |
+
## Documentation
|
| 695 |
+
|
| 696 |
+
* Add microtone demo.
|
| 697 |
+
|
| 698 |
+
* update docs to vuepress2
|
| 699 |
+
|
| 700 |
+
# Version 6.0.0-beta.31
|
| 701 |
+
|
| 702 |
+
## Bugs
|
| 703 |
+
|
| 704 |
+
* Fix crash when no key signature is passed in.
|
| 705 |
+
|
| 706 |
+
* Octave clefs were double transposing.
|
| 707 |
+
|
| 708 |
+
* Made the audio control more robust in dark mode and when the page's css defines basic buttons.
|
| 709 |
+
|
| 710 |
+
## Features
|
| 711 |
+
|
| 712 |
+
* Support audio for quarter sharp and quarter flat.
|
| 713 |
+
|
| 714 |
+
* Allow getMidiFile to accept a tune object as well as a string.
|
| 715 |
+
|
| 716 |
+
## Build
|
| 717 |
+
|
| 718 |
+
* Remove more of the midi.js code
|
| 719 |
+
|
| 720 |
+
* Deliver the /dist folder for npm.
|
| 721 |
+
|
| 722 |
+
* Add entry points for testing.
|
| 723 |
+
|
| 724 |
+
* Start of parser refactoring
|
| 725 |
+
|
| 726 |
+
# Version 6.0.0-beta.30
|
| 727 |
+
|
| 728 |
+
## Bugs
|
| 729 |
+
|
| 730 |
+
* Fix npm deployment.
|
| 731 |
+
|
| 732 |
+
# Version 6.0.0-beta.29
|
| 733 |
+
|
| 734 |
+
## Bugs
|
| 735 |
+
|
| 736 |
+
* Fix stem direction on overlay voices.
|
| 737 |
+
|
| 738 |
+
## Features
|
| 739 |
+
|
| 740 |
+
* Add support for invisible multi-measure rest "X"
|
| 741 |
+
|
| 742 |
+
* enhance typescript types
|
| 743 |
+
|
| 744 |
+
## Build
|
| 745 |
+
|
| 746 |
+
* Remove build of midi version
|
| 747 |
+
|
| 748 |
+
* Simplify the webpack config
|
| 749 |
+
|
| 750 |
+
* Remove references to "master"
|
| 751 |
+
|
| 752 |
+
# Version 6.0.0-beta.28
|
| 753 |
+
|
| 754 |
+
## Bugs
|
| 755 |
+
|
| 756 |
+
* Fix some problems with the visual synth control getting out of sync with the music.
|
| 757 |
+
|
| 758 |
+
* Fix stem direction on overlay voices.
|
| 759 |
+
|
| 760 |
+
* Don't print accidentals on percussion staves.
|
| 761 |
+
|
| 762 |
+
* Keep dragging notes from jumping around when the svg is scaled (on Chrome & Safari)
|
| 763 |
+
|
| 764 |
+
* Fix placement of multi-measure rest.
|
| 765 |
+
|
| 766 |
+
* Fix crash when using the parser twice instead of creating a new one.
|
| 767 |
+
|
| 768 |
+
* Fix bug in drawing slurs over the end of a line when there is more than one staff.
|
| 769 |
+
|
| 770 |
+
* Fix bug in counting measures in the element classes.
|
| 771 |
+
|
| 772 |
+
## Features
|
| 773 |
+
|
| 774 |
+
* Support dark mode.
|
| 775 |
+
|
| 776 |
+
* Add support for `%%percmap`, allowing specifying a shape for each sound.
|
| 777 |
+
|
| 778 |
+
* Implement the audio for `%%percmap`.
|
| 779 |
+
|
| 780 |
+
* Add "triangle" as a note head shape.
|
| 781 |
+
|
| 782 |
+
## Documentation
|
| 783 |
+
|
| 784 |
+
* Add a "Start here" section to the demo TOC.
|
| 785 |
+
|
| 786 |
+
* Add demo of tune analysis; fix docs on tune analysis
|
| 787 |
+
|
| 788 |
+
* Add "zoom to fit" demo.
|
| 789 |
+
|
| 790 |
+
## Build
|
| 791 |
+
|
| 792 |
+
* Move SVG to separate files.
|
| 793 |
+
|
| 794 |
+
# Version 6.0.0-beta.27
|
| 795 |
+
|
| 796 |
+
## Bugs
|
| 797 |
+
|
| 798 |
+
* Fix regression bug with setting the tempo when there is no Q: in the ABC string.
|
| 799 |
+
|
| 800 |
+
* Fix measure class numbering when the line starts with a bar line.
|
| 801 |
+
|
| 802 |
+
* Fix slur placement over a line break when there is more than one voice.
|
| 803 |
+
|
| 804 |
+
* Recreate audio when changing the tune in the editor.
|
| 805 |
+
|
| 806 |
+
* Fix wrapping crash when the first line in the tune is a subtitle.
|
| 807 |
+
|
| 808 |
+
* Fix synchronization of timing callbacks after changing the tempo.
|
| 809 |
+
|
| 810 |
+
* Fix regression bug when creating audio buffer in Safari.
|
| 811 |
+
|
| 812 |
+
* If an audio context is passed in, always use it.
|
| 813 |
+
|
| 814 |
+
## Documentation
|
| 815 |
+
|
| 816 |
+
* Add warning if audio CSS is missing.
|
| 817 |
+
|
| 818 |
+
* Improve the animation demo.
|
| 819 |
+
|
| 820 |
+
* Add warning if a nonsensical rhythm is encountered.
|
| 821 |
+
|
| 822 |
+
* Add warning if audio CSS is missing.
|
| 823 |
+
|
| 824 |
+
* Change default branch to main
|
| 825 |
+
|
| 826 |
+
* Add links and info for old versions.
|
| 827 |
+
|
| 828 |
+
* Redo the animation demo.
|
| 829 |
+
|
| 830 |
+
* Add responsive demo.
|
| 831 |
+
|
| 832 |
+
* Change alt text for example's logo
|
| 833 |
+
|
| 834 |
+
* Some tweaks to transposition demo.
|
| 835 |
+
|
| 836 |
+
# Version 6.0.0-beta.26
|
| 837 |
+
|
| 838 |
+
## Build
|
| 839 |
+
|
| 840 |
+
* Added types for TypeScript for `renderAbc` function
|
| 841 |
+
|
| 842 |
+
* Change midi.js to a peerDependency.
|
| 843 |
+
|
| 844 |
+
## Accessibility
|
| 845 |
+
|
| 846 |
+
* Add foregroundColor parameter and set the default to currentColor (for high contrast)
|
| 847 |
+
|
| 848 |
+
* Add option to set the aria-label; by default aria-label is set to the title.
|
| 849 |
+
|
| 850 |
+
## Bugs
|
| 851 |
+
|
| 852 |
+
* Fixed some regressions in changing the audio tempo.
|
| 853 |
+
|
| 854 |
+
* Fix some timing and crashing issues on synth.
|
| 855 |
+
|
| 856 |
+
* Fix the currentTrackMilliseconds for meters with eighth note denominators that are not compound.
|
| 857 |
+
|
| 858 |
+
## Features
|
| 859 |
+
|
| 860 |
+
* Add support for triple broken rhythm symbols `>>>` and `<<<`
|
| 861 |
+
|
| 862 |
+
* Add `minPadding` parameter to keep the notes from getting too close together on crowded lines.
|
| 863 |
+
|
| 864 |
+
* Change the fadeLength default to 200ms
|
| 865 |
+
|
| 866 |
+
# Version 6.0.0-beta.25
|
| 867 |
+
|
| 868 |
+
## Bugs
|
| 869 |
+
|
| 870 |
+
* Fix the way pause/resume is handled in the timing callbacks.
|
| 871 |
+
|
| 872 |
+
* Fix problems with changing the tempo with "warp"
|
| 873 |
+
|
| 874 |
+
* Keep key sig changes when wrapping.
|
| 875 |
+
|
| 876 |
+
* Make wrapping use one less line in some cases.
|
| 877 |
+
|
| 878 |
+
* Fix crash when wrapping music that has unusual voice mismatches.
|
| 879 |
+
|
| 880 |
+
* Fix meter display when wrapping.
|
| 881 |
+
|
| 882 |
+
* Prevent out of memory when wrapping long tune.
|
| 883 |
+
|
| 884 |
+
* Fix some cases where P: and Q: were not handled correctly.
|
| 885 |
+
|
| 886 |
+
* Fix changing tempo when there is a repeat.
|
| 887 |
+
|
| 888 |
+
* Fix audio seek: Seek percent should take the fade length into account.
|
| 889 |
+
|
| 890 |
+
* Fix crash when a tie is right before a repeat sign.
|
| 891 |
+
|
| 892 |
+
* Improve error handling when creating audio.
|
| 893 |
+
|
| 894 |
+
## Features
|
| 895 |
+
|
| 896 |
+
* Add entry point in synth controller to programmatically seek
|
| 897 |
+
|
| 898 |
+
* %%stretchlast takes a number parameter
|
| 899 |
+
|
| 900 |
+
* Deliver the elapsed time in whole notes as well as milliseconds in the timing callbacks.
|
| 901 |
+
|
| 902 |
+
* Return the position of the notehead in the click listener.
|
| 903 |
+
|
| 904 |
+
* Add SynthControl.disable() so that the user can't click on the control before the tune is ready.
|
| 905 |
+
|
| 906 |
+
## Tasks
|
| 907 |
+
|
| 908 |
+
* Remove many old versions of the minified releases.
|
| 909 |
+
|
| 910 |
+
* Change the destination folder for the build.
|
| 911 |
+
|
| 912 |
+
* Refactor wrapping
|
| 913 |
+
|
| 914 |
+
## Documentation
|
| 915 |
+
|
| 916 |
+
* Some clarification of the build process in the docs.
|
| 917 |
+
|
| 918 |
+
* Create the example generator.
|
| 919 |
+
|
| 920 |
+
* Add FAQ
|
| 921 |
+
|
| 922 |
+
* Some tweaking to the demos; create demo table of contents.
|
| 923 |
+
|
| 924 |
+
* Add a little css for the examples
|
| 925 |
+
|
| 926 |
+
* Improvements to examples/basic-transpose.html
|
| 927 |
+
|
| 928 |
+
* Disabled spellcheck for ABC input textareas
|
| 929 |
+
|
| 930 |
+
* Document afterParsing function
|
| 931 |
+
|
| 932 |
+
* Document synthParamChanged
|
| 933 |
+
|
| 934 |
+
# Version 6.0.0-beta.24
|
| 935 |
+
|
| 936 |
+
## Bugs
|
| 937 |
+
|
| 938 |
+
* If there are pickup notes and a drum track, don't start drum until the first full measure.
|
| 939 |
+
|
| 940 |
+
* If a dotted slur crosses a line, the slur on the next line should also be dotted.
|
| 941 |
+
|
| 942 |
+
* Make the audio buffer a little longer so the last note can fade out more naturally.
|
| 943 |
+
|
| 944 |
+
* Fix abcjs-mmXX class when there are non-music lines present.
|
| 945 |
+
|
| 946 |
+
* Fix height of bottom text: it was calculating a line too many.
|
| 947 |
+
|
| 948 |
+
* Fix a couple of crashes when calculating the timing of a tune.
|
| 949 |
+
|
| 950 |
+
* Fix documentation about how to directly play sound.
|
| 951 |
+
|
| 952 |
+
## Features
|
| 953 |
+
|
| 954 |
+
* Add resets to MIDI file; carry forward "pan" option to MIDI file.
|
| 955 |
+
|
| 956 |
+
* %%titleleft should also affect subtitle.
|
| 957 |
+
|
| 958 |
+
* Add class for the measure count from the start of the tune.
|
| 959 |
+
|
| 960 |
+
# Version 6.0.0-beta.23
|
| 961 |
+
|
| 962 |
+
## Bugs
|
| 963 |
+
|
| 964 |
+
* Fix calculation of bottom text height when there are blank lines.
|
| 965 |
+
|
| 966 |
+
* Center chord symbols better.
|
| 967 |
+
|
| 968 |
+
* Fix crash in the timer when lineEndCallback is not specified.
|
| 969 |
+
|
| 970 |
+
## Features
|
| 971 |
+
|
| 972 |
+
* Add the staff Y coordinates to the clickListener.
|
| 973 |
+
|
| 974 |
+
* Implemented %%titleleft
|
| 975 |
+
|
| 976 |
+
# Version 6.0.0-beta.22
|
| 977 |
+
|
| 978 |
+
## Bugs
|
| 979 |
+
|
| 980 |
+
* Fix crash in audio when there is an odd measure that contains chords.
|
| 981 |
+
|
| 982 |
+
* Fix definition of some jazz chords, particularly the 13th
|
| 983 |
+
|
| 984 |
+
* Fix timing on multiple voices when the tempo changes.
|
| 985 |
+
|
| 986 |
+
* Fix downloading WAV files in stereo.
|
| 987 |
+
|
| 988 |
+
* Fix the last line in the line end callbacks.
|
| 989 |
+
|
| 990 |
+
* Simplified and fixed some edge cases when seeking; added return value for eventCallback.
|
| 991 |
+
|
| 992 |
+
* Fix tempo change in multiple voices
|
| 993 |
+
|
| 994 |
+
* Fix the reporting of measure numbers in the timing callbacks when there are multiple voices.
|
| 995 |
+
|
| 996 |
+
* Add more info to the lineEndingCallback so the client can see all of the lines.
|
| 997 |
+
|
| 998 |
+
* Fix the alignment of %%center text.
|
| 999 |
+
|
| 1000 |
+
* Don't crash if the current beat is later than the last event (can happen when the animation timer is delayed)
|
| 1001 |
+
|
| 1002 |
+
* Fix line end callback anticipation handling.
|
| 1003 |
+
|
| 1004 |
+
* Fix lower volume of default soundfont to prevent clipping.
|
| 1005 |
+
|
| 1006 |
+
* Fix crash when doing audio for tune with subtitle
|
| 1007 |
+
|
| 1008 |
+
## Features
|
| 1009 |
+
|
| 1010 |
+
* Add programOffsets parameter for audio.
|
| 1011 |
+
|
| 1012 |
+
* Handle `%%MIDI channel 10` when it is in the middle of a tune.
|
| 1013 |
+
|
| 1014 |
+
* Add the note style (grace or decoration) to the sequenceCallback.
|
| 1015 |
+
|
| 1016 |
+
* Add classes for pinpointing where slurs start and end (abcjs-start-m0-n0, abcjs-end-m0-n0)
|
| 1017 |
+
|
| 1018 |
+
* Round many paths to 2 dec. places; add "abcjs-dotted" to dotted slurs.
|
| 1019 |
+
|
| 1020 |
+
* Add abcjs-dynamics class to the !f!, etc. symbols.
|
| 1021 |
+
|
| 1022 |
+
* Differentiate between slurs and ties in the classes.
|
| 1023 |
+
|
| 1024 |
+
* Add more info to the lineEndingCallback so the client can see all of the lines.
|
| 1025 |
+
|
| 1026 |
+
* Add some details about the beat callback to straighten out doing a smooth cursor.
|
| 1027 |
+
|
| 1028 |
+
# Version 6.0.0-beta.21
|
| 1029 |
+
|
| 1030 |
+
## Bugs
|
| 1031 |
+
|
| 1032 |
+
* Don't require soundFontUrl to end in a slash.
|
| 1033 |
+
|
| 1034 |
+
* Force stretchlast on all lines except the last when printing one svg per line.
|
| 1035 |
+
|
| 1036 |
+
* Fix placement of brackets and braces when there are two voices on a staff.
|
| 1037 |
+
|
| 1038 |
+
* Fix typo in lead_8_bass_lead instrument name.
|
| 1039 |
+
|
| 1040 |
+
## Features
|
| 1041 |
+
|
| 1042 |
+
* Added soundFontVolumeMultiplier parameter;
|
| 1043 |
+
|
| 1044 |
+
* made the abcjs soundfont the default.
|
| 1045 |
+
|
| 1046 |
+
# Version 6.0.0-beta.20
|
| 1047 |
+
|
| 1048 |
+
## Bugs
|
| 1049 |
+
|
| 1050 |
+
* Fixed bug in smooth cursor when repeat is on one line.
|
| 1051 |
+
|
| 1052 |
+
* Fix timing callbacks calling stop() when playing in a loop.
|
| 1053 |
+
|
| 1054 |
+
## Documentation
|
| 1055 |
+
|
| 1056 |
+
* Add example for adding swing.
|
| 1057 |
+
|
| 1058 |
+
* Add example for playing on repeat.
|
| 1059 |
+
|
| 1060 |
+
# Version 6.0.0-beta.19
|
| 1061 |
+
|
| 1062 |
+
## Bugs
|
| 1063 |
+
|
| 1064 |
+
* Fix crash when processing a string that contains no note events.
|
| 1065 |
+
|
| 1066 |
+
* Don't let odd crescendo or diminuendo cause a nonsensical volume.
|
| 1067 |
+
|
| 1068 |
+
* Initialize the gap in audio files.
|
| 1069 |
+
|
| 1070 |
+
* Fix bug in timing callbacks when the position changes inside an event handler.
|
| 1071 |
+
|
| 1072 |
+
* Fix bug in turning off individual voices.
|
| 1073 |
+
|
| 1074 |
+
* Fixed chord placement when there are more than one chord in a measure in compound meter.
|
| 1075 |
+
|
| 1076 |
+
## Features
|
| 1077 |
+
|
| 1078 |
+
* Implement a smooth cursor in the timing callbacks.
|
| 1079 |
+
|
| 1080 |
+
* Expose setWarp so that the tempo can be changed programmatically.
|
| 1081 |
+
|
| 1082 |
+
# Version 6.0.0-beta.18
|
| 1083 |
+
|
| 1084 |
+
## Bugs
|
| 1085 |
+
|
| 1086 |
+
* Slight speedup when laying out scores with names in the voices.
|
| 1087 |
+
|
| 1088 |
+
* Increase the size of the annotation's lane to account for descenders.
|
| 1089 |
+
|
| 1090 |
+
* Fix calculation of beat length for 3/8 time.
|
| 1091 |
+
|
| 1092 |
+
## Features
|
| 1093 |
+
|
| 1094 |
+
* Return the cursor position for each beat in the timing callbacks.
|
| 1095 |
+
|
| 1096 |
+
* Add the x position of the end of each note to the note timings.
|
| 1097 |
+
|
| 1098 |
+
## Documentation
|
| 1099 |
+
|
| 1100 |
+
* Document the renderer debug option.
|
| 1101 |
+
|
| 1102 |
+
* Document the new parameter on the TimingCallback's beatCallback.
|
| 1103 |
+
|
| 1104 |
+
# Version 6.0.0-beta.17
|
| 1105 |
+
|
| 1106 |
+
## Bugs
|
| 1107 |
+
|
| 1108 |
+
* Fix positioning of "3" on triplets.
|
| 1109 |
+
|
| 1110 |
+
* Add a tiny bit on margin for the annotation lanes.
|
| 1111 |
+
|
| 1112 |
+
* Fix positioning of lower annotations (that is: "_annotation").
|
| 1113 |
+
|
| 1114 |
+
* Fix generating audio using the SynthSequence object.
|
| 1115 |
+
|
| 1116 |
+
# Version 6.0.0-beta.16
|
| 1117 |
+
|
| 1118 |
+
## Features
|
| 1119 |
+
* If there is a repeat, then include both of the currentTrackMilliseconds in the callback. (Note: if you consume this, be sure you can handle either a number or an array.)
|
| 1120 |
+
|
| 1121 |
+
* Allow as many lanes as needed for annotations below the staff.
|
| 1122 |
+
|
| 1123 |
+
* Add Tune.getElementFromChar method for convenience.
|
| 1124 |
+
|
| 1125 |
+
* Allow setTiming to be called without parameters.
|
| 1126 |
+
|
| 1127 |
+
## Bugs
|
| 1128 |
+
|
| 1129 |
+
* Fix the audio interpretation of dynamics.
|
| 1130 |
+
|
| 1131 |
+
* Fix vertical positioning of annotations when they appear on the same line as other annotations.
|
| 1132 |
+
|
| 1133 |
+
* Fix bug when there is a spacer in a triplet.
|
| 1134 |
+
|
| 1135 |
+
* Fix drawing of slur at beginning of line.
|
| 1136 |
+
|
| 1137 |
+
* Fix bug where editor swallows the clickListener callback.
|
| 1138 |
+
|
| 1139 |
+
* Fix timing when there are tempo changes.
|
| 1140 |
+
|
| 1141 |
+
* Move tempo note up slightly so it aligns with the number, not the font's baseline.
|
| 1142 |
+
|
| 1143 |
+
## Documentation
|
| 1144 |
+
|
| 1145 |
+
* Document the return value of renderAbc
|
| 1146 |
+
|
| 1147 |
+
* A little improvement to the Editor documentation.
|
| 1148 |
+
|
| 1149 |
+
* Document classes a little more comprehensively.
|
| 1150 |
+
|
| 1151 |
+
* Document lineBreaks parameter.
|
| 1152 |
+
|
| 1153 |
+
* Remove the circular requirement for abcjs in the docs.
|
| 1154 |
+
|
| 1155 |
+
* Start to document the rest of the options for renderAbc
|
| 1156 |
+
|
| 1157 |
+
* Create example of how to annotate music.
|
| 1158 |
+
|
| 1159 |
+
* Improve documentation of audio.
|
| 1160 |
+
|
| 1161 |
+
* Changed the object that onEnded is passed in with to match documentation.
|
| 1162 |
+
|
| 1163 |
+
# Version 6.0.0-beta.15
|
| 1164 |
+
|
| 1165 |
+
## Bugs
|
| 1166 |
+
* Slightly increase the spacing for the dynamics lane.
|
| 1167 |
+
* Fix crash when inline tempo is the first thing in the file.
|
| 1168 |
+
* If `selectTypes` is not passed in, then the click behavior matches the last version of abcjs.
|
| 1169 |
+
* Various positioning tweaks for clefs and key signatures.
|
| 1170 |
+
* Get the fingerings to not interfere with chords.
|
| 1171 |
+
* Fix dynamic volume calculation when dynamic is defined on bar line.
|
| 1172 |
+
* Fix regression when wrapping short lines.
|
| 1173 |
+
* Don't crash when creating a drum track (the inserted rests don't have elements attached.)
|
| 1174 |
+
* Create AudioContext if one isn't passed in.
|
| 1175 |
+
* fix some minor positioning problems with text boxes.
|
| 1176 |
+
|
| 1177 |
+
## Features
|
| 1178 |
+
* Use two lines for annotations and chords if they would run into each other.
|
| 1179 |
+
* Recognize `!^!` as a synonym for `!marcato!`.
|
| 1180 |
+
* Add a little more vertical space so nearby elements don't touch.
|
| 1181 |
+
* Add support for dotted slurs and dotted ties.
|
| 1182 |
+
* Pass back original mouse event when an element is clicked.
|
| 1183 |
+
* Implement `vocalspace`.
|
| 1184 |
+
* Add `showDebug` parameter to display element placement.
|
| 1185 |
+
* Support `beambr1` and `beambr2`.
|
| 1186 |
+
* Add the option `fontboxpadding`.
|
| 1187 |
+
* Allow `annotationfont`, `composerfont`, `historyfont`, `infofont`, `subtitlefont`, `textfont`, `titlefont`, and `voicefont` to have a text box.
|
| 1188 |
+
|
| 1189 |
+
## Refactoring
|
| 1190 |
+
* Some refactoring of layout functionality.
|
| 1191 |
+
|
| 1192 |
+
## Documentation
|
| 1193 |
+
* Change all the examples to use the `/dist` folder so the path doesn't change every release.
|
| 1194 |
+
* Create test for web audio.
|
| 1195 |
+
* Set a custom font for the chords in the docs.
|
| 1196 |
+
|
| 1197 |
+
# Version 6.0.0-beta.14
|
| 1198 |
+
|
| 1199 |
+
## Bugs
|
| 1200 |
+
|
| 1201 |
+
* Don't crash if `setTiming` is called too early.
|
| 1202 |
+
|
| 1203 |
+
* Fix length of accompaniment notes in compound meters.
|
| 1204 |
+
|
| 1205 |
+
* Fix inaccuracies with JS floating point on the length of notes.
|
| 1206 |
+
|
| 1207 |
+
* Fix crash when unmatched quote is in V: line.
|
| 1208 |
+
|
| 1209 |
+
* Get the multi-measure rest to have the correct duration for both display and audio.
|
| 1210 |
+
|
| 1211 |
+
* Fix crash "undefined size".
|
| 1212 |
+
|
| 1213 |
+
* Fix computing the pickup length when there are triplets.
|
| 1214 |
+
|
| 1215 |
+
* Don't transpose the perc clef.
|
| 1216 |
+
|
| 1217 |
+
* The audio should ignore the visualTranspose.
|
| 1218 |
+
|
| 1219 |
+
* Fix tempo calculation.
|
| 1220 |
+
|
| 1221 |
+
## Features
|
| 1222 |
+
|
| 1223 |
+
* Improve the drawing of the double flat symbol.
|
| 1224 |
+
|
| 1225 |
+
* Detect chords that aren't on the beat and move them.
|
| 1226 |
+
|
| 1227 |
+
* Play chords on incomplete measures.
|
| 1228 |
+
|
| 1229 |
+
* Fix selection of tempo element.
|
| 1230 |
+
|
| 1231 |
+
* Handle no key sig in transpose.
|
| 1232 |
+
|
| 1233 |
+
* Allow synth parameters to be changed on the fly when using the editor.
|
| 1234 |
+
|
| 1235 |
+
* Don't require generate_warnings in editor params if warnings_id is present.
|
| 1236 |
+
|
| 1237 |
+
* Accept an element as well as an ID in warnings_id.
|
| 1238 |
+
|
| 1239 |
+
## Refactoring
|
| 1240 |
+
|
| 1241 |
+
* Refactor the way notes are placed to create audio.
|
| 1242 |
+
|
| 1243 |
+
* Move layout functionality to a separate directory.
|
| 1244 |
+
|
| 1245 |
+
## Documentation
|
| 1246 |
+
|
| 1247 |
+
* Make a better example of how to transpose.
|
| 1248 |
+
|
| 1249 |
+
## Testing
|
| 1250 |
+
|
| 1251 |
+
* Add Mocha
|
| 1252 |
+
|
| 1253 |
+
* Add mocha tests covering most of the audio note placement.
|
| 1254 |
+
|
| 1255 |
+
* Add mocha tests for the selectable items.
|
| 1256 |
+
|
| 1257 |
+
* Add mocha tests for the line wrapping code.
|
| 1258 |
+
|
| 1259 |
+
* Add mocha tests that will run cross browser.
|
| 1260 |
+
|
| 1261 |
+
# Version 6.0.0-beta.13
|
| 1262 |
+
|
| 1263 |
+
## Bugs
|
| 1264 |
+
* Fix staff spacing bug when nothing is below the staff (like with bass clef only containing high notes)
|
| 1265 |
+
|
| 1266 |
+
* If a triplet is beamed with anything else, add a bracket.
|
| 1267 |
+
|
| 1268 |
+
* Fix supportsAudio() so it always return a bool
|
| 1269 |
+
|
| 1270 |
+
* allow more than one brace on a system
|
| 1271 |
+
|
| 1272 |
+
* Don't start dragging a note unless only the main mouse button is clicked.
|
| 1273 |
+
|
| 1274 |
+
* Don't crash audio if the time signature is malformed.
|
| 1275 |
+
|
| 1276 |
+
* Fix tempo on 9/4 and 12/4 meters
|
| 1277 |
+
|
| 1278 |
+
* Restore staccato note length
|
| 1279 |
+
|
| 1280 |
+
* fix bug in audio transposing middle C
|
| 1281 |
+
|
| 1282 |
+
* fix placement and sizing of text and the text box
|
| 1283 |
+
|
| 1284 |
+
* fix bug with sizing gchordfont
|
| 1285 |
+
|
| 1286 |
+
* Fix some crashes and bugs in the visible audio control.
|
| 1287 |
+
|
| 1288 |
+
## Features
|
| 1289 |
+
* Calculate tempo using passed in bpm if the millisecondsPerMeasure is not supplied.
|
| 1290 |
+
|
| 1291 |
+
* Refactor the editor to use renderAbc so that all the renderAbc functionality is available.
|
| 1292 |
+
|
| 1293 |
+
* allow multiple lines on a voice name
|
| 1294 |
+
|
| 1295 |
+
* center the voice name when there is one name in a brace.
|
| 1296 |
+
|
| 1297 |
+
* Implement vskip for regular music lines.
|
| 1298 |
+
|
| 1299 |
+
* allow changing gchordfont in the middle of the tune
|
| 1300 |
+
|
| 1301 |
+
* Create chords from whichever voice chords are encountered first.
|
| 1302 |
+
|
| 1303 |
+
* Get the octave clefs to sound in the correct octave.
|
| 1304 |
+
|
| 1305 |
+
## Documentation
|
| 1306 |
+
* update example to show onSvgPerLine and use new audio.
|
| 1307 |
+
|
| 1308 |
+
* Fix example links in docs.
|
| 1309 |
+
|
| 1310 |
+
* Add example for playing synth with no visual music.
|
| 1311 |
+
|
| 1312 |
+
* Fix midi download link on full synth example.
|
| 1313 |
+
|
| 1314 |
+
## Refactoring
|
| 1315 |
+
|
| 1316 |
+
* split tunebook from tunebook parsing.
|
| 1317 |
+
|
| 1318 |
+
* More refactoring of the drawing code.
|
| 1319 |
+
|
| 1320 |
+
* separate bottom text into creation/drawing stages; cut down on dependencies in the draw functions.
|
| 1321 |
+
|
| 1322 |
+
* separate editarea from editor to allow function redefinitions
|
| 1323 |
+
|
| 1324 |
+
# Version 6.0.0-beta.12
|
| 1325 |
+
|
| 1326 |
+
## Bugs
|
| 1327 |
+
|
| 1328 |
+
* Fix selection of items in a cross-browser way, in different markups and css that the SVG can appear.
|
| 1329 |
+
|
| 1330 |
+
* Fixes #440 second staff rendering too early.
|
| 1331 |
+
|
| 1332 |
+
* Fix regression bug when rendering.
|
| 1333 |
+
|
| 1334 |
+
# Version 6.0.0-beta.11
|
| 1335 |
+
|
| 1336 |
+
## Features
|
| 1337 |
+
|
| 1338 |
+
* Allow "K:C none" to be the same as "K:C clef=none"
|
| 1339 |
+
* Allow a finer grained selection mechanism.
|
| 1340 |
+
* Allow braces to be selected.
|
| 1341 |
+
* Allow o 0 and ^ as input for º ø and ∆ in chords.
|
| 1342 |
+
* Don't play notes that are drawn with the rhythm notehead: replace with chord.
|
| 1343 |
+
* Implement graceslurs
|
| 1344 |
+
* Make the annotation not take horizontal space.
|
| 1345 |
+
|
| 1346 |
+
## Bugs
|
| 1347 |
+
|
| 1348 |
+
* Crash in Firefox <= 50 when selecting.
|
| 1349 |
+
* Don't crash if a rest is put inside a chord i.e. `[z]`
|
| 1350 |
+
* Improve downward stem and beam rendering
|
| 1351 |
+
* Remove the gaps between notes in audio.
|
| 1352 |
+
* When removing latex commands, don't mess up the character positioning.
|
| 1353 |
+
* fix to scale the click coords when paper is set to responsive
|
| 1354 |
+
* support viewBox differences between chrome and firefox
|
| 1355 |
+
|
| 1356 |
+
## Refactoring
|
| 1357 |
+
|
| 1358 |
+
* Extract the chord/annotation function to a separate file.
|
| 1359 |
+
* Much refactoring to start putting all of the drawing commands together.
|
| 1360 |
+
|
| 1361 |
+
## Documentation
|
| 1362 |
+
|
| 1363 |
+
* Add example for using wrap.
|
| 1364 |
+
* Improve documentation for the call to initialize the synth.
|
| 1365 |
+
* use https link over ssh for building documentation
|
| 1366 |
+
|
| 1367 |
+
# Version 6.0.0-beta.10
|
| 1368 |
+
|
| 1369 |
+
## Features
|
| 1370 |
+
|
| 1371 |
+
* Add option to turn off individual voices when producing the audio.
|
| 1372 |
+
* Add track names to midi file output.
|
| 1373 |
+
|
| 1374 |
+
## Documentation
|
| 1375 |
+
|
| 1376 |
+
* Example of how to play only chords or only melody.
|
| 1377 |
+
|
| 1378 |
+
## Bugs
|
| 1379 |
+
|
| 1380 |
+
* Fix placement of multiline overlay voices.
|
| 1381 |
+
* Fix crash when setting the name of the midi file to download.
|
| 1382 |
+
* Many timing tweaks and other improvements to the audio creation.
|
| 1383 |
+
* Playback treble+8, etc. clefs in the correct octave.
|
| 1384 |
+
* Don't transpose chord accompaniment more than an octave.
|
| 1385 |
+
* Extra resume of audio context for Safari 13
|
| 1386 |
+
* Fix setting the sound font url.
|
| 1387 |
+
* Support pppp and ffff in audio.
|
| 1388 |
+
* Fill midiPitches when doing any timing operation.
|
| 1389 |
+
* Fix seeking when paused moved the cursor but not the audio.
|
| 1390 |
+
* Fix audio timing when there are grace notes present.
|
| 1391 |
+
* Fix end tie that happens over an ending.
|
| 1392 |
+
* Fix audio for ties when there are accidentals.
|
| 1393 |
+
* Fix the alternating bass note for chords with #5 and b5.
|
| 1394 |
+
* Fix arithmetic inaccuracies in triplets.
|
| 1395 |
+
* Fix interpreting a "maj" chord as minor.
|
| 1396 |
+
* Fix tempo of 3/4 tunes.
|
| 1397 |
+
|
| 1398 |
+
# Version 6.0.0-beta.9
|
| 1399 |
+
|
| 1400 |
+
## Bugs
|
| 1401 |
+
|
| 1402 |
+
* Add a fail-safe timer for the timingCallbacks (for some mobile devices that don't properly do requestAnimationFrame)
|
| 1403 |
+
|
| 1404 |
+
## Tasks
|
| 1405 |
+
|
| 1406 |
+
* Add Docker files for running npm.
|
| 1407 |
+
|
| 1408 |
+
# Version 6.0.0-beta.8
|
| 1409 |
+
|
| 1410 |
+
## Bugs
|
| 1411 |
+
|
| 1412 |
+
* Give the percussion clef a little more room to the right.
|
| 1413 |
+
|
| 1414 |
+
* Fix line ending callbacks after random access seeking.
|
| 1415 |
+
|
| 1416 |
+
# Version 6.0.0-beta.7
|
| 1417 |
+
|
| 1418 |
+
## Bugs
|
| 1419 |
+
|
| 1420 |
+
* Some tweaks to improve audio output.
|
| 1421 |
+
|
| 1422 |
+
* Element.prepend is not available on older browsers.
|
| 1423 |
+
|
| 1424 |
+
# Version 6.0.0-beta.6
|
| 1425 |
+
|
| 1426 |
+
## Bugs
|
| 1427 |
+
|
| 1428 |
+
* When doing line wrap, don't drop the meter when there are multiple staves.
|
| 1429 |
+
|
| 1430 |
+
* Keep the line callbacks in TimingCallbacks accurate after seeking.
|
| 1431 |
+
|
| 1432 |
+
# Version 6.0.0-beta.5
|
| 1433 |
+
|
| 1434 |
+
## Features
|
| 1435 |
+
|
| 1436 |
+
* Add offset parameter for TimingCallbacks start()
|
| 1437 |
+
|
| 1438 |
+
* Somewhat improved documentation.
|
| 1439 |
+
|
| 1440 |
+
## Bugs
|
| 1441 |
+
|
| 1442 |
+
* Make the timing of beats more accurate in TimingCallbacks.
|
| 1443 |
+
|
| 1444 |
+
* Only select element if the click is within 12 pixels.
|
| 1445 |
+
|
| 1446 |
+
* Fix crash when using the built in audio control.
|
| 1447 |
+
|
| 1448 |
+
# Version 6.0.0-beta.4
|
| 1449 |
+
|
| 1450 |
+
## Features
|
| 1451 |
+
|
| 1452 |
+
* Add a callback for the client to select items programmatically.
|
| 1453 |
+
|
| 1454 |
+
* Add midi download to the synth example.
|
| 1455 |
+
|
| 1456 |
+
* Add "link" as the default style of midi file return value.
|
| 1457 |
+
|
| 1458 |
+
## Bugs
|
| 1459 |
+
|
| 1460 |
+
* Call resume on the AudioContext just before playing, just in case. (Fixed Safari bug)
|
| 1461 |
+
|
| 1462 |
+
* Fixed regression with the line number on the staves.
|
| 1463 |
+
|
| 1464 |
+
* Fixed regression: the class "abcjs-top-line" lost the "abcjs-" part.
|
| 1465 |
+
|
| 1466 |
+
## Tasks
|
| 1467 |
+
|
| 1468 |
+
* Update copyright years.
|
| 1469 |
+
|
| 1470 |
+
* Update dragging example.
|
| 1471 |
+
|
| 1472 |
+
# Version 6.0.0-beta.3
|
| 1473 |
+
|
| 1474 |
+
## Bugs
|
| 1475 |
+
|
| 1476 |
+
* Remove warning in audio creation when the track name is specified.
|
| 1477 |
+
|
| 1478 |
+
* Don't crash in creating audio when the length of the music is zero.
|
| 1479 |
+
|
| 1480 |
+
* Fix some timing problems with loading note mp3 that are already pending.
|
| 1481 |
+
|
| 1482 |
+
* Fix selection of free text.
|
| 1483 |
+
|
| 1484 |
+
* Set the correct defaults for a bare "%%sep" command.
|
| 1485 |
+
|
| 1486 |
+
* Set the right font face when a font is specified with only "box"
|
| 1487 |
+
|
| 1488 |
+
* Fix crash in audio when trying to play unisons.
|
| 1489 |
+
|
| 1490 |
+
* Fix setting the position of braces and brackets when the start staff isn't present.
|
| 1491 |
+
|
| 1492 |
+
* Fix computation of pickup length because of JavaScript math problems
|
| 1493 |
+
|
| 1494 |
+
* Fix setting the position of braces and brackets when the end staff isn't present.
|
| 1495 |
+
|
| 1496 |
+
* Fix some inaccuracies in getting height of text.
|
| 1497 |
+
|
| 1498 |
+
## Improvements
|
| 1499 |
+
|
| 1500 |
+
* Improve efficiency of creating the audio buffer; improve sound quality and volume of the buffer.
|
| 1501 |
+
|
| 1502 |
+
* Round many of the calculations to make the SVG draw the same on different systems.
|
| 1503 |
+
|
| 1504 |
+
* Improve the selection data.
|
| 1505 |
+
|
| 1506 |
+
# Version 6.0.0-beta.2
|
| 1507 |
+
|
| 1508 |
+
## Bugs
|
| 1509 |
+
* Fix crash when creating music when the SVG is not shown.
|
| 1510 |
+
|
| 1511 |
+
# Version 6.0.0-beta.1
|
| 1512 |
+
|
| 1513 |
+
## Selection
|
| 1514 |
+
* Completely revamp the selection of elements code.
|
| 1515 |
+
* Implement dragging notes vertically.
|
| 1516 |
+
* Give more information when clicking on the staff label.
|
| 1517 |
+
* Get the box around text to be selected with the text.
|
| 1518 |
+
* Fix selection of the text at the top.
|
| 1519 |
+
* Click listener parameters now have analysis.
|
| 1520 |
+
* Add more element types that can be selected by the user.
|
| 1521 |
+
* Add option "selectAll" for only being able to select notes/rests/bars.
|
| 1522 |
+
* Add option "selectionColor".
|
| 1523 |
+
* Add option "dragColor".
|
| 1524 |
+
* Add option "dragging".
|
| 1525 |
+
|
| 1526 |
+
## Audio
|
| 1527 |
+
* Add "pan" parameter for the audio.
|
| 1528 |
+
* Pass changes to audio parameters into the editor.
|
| 1529 |
+
* Improve error handling of midi.
|
| 1530 |
+
* Guard against crash when a negative duration is given to the midi.
|
| 1531 |
+
* If an unknown chord pattern starts with an "m", default to minor chord (was always defaulting to major.)
|
| 1532 |
+
* Redo audio buffer creation to use built in audio nodes.
|
| 1533 |
+
* Add key and time sig to midi output; use the "note off" command instead of volume 0 in midi file.
|
| 1534 |
+
* Add track name to midi file.
|
| 1535 |
+
* Don't override channel for the percussion clef if the program or channel was explicitly set.
|
| 1536 |
+
* Fix small, accumulating rounding error in midi file timing.
|
| 1537 |
+
* Fix crash when there isn't a title or other things about the first music line.
|
| 1538 |
+
* Fix detection of whether a meter is compound.
|
| 1539 |
+
* Add audio support for trills, mordent, turn, and roll.
|
| 1540 |
+
* Fix grace note pitch; implement staccato, tenuto, and accent in audio.
|
| 1541 |
+
* Add option for retrieving the binary midi data.
|
| 1542 |
+
* Expose the code for creating a MIDI file to the basic library.
|
| 1543 |
+
|
| 1544 |
+
## Rendering
|
| 1545 |
+
* Draw bracket; fix positioning of the brace and bracket.
|
| 1546 |
+
* Fix grouping and classes of triplets and beams.
|
| 1547 |
+
* Some tweaks to the grouping of svg elements.
|
| 1548 |
+
* Optimize calls to getBBox
|
| 1549 |
+
* Give measure numbers that appear on the left edge more room when they would interfere with the treble clef.
|
| 1550 |
+
* Make the invisible marker zero pixels so it can't accidentally get shown with css.
|
| 1551 |
+
* Add classes to ledger lines
|
| 1552 |
+
* Add more identifying classes.
|
| 1553 |
+
* Adjust the bass octave indicator a little.
|
| 1554 |
+
* Group some svg elements together that belong together.
|
| 1555 |
+
* Remove the selector box for each element - entire SVG is selectable.
|
| 1556 |
+
|
| 1557 |
+
## Tasks
|
| 1558 |
+
* Add testing for the output of the selection.
|
| 1559 |
+
* Set gitmodules for the vuepress docs (so that commits can be in npm.)
|
| 1560 |
+
* Remove some dependencies on the window object.
|
| 1561 |
+
* Put all drawing actions in an array
|
| 1562 |
+
|
| 1563 |
+
## Documentation
|
| 1564 |
+
* Create demo of dragging and selection.
|
| 1565 |
+
* Documentation should import on the latest abcjs.
|
| 1566 |
+
* Fix link to audio examples in docs.
|
| 1567 |
+
* Fix logo path in readme
|
| 1568 |
+
* Add reference to the standard.
|
| 1569 |
+
|
| 1570 |
+
# Version 5.12.0
|
| 1571 |
+
|
| 1572 |
+
## Features
|
| 1573 |
+
|
| 1574 |
+
* Add entry point for changing glyphs.
|
| 1575 |
+
|
| 1576 |
+
* Improved documentation.
|
| 1577 |
+
|
| 1578 |
+
* Add example for changing glyphs.
|
| 1579 |
+
|
| 1580 |
+
## Bugs
|
| 1581 |
+
|
| 1582 |
+
* Fixed midi plugin example to demonstrate defaultQpm.
|
| 1583 |
+
|
| 1584 |
+
* Fix rendering quarter tones in the key signature.
|
| 1585 |
+
|
| 1586 |
+
# Version 5.11.0
|
| 1587 |
+
|
| 1588 |
+
## Features
|
| 1589 |
+
|
| 1590 |
+
* Changed documentation to vuepress.
|
| 1591 |
+
|
| 1592 |
+
* Implement the defaultQpm parameter.
|
| 1593 |
+
|
| 1594 |
+
* In TimingCallbacks, accept a tune that hasn't created noteTimings yet.
|
| 1595 |
+
|
| 1596 |
+
* Audio: Implement beataccents, nobeataccents, vol, volinc, and set the correct default accent values.
|
| 1597 |
+
|
| 1598 |
+
* Add onEnded callback for the CreateSynth object.
|
| 1599 |
+
|
| 1600 |
+
* Add headless rendering with the "*" parameter.
|
| 1601 |
+
|
| 1602 |
+
* Add callback context to audio calls.
|
| 1603 |
+
|
| 1604 |
+
* Allow using audio without a visible control.
|
| 1605 |
+
|
| 1606 |
+
* Add a callback when the selection changes in the editor.
|
| 1607 |
+
|
| 1608 |
+
## Bugs
|
| 1609 |
+
|
| 1610 |
+
* Fix bug in double reporting a note's millisecond; fix bug in playing gracenote.
|
| 1611 |
+
|
| 1612 |
+
* Fix grace notes in percussion track.
|
| 1613 |
+
|
| 1614 |
+
* Fix crash in creating audio when there is a mismatch of ties.
|
| 1615 |
+
|
| 1616 |
+
* Fix bug with lining up ties with the correct voice on multipart music.
|
| 1617 |
+
|
| 1618 |
+
* Change the TimingCallbacks input parameters into integers.
|
| 1619 |
+
|
| 1620 |
+
* When querying a tunebook for an id, accept either string or number.
|
| 1621 |
+
|
| 1622 |
+
* Fixed the value of currentTrackMilliseconds that is returned when the user clicks on a note.
|
| 1623 |
+
|
| 1624 |
+
* Fix wrapLines with several titles
|
| 1625 |
+
|
| 1626 |
+
* Don't add duplicate program commands in audio
|
| 1627 |
+
|
| 1628 |
+
* Don't ignore chord basses with accidentals when generating midi
|
| 1629 |
+
|
| 1630 |
+
## Tasks
|
| 1631 |
+
|
| 1632 |
+
* Update dependencies
|
| 1633 |
+
|
| 1634 |
+
# Version 5.10.3
|
| 1635 |
+
|
| 1636 |
+
## Bugs
|
| 1637 |
+
|
| 1638 |
+
* Don't crash when calculating the wrap lines if the staff width is too short.
|
| 1639 |
+
|
| 1640 |
+
## Features
|
| 1641 |
+
|
| 1642 |
+
* Allow boolean directives to use "true" and "false", in addition to 0 and 1.
|
| 1643 |
+
|
| 1644 |
+
* Added freegchord option.
|
| 1645 |
+
|
| 1646 |
+
* Show example of getting timing info on note callback function.
|
| 1647 |
+
|
| 1648 |
+
# Version 5.10.2
|
| 1649 |
+
|
| 1650 |
+
## Bugs
|
| 1651 |
+
|
| 1652 |
+
* Fix line wrapping problem when the total number of measures is less than the target number of measures.
|
| 1653 |
+
|
| 1654 |
+
# Version 5.10.1
|
| 1655 |
+
|
| 1656 |
+
## Bugs
|
| 1657 |
+
|
| 1658 |
+
* Fix crash when attempting to manipulate tunes that are created with oneSvgPerLine.
|
| 1659 |
+
|
| 1660 |
+
# Version 5.10.0
|
| 1661 |
+
|
| 1662 |
+
## Bugs
|
| 1663 |
+
|
| 1664 |
+
* Fix crash on init of synth if tempo is not passed in.
|
| 1665 |
+
|
| 1666 |
+
* Fix the tempo for synth pieces that are not in 4/4.
|
| 1667 |
+
|
| 1668 |
+
## Features
|
| 1669 |
+
|
| 1670 |
+
* Rests that take up a measure should always be a whole rest, no matter what the time sig.
|
| 1671 |
+
|
| 1672 |
+
* Allow beat subdivisions to be set for the synth control object.
|
| 1673 |
+
|
| 1674 |
+
* Update the test for whether audio is possible to include access to ac.resume
|
| 1675 |
+
|
| 1676 |
+
* Add sequenceCallback option for the synth.
|
| 1677 |
+
|
| 1678 |
+
* Add api function to expose the tune's key signature.
|
| 1679 |
+
|
| 1680 |
+
* Add sequenceCallback option for the synth.
|
| 1681 |
+
|
| 1682 |
+
* Add the rest of the possible TimingCallback parameters when calling through the new synth.
|
| 1683 |
+
|
| 1684 |
+
|
| 1685 |
+
# Version 5.9.1
|
| 1686 |
+
|
| 1687 |
+
## Bugs
|
| 1688 |
+
|
| 1689 |
+
* Fix crash when using different combinations of options for the audio control.
|
| 1690 |
+
|
| 1691 |
+
* Fix some browser compatibility issues.
|
| 1692 |
+
|
| 1693 |
+
# Version 5.9.0
|
| 1694 |
+
|
| 1695 |
+
## Features
|
| 1696 |
+
|
| 1697 |
+
* Add parameter afterParsing to provide a hook before displaying the music.
|
| 1698 |
+
|
| 1699 |
+
* Added entry point for seeing if audio is possible.
|
| 1700 |
+
|
| 1701 |
+
* Play gracenotes (when present) when playing a single event.
|
| 1702 |
+
|
| 1703 |
+
* Keep a running total of the time that a note should be played for convenience in callbacks.
|
| 1704 |
+
|
| 1705 |
+
* Add gracenote midi pitches to the return object on timing callbacks.
|
| 1706 |
+
|
| 1707 |
+
* Support `%%MIDI program channel program` syntax.
|
| 1708 |
+
|
| 1709 |
+
* Much improved interface for using the new audio.
|
| 1710 |
+
|
| 1711 |
+
* Incorporate playing a single note.
|
| 1712 |
+
|
| 1713 |
+
## Bugs
|
| 1714 |
+
|
| 1715 |
+
* Fix crash in editor/synth demo.
|
| 1716 |
+
|
| 1717 |
+
* Fix placement of triplets
|
| 1718 |
+
|
| 1719 |
+
* Let the timingCallbacks be used with one SVG per line.
|
| 1720 |
+
|
| 1721 |
+
## Tasks
|
| 1722 |
+
|
| 1723 |
+
* Improve demos relating to audio.
|
| 1724 |
+
|
| 1725 |
+
* Update all node dependencies.
|
| 1726 |
+
|
| 1727 |
+
* Document the "mark" class.
|
| 1728 |
+
|
| 1729 |
+
* Update webpack
|
| 1730 |
+
|
| 1731 |
+
* Make uncompressed version of abcjs.
|
| 1732 |
+
|
| 1733 |
+
# Version 5.8.1
|
| 1734 |
+
|
| 1735 |
+
## Bugs
|
| 1736 |
+
|
| 1737 |
+
* Fix vertical spacing of %%text
|
| 1738 |
+
|
| 1739 |
+
* Fix output of getTune() when more than one tune is parsed with the same parser.
|
| 1740 |
+
|
| 1741 |
+
# Version 5.8.0
|
| 1742 |
+
|
| 1743 |
+
## Bugs
|
| 1744 |
+
|
| 1745 |
+
* Fix alignment issue when a tempo is over a barline.
|
| 1746 |
+
|
| 1747 |
+
* Fix alignment issue when a part is over a barline.
|
| 1748 |
+
|
| 1749 |
+
* Change startChar and endChar to be aware of the position in the entire tunebook.
|
| 1750 |
+
|
| 1751 |
+
* Some tweaks to the slur and tie positioning.
|
| 1752 |
+
|
| 1753 |
+
* Protect against crash when an element is added before the staff is ready.
|
| 1754 |
+
|
| 1755 |
+
## Features
|
| 1756 |
+
|
| 1757 |
+
* Add a new method of creating synthesized sound. (see [Synth Documentation](docs/audio/synthesized-sound.md) )
|
| 1758 |
+
|
| 1759 |
+
* Implement "setbarnb" measure number
|
| 1760 |
+
|
| 1761 |
+
## Tasks
|
| 1762 |
+
|
| 1763 |
+
* Add demos for transposing.
|
| 1764 |
+
|
| 1765 |
+
* Add demo of clicking on a note to play it.
|
| 1766 |
+
|
| 1767 |
+
* Add examples of how to use the new synth.
|
| 1768 |
+
|
| 1769 |
+
* Update build dependencies
|
| 1770 |
+
|
| 1771 |
+
* Simplify the build process by not requiring a version number change for each entry point.
|
| 1772 |
+
|
| 1773 |
+
* Add info about x and width to renderer regression tests.
|
| 1774 |
+
|
| 1775 |
+
# Version 5.7.0
|
| 1776 |
+
|
| 1777 |
+
## Bugs:
|
| 1778 |
+
|
| 1779 |
+
* Improve slur and tie direction and placement by following "Standard Practice Engraving".
|
| 1780 |
+
|
| 1781 |
+
* Use override when calculating beats per measure in the timing functions.
|
| 1782 |
+
|
| 1783 |
+
* Fix crash when using the old animation routine without a cursor.
|
| 1784 |
+
|
| 1785 |
+
* Handle blank lines in the verses at the bottom.
|
| 1786 |
+
|
| 1787 |
+
* Allow calling pauseAnimation and stopAnimation even if the animation hasn't started.
|
| 1788 |
+
|
| 1789 |
+
* Fix alignment of overlay voices when the line starts with a bar line.
|
| 1790 |
+
|
| 1791 |
+
* Don't start TimingCallbacks timer if there is a seek before the timer starts.
|
| 1792 |
+
|
| 1793 |
+
* Expose TimingCallbacks in the midi and test versions.
|
| 1794 |
+
|
| 1795 |
+
## Features:
|
| 1796 |
+
|
| 1797 |
+
* Allow creation of SVG when it isn't visible in the DOM (by creating a dummy one if necessary).
|
| 1798 |
+
|
| 1799 |
+
* Add classes to lyric lines.
|
| 1800 |
+
|
| 1801 |
+
* Separate the tempo element into its own svg path so that it can be treated separately.
|
| 1802 |
+
|
| 1803 |
+
* Support 6/4 time.
|
| 1804 |
+
|
| 1805 |
+
* Invert beatCallback and timingCallback events.
|
| 1806 |
+
|
| 1807 |
+
* Add more information in the callback for both the timingCallbacks and the note click callback about the sound of the note clicked.
|
| 1808 |
+
|
| 1809 |
+
* In midi, support switching instruments in the same track.
|
| 1810 |
+
|
| 1811 |
+
* In midi, return the pitch that is being played in the event; add the total duration as a parameter of the midi; expose getBeatsPerMeasure() in the tune structure.
|
| 1812 |
+
|
| 1813 |
+
* In TimingCallbacks, allow subdividing beat callbacks.
|
| 1814 |
+
|
| 1815 |
+
## Tasks:
|
| 1816 |
+
|
| 1817 |
+
* Update webpack/babel to the latest versions.
|
| 1818 |
+
|
| 1819 |
+
* Clean up the text size estimation to just be done in one place, and create a dummy svg if there isn't one available.
|
| 1820 |
+
|
| 1821 |
+
* Remove the examples and the font_generator from the npm version.
|
| 1822 |
+
|
| 1823 |
+
# Version 5.6.11
|
| 1824 |
+
|
| 1825 |
+
## Bugs
|
| 1826 |
+
|
| 1827 |
+
* Fix bug in TimingCallbacks where some beats won't be reported if the javascript processing is interrupted (for instance, if the user changes tabs while it is running.)
|
| 1828 |
+
|
| 1829 |
+
# Version 5.6.10
|
| 1830 |
+
|
| 1831 |
+
## Bugs
|
| 1832 |
+
|
| 1833 |
+
* Fix bug in TimingCallbacks where last beat can sometimes be skipped if the animation timer wakes up right at the end.
|
| 1834 |
+
|
| 1835 |
+
# Version 5.6.9
|
| 1836 |
+
|
| 1837 |
+
## Bugs
|
| 1838 |
+
|
| 1839 |
+
* Make overlay work with first & second endings
|
| 1840 |
+
|
| 1841 |
+
* Fix bug in measure counting in TimingCallbacks when line starts with a measure of rests.
|
| 1842 |
+
|
| 1843 |
+
* Keep stem direction when doing line wrapping.
|
| 1844 |
+
|
| 1845 |
+
* Improve the algorithm for wrapping lines.
|
| 1846 |
+
|
| 1847 |
+
# Version 5.6.8
|
| 1848 |
+
|
| 1849 |
+
## Bugs
|
| 1850 |
+
|
| 1851 |
+
* Improve the line wrapping algorithm.
|
| 1852 |
+
|
| 1853 |
+
* When seeking in the TimingCallbacks, call the new position's callbacks right away.
|
| 1854 |
+
|
| 1855 |
+
# Version 5.6.7
|
| 1856 |
+
|
| 1857 |
+
## Bugs
|
| 1858 |
+
|
| 1859 |
+
* When note is far from the centerline, the stem is extended, so put the flag in the right place.
|
| 1860 |
+
|
| 1861 |
+
# Version 5.6.6
|
| 1862 |
+
|
| 1863 |
+
## Bugs
|
| 1864 |
+
|
| 1865 |
+
* Calculate the correct number of beats in TimingCallbacks: fixes rounding error.
|
| 1866 |
+
|
| 1867 |
+
# Version 5.6.5
|
| 1868 |
+
|
| 1869 |
+
## Features:
|
| 1870 |
+
|
| 1871 |
+
* Add random access seeking to TimingCallbacks.
|
| 1872 |
+
|
| 1873 |
+
* Pass back more progress info in the beat callback of TimingCallbacks.
|
| 1874 |
+
|
| 1875 |
+
## Bugs
|
| 1876 |
+
|
| 1877 |
+
* Add render_options to the midi version of the plugin.
|
| 1878 |
+
|
| 1879 |
+
* Add missing release files; remove the "latest" versions, since they were not kept up to date.
|
| 1880 |
+
|
| 1881 |
+
* Updated build packages.
|
| 1882 |
+
|
| 1883 |
+
# Version 5.6.4
|
| 1884 |
+
|
| 1885 |
+
## Features:
|
| 1886 |
+
|
| 1887 |
+
* Add %%vskip
|
| 1888 |
+
|
| 1889 |
+
* Add %%sep
|
| 1890 |
+
|
| 1891 |
+
## Bugs
|
| 1892 |
+
|
| 1893 |
+
* Don't include the minified versions of the libraries in the npm package.
|
| 1894 |
+
|
| 1895 |
+
# Version 5.6.3
|
| 1896 |
+
|
| 1897 |
+
## Features:
|
| 1898 |
+
|
| 1899 |
+
* Add arpeggio decoration.
|
| 1900 |
+
|
| 1901 |
+
* Add "voicescale" and "cue=on".
|
| 1902 |
+
|
| 1903 |
+
* Add "%%flatbeams".
|
| 1904 |
+
|
| 1905 |
+
* Add entry point for "extractMeasures()" to analyze the tune. (Just single voice music for now.)
|
| 1906 |
+
|
| 1907 |
+
## Bug fixes:
|
| 1908 |
+
|
| 1909 |
+
* Add startChar and endChar for many non-note elements (parts, clefs, tempos, etc.)
|
| 1910 |
+
|
| 1911 |
+
* Fix triplet bracket placement when there are rests or really high notes.
|
| 1912 |
+
|
| 1913 |
+
* Handle triplets correctly when figuring out the length of the pickup measure.
|
| 1914 |
+
|
| 1915 |
+
* Don't count spacers when seeing if there are pickup notes in a tune.
|
| 1916 |
+
|
| 1917 |
+
* Fix bug not recognizing an inline header after a "&".
|
| 1918 |
+
|
| 1919 |
+
# Version 5.6.2
|
| 1920 |
+
|
| 1921 |
+
## Features:
|
| 1922 |
+
|
| 1923 |
+
* Add more chord definitions.
|
| 1924 |
+
|
| 1925 |
+
* Support changing fonts in W: statements using $1 syntax.
|
| 1926 |
+
|
| 1927 |
+
## Bug fixes:
|
| 1928 |
+
|
| 1929 |
+
* Don't attach midi control listeners to the global object.
|
| 1930 |
+
|
| 1931 |
+
* Fix some midi control visual issues.
|
| 1932 |
+
|
| 1933 |
+
* Fix mousemove listener in the midi control, we want to consume only our events.
|
| 1934 |
+
|
| 1935 |
+
* Sort the events for midi creation more deterministically.
|
| 1936 |
+
|
| 1937 |
+
* Fix handling ties over a bar line when there is an overlay.
|
| 1938 |
+
|
| 1939 |
+
* Adjust text a little when there is a box around it to be centered better.
|
| 1940 |
+
|
| 1941 |
+
# Version 5.6.1
|
| 1942 |
+
|
| 1943 |
+
## Bug fixes:
|
| 1944 |
+
|
| 1945 |
+
* Fix bug where wrapping code was ignoring one SVG per line.
|
| 1946 |
+
|
| 1947 |
+
# Version 5.6.0
|
| 1948 |
+
|
| 1949 |
+
## Features:
|
| 1950 |
+
|
| 1951 |
+
* Enable progress indicator dragging
|
| 1952 |
+
|
| 1953 |
+
* Clicks on progress bar now move the indicator correctly
|
| 1954 |
+
|
| 1955 |
+
## Bug fixes:
|
| 1956 |
+
|
| 1957 |
+
* Fix the title (with unicode chars) in the downloadable MIDI file.
|
| 1958 |
+
|
| 1959 |
+
* In midi, sort program changes before other events that happen at the same time.
|
| 1960 |
+
|
| 1961 |
+
* Fix crash when calculating the title for a piece with a missing voice.
|
| 1962 |
+
|
| 1963 |
+
* Fix bug where wrapping code was ignoring one SVG per line.
|
| 1964 |
+
|
| 1965 |
+
* Fix off-by-one error when calculating line widths during wrapping.
|
| 1966 |
+
|
| 1967 |
+
# Version 5.5.0
|
| 1968 |
+
|
| 1969 |
+
## Features:
|
| 1970 |
+
|
| 1971 |
+
* Add "chordsOff" parameter to just play midi of the melody.
|
| 1972 |
+
|
| 1973 |
+
## Bug fixes:
|
| 1974 |
+
|
| 1975 |
+
* Don't duplicate slurs on chords when using wrap.
|
| 1976 |
+
|
| 1977 |
+
* Figure out correct accidental when transposing to a key with accidentals in the key signature.
|
| 1978 |
+
|
| 1979 |
+
* Fix problem with calculating the height of beamed notes when the top or bottom one is middle C.
|
| 1980 |
+
|
| 1981 |
+
# Version 5.4.2
|
| 1982 |
+
|
| 1983 |
+
## Bug fixes:
|
| 1984 |
+
|
| 1985 |
+
* TimingCallbacks was reporting the end of the animation at the beginning of the last event - it now waits until the end of that event.
|
| 1986 |
+
|
| 1987 |
+
# Version 5.4.1
|
| 1988 |
+
|
| 1989 |
+
## Bug fixes:
|
| 1990 |
+
|
| 1991 |
+
* Improve the decision on how to break lines in line wrapping.
|
| 1992 |
+
|
| 1993 |
+
* Don't duplicate meter when wrapping lines.
|
| 1994 |
+
|
| 1995 |
+
* Return the correct version of the tune when doing line wrapping.
|
| 1996 |
+
|
| 1997 |
+
# Version 5.4.0
|
| 1998 |
+
|
| 1999 |
+
## Features:
|
| 2000 |
+
|
| 2001 |
+
* Add `preferredMeasuresPerLine` as a parameter to the line wrap.
|
| 2002 |
+
|
| 2003 |
+
## Bug fixes:
|
| 2004 |
+
|
| 2005 |
+
* Improvements to the speed and stability of the line wrapping code.
|
| 2006 |
+
|
| 2007 |
+
* Fix lyric placement on wrapped lines.
|
| 2008 |
+
|
| 2009 |
+
* Fix the timing of whole rests in the TimingCallback.
|
| 2010 |
+
|
| 2011 |
+
# Version 5.3.5
|
| 2012 |
+
|
| 2013 |
+
## Features:
|
| 2014 |
+
|
| 2015 |
+
* Always send start of measure event on TimingCallbacks, even if the measure starts with a tie.
|
| 2016 |
+
|
| 2017 |
+
* Support ^8 and _8 for clefs.
|
| 2018 |
+
|
| 2019 |
+
# Version 5.3.4
|
| 2020 |
+
|
| 2021 |
+
## Bug fixes:
|
| 2022 |
+
|
| 2023 |
+
* Fix crash when doing multi-stave music in wrap mode.
|
| 2024 |
+
|
| 2025 |
+
# Version 5.3.3
|
| 2026 |
+
|
| 2027 |
+
## Bug fixes:
|
| 2028 |
+
|
| 2029 |
+
* Fix test for shrinking the only line when wrapping.
|
| 2030 |
+
|
| 2031 |
+
# Version 5.3.2
|
| 2032 |
+
|
| 2033 |
+
## Bug fixes:
|
| 2034 |
+
|
| 2035 |
+
* Test all options in the `wrap` parameter for legal values.
|
| 2036 |
+
|
| 2037 |
+
* Ignore the explicit line breaks when using `wrap`.
|
| 2038 |
+
|
| 2039 |
+
* Get the amount of spacing more even on each line when using `wrap`.
|
| 2040 |
+
|
| 2041 |
+
# Version 5.3.1
|
| 2042 |
+
|
| 2043 |
+
## Bug fixes:
|
| 2044 |
+
|
| 2045 |
+
* Don't require passing `scale` as a parameter to get the `wrap` parameter to work.
|
| 2046 |
+
|
| 2047 |
+
# Version 5.3.0
|
| 2048 |
+
|
| 2049 |
+
## Features
|
| 2050 |
+
|
| 2051 |
+
* Add parameter `wrap: { minSpacing, onlyLineLimit, lastLineLimit }` and automatically calc num measures for each line.
|
| 2052 |
+
|
| 2053 |
+
* When animating, return an array of start and end chars if there is more than one voice.
|
| 2054 |
+
|
| 2055 |
+
* Add line and measure info into the TimingCallbacks for the convenience of the clients.
|
| 2056 |
+
|
| 2057 |
+
* Don't require qpm to be passed to TimingCallbacks: look for a qpm in the music.
|
| 2058 |
+
|
| 2059 |
+
* In TimingCallbacks, add a callback when it is near the end of a line.
|
| 2060 |
+
|
| 2061 |
+
* Add `replaceTarget()` to the timing callback so that re-engraving can happen when the cursor is running.
|
| 2062 |
+
|
| 2063 |
+
* Include the original abcString in the callback when rendering.
|
| 2064 |
+
|
| 2065 |
+
* Allow multiple overlays in the same measure.
|
| 2066 |
+
|
| 2067 |
+
* Add `%%tripletfont` directive.
|
| 2068 |
+
|
| 2069 |
+
* Add unicode versions of flats and sharps in midi chords.
|
| 2070 |
+
|
| 2071 |
+
* Support `%%MIDI beat` command.
|
| 2072 |
+
|
| 2073 |
+
* Support `%%MIDI gchordoff` and `%%MIDI gchordon`.
|
| 2074 |
+
|
| 2075 |
+
## Bug fixes:
|
| 2076 |
+
|
| 2077 |
+
* The tune positions were off by one because a newline is removed for each tune and was not counted.
|
| 2078 |
+
|
| 2079 |
+
* Fix crash in `renderAbc` if the output container isn't an html element.
|
| 2080 |
+
|
| 2081 |
+
* Fix default tempo in animation for compound meters to match the MIDI interpretation.
|
| 2082 |
+
|
| 2083 |
+
* Refactored the animation to use the TimingCallbacks instead of duplicating code.
|
| 2084 |
+
|
| 2085 |
+
* Fix a couple of bugs when sequencing elements for the TimingCallbacks and animation.
|
| 2086 |
+
|
| 2087 |
+
* Center the time signature better (particularly 12/8).
|
| 2088 |
+
|
| 2089 |
+
* Add extra space to the left of bar lines.
|
| 2090 |
+
|
| 2091 |
+
* Add extra space to the width of a note when there is an accidental.
|
| 2092 |
+
|
| 2093 |
+
* Lots of refactoring of the engraving code.
|
| 2094 |
+
|
| 2095 |
+
* Fix crash when using `barsperstaff`.
|
| 2096 |
+
|
| 2097 |
+
* Fix usage of `staffnonote`
|
| 2098 |
+
|
| 2099 |
+
* In TimingCallbacks, make `extraMeasuresAtBeginning` default to 0.
|
| 2100 |
+
|
| 2101 |
+
# Version 5.2.0
|
| 2102 |
+
|
| 2103 |
+
## Features
|
| 2104 |
+
|
| 2105 |
+
* Add a version of the plugin that supports midi.
|
| 2106 |
+
|
| 2107 |
+
* Add getMeterFraction() convenience function.
|
| 2108 |
+
|
| 2109 |
+
* Add a generic timer that provides callbacks in time with the music.
|
| 2110 |
+
|
| 2111 |
+
* Small change to classes: add `abcjs-n...` to rests; add duration to triplet marks.
|
| 2112 |
+
|
| 2113 |
+
## Bug fixes:
|
| 2114 |
+
|
| 2115 |
+
* Correct the speed of animation in 3/8 meter.
|
| 2116 |
+
|
| 2117 |
+
* Fix accidentally creating a global variable.
|
| 2118 |
+
|
| 2119 |
+
# Version 5.1.2
|
| 2120 |
+
|
| 2121 |
+
## Bug fixes:
|
| 2122 |
+
|
| 2123 |
+
* Fix horizontal spacing calculation for multiline text.
|
| 2124 |
+
|
| 2125 |
+
# Version 5.1.1
|
| 2126 |
+
|
| 2127 |
+
## Bug fixes:
|
| 2128 |
+
|
| 2129 |
+
* Fix regression for having the SVG responsive.
|
| 2130 |
+
|
| 2131 |
+
# Version 5.1.0
|
| 2132 |
+
|
| 2133 |
+
## Bug fixes:
|
| 2134 |
+
|
| 2135 |
+
* Fix bug with spacing triplets when the stem direction is not explicitly set.
|
| 2136 |
+
|
| 2137 |
+
* Fix problem with sizing the music div when zooming.
|
| 2138 |
+
|
| 2139 |
+
* Fix crash when clicking on the time signature.
|
| 2140 |
+
|
| 2141 |
+
* Fix bug in beat detection in midi listener.
|
| 2142 |
+
|
| 2143 |
+
## Features
|
| 2144 |
+
|
| 2145 |
+
* Add entry point for parseOnly().
|
| 2146 |
+
|
| 2147 |
+
* Expose midi.setRandomProgress().
|
| 2148 |
+
|
| 2149 |
+
* Expose midi.setLoop().
|
| 2150 |
+
|
| 2151 |
+
* Expose midi.restartPlay().
|
| 2152 |
+
|
| 2153 |
+
# Version 5.0.1
|
| 2154 |
+
|
| 2155 |
+
## Bug fixes:
|
| 2156 |
+
|
| 2157 |
+
* Comply with the Chrome change to not play audio unless the AudioContext is resumed inside a user interaction.
|
| 2158 |
+
|
| 2159 |
+
# Version 5.0.0
|
| 2160 |
+
|
| 2161 |
+
## Bug fixes:
|
| 2162 |
+
|
| 2163 |
+
* Don't crash animation when there are invisible rests.
|
| 2164 |
+
|
| 2165 |
+
* Don't crash when illegal value for scale is passed in.
|
| 2166 |
+
|
| 2167 |
+
* Change guitar chord flat and sharp to the right symbols in a few more cases.
|
| 2168 |
+
|
| 2169 |
+
* Begin to support mensural time signatures.
|
| 2170 |
+
|
| 2171 |
+
## Features
|
| 2172 |
+
|
| 2173 |
+
* Remove dependency on Raphael.
|
| 2174 |
+
|
| 2175 |
+
# Version 4.1.1
|
| 2176 |
+
|
| 2177 |
+
## Bug fixes:
|
| 2178 |
+
|
| 2179 |
+
* Fix double transposition of the key signature when transposition is specified in the parameters.
|
| 2180 |
+
|
| 2181 |
+
# Version 4.1.0
|
| 2182 |
+
|
| 2183 |
+
## Bug fixes:
|
| 2184 |
+
|
| 2185 |
+
* When the perc clef is defined in the voice, add the midimap translation to the pitches (this was already being done when perc is in the key sig.)
|
| 2186 |
+
|
| 2187 |
+
* Get lines with lots of notes to align properly.
|
| 2188 |
+
|
| 2189 |
+
* Do more edge cases with triplets; fix some triplet bugs.
|
| 2190 |
+
|
| 2191 |
+
* Double bar lines were messing up the place for the repeat to return to.
|
| 2192 |
+
|
| 2193 |
+
* MIDI animation now follows tempo changes.
|
| 2194 |
+
|
| 2195 |
+
* Don't get off on the midi animation when encountering a spacer type rest.
|
| 2196 |
+
|
| 2197 |
+
* Be sure the div to be written to is empty before engraving.
|
| 2198 |
+
|
| 2199 |
+
* When midi is redrawn, stop playing the old midi.
|
| 2200 |
+
|
| 2201 |
+
* After calling midi's stopPlaying, reset the inline midi control.
|
| 2202 |
+
|
| 2203 |
+
* Fix midi animation when there are no explicit 1st & 2nd ending marks.
|
| 2204 |
+
|
| 2205 |
+
* Add fix for getting the Font Awesome 5 icons to show up in audio control; some cosmetic tweaks to large version on audio control.
|
| 2206 |
+
|
| 2207 |
+
* Fix click listener in Editor mode.
|
| 2208 |
+
|
| 2209 |
+
## Features:
|
| 2210 |
+
|
| 2211 |
+
* Allow "style=" parameter on V: line.
|
| 2212 |
+
|
| 2213 |
+
* Add a spinner to the audio play button when the soundfonts are loading.
|
| 2214 |
+
|
| 2215 |
+
* Allow rhythm slashes to be placed on rests.
|
| 2216 |
+
|
| 2217 |
+
* Add feature to transpose a single voice, using "V: ... score=_B"
|
| 2218 |
+
|
| 2219 |
+
* Add public function: midi.deviceSupportsMidi()
|
| 2220 |
+
|
| 2221 |
+
* Add all the fonts to the directives that can be specified in the renderAbc call.
|
| 2222 |
+
|
| 2223 |
+
# Version 4.0.1
|
| 2224 |
+
|
| 2225 |
+
## Bug fixes:
|
| 2226 |
+
|
| 2227 |
+
* Respect repeats in animation.
|
| 2228 |
+
|
| 2229 |
+
* Fix crash when using metronome intro in minified version.
|
| 2230 |
+
|
| 2231 |
+
# Version 4.0.0
|
| 2232 |
+
|
| 2233 |
+
## Breaking Changes:
|
| 2234 |
+
|
| 2235 |
+
* Don't generate classes unless requested. (This is a bug fix, but client code might mistakenly been relying on that behavior.)
|
| 2236 |
+
|
| 2237 |
+
* Add "abcjs-" as a prefix to all class names that are generated.
|
| 2238 |
+
|
| 2239 |
+
* Change the metronome track to use the Channel 10 sounds.
|
| 2240 |
+
|
| 2241 |
+
## Features:
|
| 2242 |
+
|
| 2243 |
+
* Simplify the options used to call `renderAbc` and `renderMidi`.
|
| 2244 |
+
|
| 2245 |
+
* Add clearer names for `clickListener`, `midiListener`, `midiTranspose`, and `visualTranspose`.
|
| 2246 |
+
|
| 2247 |
+
* Implement "partsBox"
|
| 2248 |
+
|
| 2249 |
+
* Add a few missing text encodings.
|
| 2250 |
+
|
| 2251 |
+
* Handle "%%MIDI transpose" syntax.
|
| 2252 |
+
|
| 2253 |
+
* Add a larger version of the audio control.
|
| 2254 |
+
|
| 2255 |
+
## Bug fixes:
|
| 2256 |
+
|
| 2257 |
+
* Remove a few deprecated options that were broken anyway.
|
| 2258 |
+
|
| 2259 |
+
* Move first and second ending lines down a little.
|
| 2260 |
+
|
| 2261 |
+
* Put a little more spacing around text that has a box around it.
|
| 2262 |
+
|
| 2263 |
+
* Remove some ES6 syntax that snuck in.
|
| 2264 |
+
|
| 2265 |
+
* Ignore %%scale formatting command if responsive=resize.
|
| 2266 |
+
|
| 2267 |
+
* Remove some debug messages.
|
| 2268 |
+
|
| 2269 |
+
* Fix bug with setting only one voice to percussion voice.
|
| 2270 |
+
|
| 2271 |
+
# Version 3.3.4
|
| 2272 |
+
|
| 2273 |
+
## Bug fixes:
|
| 2274 |
+
|
| 2275 |
+
* Fix build error causing percussion soundfont to be missing.
|
| 2276 |
+
|
| 2277 |
+
* Fix lining up multline lyrics when there is a syllable missing on the first line.
|
| 2278 |
+
|
| 2279 |
+
## Features:
|
| 2280 |
+
|
| 2281 |
+
* Add "rest" class to all rest objects.
|
| 2282 |
+
|
| 2283 |
+
* Add multi-measure rests.
|
| 2284 |
+
|
| 2285 |
+
# Version 3.3.3
|
| 2286 |
+
|
| 2287 |
+
## Bug fixes:
|
| 2288 |
+
|
| 2289 |
+
* Fix parsing when "V:" is inline.
|
| 2290 |
+
|
| 2291 |
+
* Allow stafflines on the V: line.
|
| 2292 |
+
|
| 2293 |
+
* Add "perc" to clefs recognized by V:
|
| 2294 |
+
|
| 2295 |
+
* Fix the parsing of the "middle" parameter.
|
| 2296 |
+
|
| 2297 |
+
* Fix centering of lyrics.
|
| 2298 |
+
|
| 2299 |
+
* Fix midi animation when repeating over more than one line.
|
| 2300 |
+
|
| 2301 |
+
* Take pickup notes into consideration for the lead in metronome beats.
|
| 2302 |
+
|
| 2303 |
+
## Features:
|
| 2304 |
+
|
| 2305 |
+
* Add transpose parameter for engraving.
|
| 2306 |
+
|
| 2307 |
+
* Implement "MIDI drummap".
|
| 2308 |
+
|
| 2309 |
+
* Use percussion channel whenever the clef=perc.
|
| 2310 |
+
|
| 2311 |
+
* Change default soundfont location to paulrosen github.
|
| 2312 |
+
|
| 2313 |
+
* Add percussion channel to the soundfont.
|
| 2314 |
+
|
| 2315 |
+
* Change to percussion track when "channel 10" is specified.
|
| 2316 |
+
|
| 2317 |
+
* New parameter for download midi link: "downloadClass".
|
| 2318 |
+
|
| 2319 |
+
* Pass the startChar and endChar to the MIDI animate callback.
|
| 2320 |
+
|
| 2321 |
+
# Version 3.3.2
|
| 2322 |
+
|
| 2323 |
+
## Bug fixes:
|
| 2324 |
+
|
| 2325 |
+
* Fix the tuneNumber in the listener callback.
|
| 2326 |
+
|
| 2327 |
+
* Fix the listener callback with separate SVG for each line.
|
| 2328 |
+
|
| 2329 |
+
* Preload all the instruments needed; don't assume the default "piano".
|
| 2330 |
+
|
| 2331 |
+
* Allow calling startPlaying() with the target being the parent control.
|
| 2332 |
+
|
| 2333 |
+
* Expose the startPlaying and stopPlaying methods.
|
| 2334 |
+
|
| 2335 |
+
* Change the midi git line to use https.
|
| 2336 |
+
|
| 2337 |
+
* When unpausing the MIDI, immediately redraw the MIDI.
|
| 2338 |
+
|
| 2339 |
+
* If a tempo is described as a string, don't let it be undefined in the MIDI tempo control.
|
| 2340 |
+
|
| 2341 |
+
* Protect against writing "undefined" in class names.
|
| 2342 |
+
|
| 2343 |
+
* Add setSoundFont() entry point.
|
| 2344 |
+
|
| 2345 |
+
* Validate the startingTune parameter.
|
| 2346 |
+
|
| 2347 |
+
* Add protection in case animation pause is called at an unexpected time.
|
| 2348 |
+
|
| 2349 |
+
* Fix midi formatting issues caused by box-sizing change.
|
| 2350 |
+
|
| 2351 |
+
## Features:
|
| 2352 |
+
|
| 2353 |
+
* Translate some common tempo strings to BPM.
|
| 2354 |
+
|
| 2355 |
+
* Do basic accessibility for SVG.
|
| 2356 |
+
|
| 2357 |
+
* Add pitch and duration to the classes that notes are tagged with.
|
| 2358 |
+
|
| 2359 |
+
* Add note number in a measure to the classes that notes are tagged with.
|
| 2360 |
+
|
| 2361 |
+
* Add the element's classes to the listener callback.
|
| 2362 |
+
|
| 2363 |
+
# Version 3.3.1
|
| 2364 |
+
|
| 2365 |
+
## Bug fixes:
|
| 2366 |
+
|
| 2367 |
+
* Modify main index.js to avoid using ES6 (is not transpiling, and some testing platforms can fail)
|
| 2368 |
+
|
| 2369 |
+
* Expose the soundfontUrl variable.
|
| 2370 |
+
|
| 2371 |
+
# Version 3.3.0
|
| 2372 |
+
|
| 2373 |
+
## Bug fixes:
|
| 2374 |
+
|
| 2375 |
+
* Only put the first/second ending marker on the top staff of a system.
|
| 2376 |
+
|
| 2377 |
+
* Fix crash when voice is incomplete.
|
| 2378 |
+
|
| 2379 |
+
* Fix position of the clock on the midi controls; make midi controls aware of box-sizing.
|
| 2380 |
+
|
| 2381 |
+
* Only play chords once if there is more than one staff.
|
| 2382 |
+
|
| 2383 |
+
* Fix JS math rounding error when figuring out the timing of the notes for MIDI animation.
|
| 2384 |
+
|
| 2385 |
+
* Add tied notes to the objects that will get returned during MIDI animation.
|
| 2386 |
+
|
| 2387 |
+
* Don't let the MIDI duration be a negative number on really short notes.
|
| 2388 |
+
|
| 2389 |
+
* Sequence the repeats correctly when doing MIDI animation.
|
| 2390 |
+
|
| 2391 |
+
* Don't put MIDI.js in debug mode.
|
| 2392 |
+
|
| 2393 |
+
* Remove dependency on midi for the editor version
|
| 2394 |
+
|
| 2395 |
+
* Fix declaration of "galactic".
|
| 2396 |
+
|
| 2397 |
+
* Add polyfill for Object.remove() for IE
|
| 2398 |
+
|
| 2399 |
+
* Fix creating downloadable midi
|
| 2400 |
+
|
| 2401 |
+
* Fix bug where there couldn't be two different note heads on a stem.
|
| 2402 |
+
|
| 2403 |
+
* When splitting a line with barsperline, propagate certain control items on the next line.
|
| 2404 |
+
|
| 2405 |
+
* Fix some midi control visual conflicts with box-sizing.
|
| 2406 |
+
|
| 2407 |
+
* Fix the playback tempo for non-4/4 meters.
|
| 2408 |
+
|
| 2409 |
+
* Support a couple more rhythm patterns with generated chords; fix a couple errors in generated chords.
|
| 2410 |
+
|
| 2411 |
+
* Fix problem with ending a beam when a chord is the last element.
|
| 2412 |
+
|
| 2413 |
+
## Features:
|
| 2414 |
+
|
| 2415 |
+
* Add support for "instrument" in midi playback; restrict usage of channel to be one per track.
|
| 2416 |
+
|
| 2417 |
+
* Make metronome track use the next free channel.
|
| 2418 |
+
|
| 2419 |
+
* Pick a free channel for the chords.
|
| 2420 |
+
|
| 2421 |
+
* Add "context" as a parameter to the MIDI controls so that multiple MIDI on a page can be kept separate.
|
| 2422 |
+
|
| 2423 |
+
* Set the default soundfont location to the CDN.
|
| 2424 |
+
|
| 2425 |
+
* Add a signature/version to the exports so that the client can detect it.
|
| 2426 |
+
|
| 2427 |
+
* Add the midi listener for the editor.
|
| 2428 |
+
|
| 2429 |
+
## Infrastructure:
|
| 2430 |
+
|
| 2431 |
+
* Moved source code into a subfolder.
|
| 2432 |
+
|
| 2433 |
+
* Moved examples into a subfolder.
|
| 2434 |
+
|
| 2435 |
+
* Moved font generation into a subfolder.
|
| 2436 |
+
|
| 2437 |
+
* Moved documentation into a subfolder.
|
| 2438 |
+
|
| 2439 |
+
* Removed many no longer used build files.
|
| 2440 |
+
|
| 2441 |
+
* Remove "editor" as a separate build.
|
| 2442 |
+
|
| 2443 |
+
* Just have three maintained minimized builds: abcjs_basic, abcjs_midi, and abcjs_plugin.
|
| 2444 |
+
|
| 2445 |
+
* Create separate entry point for "test" which is only useful for those working on abcjs.
|
| 2446 |
+
|
| 2447 |
+
* Create separate npm entry points for "basic" and "midi".
|
| 2448 |
+
|
| 2449 |
+
* Switch to webpack for creating static versions of libs.
|
| 2450 |
+
|
| 2451 |
+
* Don't need a plugin version under npm - that's just for standalone.
|
| 2452 |
+
|
| 2453 |
+
* Remove dependency on midi for the standalone version.
|
| 2454 |
+
|
| 2455 |
+
* Remove unneeded public entry points.
|
| 2456 |
+
|
| 2457 |
+
* Add old minified versions that were previously missed.
|
| 2458 |
+
|
| 2459 |
+
## Documentation
|
| 2460 |
+
|
| 2461 |
+
* Clarified config of "drum" track in midi.
|
| 2462 |
+
|
| 2463 |
+
* Updated copyrights
|
| 2464 |
+
|
| 2465 |
+
* Create a "contributing" doc page.
|
| 2466 |
+
|
| 2467 |
+
* Lots of readme file clean up.
|
| 2468 |
+
|
| 2469 |
+
* Create an example that demonstrates formatting for printing.
|
| 2470 |
+
|
| 2471 |
+
# Version 3.2.1
|
| 2472 |
+
|
| 2473 |
+
## Bug fixes:
|
| 2474 |
+
* Don't crash if window.performance is not defined.
|
| 2475 |
+
* Don't move the position of the rest unless there are more than one voice on a staff.
|
| 2476 |
+
|
| 2477 |
+
# Version 3.2.0
|
| 2478 |
+
|
| 2479 |
+
## Features:
|
| 2480 |
+
* Implement overlay from the ABC standard.
|
| 2481 |
+
|
| 2482 |
+
## Bug fixes:
|
| 2483 |
+
* Update the license notice in the source code to match the MIT notice.
|
| 2484 |
+
* Fix some npm dependencies.
|
| 2485 |
+
* When clicking on MIDI control, have the buttons be non-submitting.
|
| 2486 |
+
* Fixed missing pauseAnimation function.
|
| 2487 |
+
* Fix the height of the SVG when doing the responsive=resize option.
|
| 2488 |
+
* Measure number classes should not be placed on the staff lines or the brace.
|
| 2489 |
+
* When animating midi, make qpm parameter optional.
|
| 2490 |
+
* When animating an editor-type engraving, don't pass in the tune object: the editor already has it.
|
| 2491 |
+
|
| 2492 |
+
# Version 3.1.4
|
| 2493 |
+
|
| 2494 |
+
## Feature:
|
| 2495 |
+
* Added new parameter "responsive=resize" to do responsive SVG.
|
| 2496 |
+
|
| 2497 |
+
# Version 3.1.3
|
| 2498 |
+
|
| 2499 |
+
## Features:
|
| 2500 |
+
* Rearrange the code so that an npm module is created.
|
| 2501 |
+
* Provide access to warning messages as objects.
|
| 2502 |
+
|
| 2503 |
+
## Bug fixes:
|
| 2504 |
+
* Fix crash in generating midi when the meter isn't expressly defined.
|
| 2505 |
+
* Don't throw an error if the midi control has been removed from the DOM by the time the midi stops playing.
|
| 2506 |
+
* Don't require Raphael to be visible to a client creating an EngraverController.
|
| 2507 |
+
* Fix problem with title not showing when using the plugin.
|
| 2508 |
+
|
| 2509 |
+
# Version 3.1.2
|
| 2510 |
+
|
| 2511 |
+
## Bug fixes:
|
| 2512 |
+
* L: 1 (whole note) should be accepted as note length
|
| 2513 |
+
* Do not change the default note length when meter is change inline
|
| 2514 |
+
* If no meter is specified, free meter is assumed
|
| 2515 |
+
* If a default note length is set by a meter, it shouldn't be changed another inline meter
|
| 2516 |
+
* Fix crash on inline V:
|
| 2517 |
+
* Fix overlapping of low annotations.
|
| 2518 |
+
* Fix spacing after voice label.
|
| 2519 |
+
* Make ties a little more rounded.
|
| 2520 |
+
* Some minor adjustment to drawing ties.
|
| 2521 |
+
|
| 2522 |
+
## Features:
|
| 2523 |
+
* Add an option to hide the current measure on animation.
|
| 2524 |
+
|
| 2525 |
+
# Version 3.1.1
|
| 2526 |
+
|
| 2527 |
+
## Bug fixes:
|
| 2528 |
+
|
| 2529 |
+
* Change slur direction if there is a tie on the first or last note.
|
| 2530 |
+
* Adjust placement of slash on a note stem; make sure the stem is long enough.
|
| 2531 |
+
* Work on placement of triplets.
|
| 2532 |
+
* Make tie shallower than slur.
|
| 2533 |
+
|
| 2534 |
+
# Version 3.1.0
|
| 2535 |
+
|
| 2536 |
+
## Bug fixes:
|
| 2537 |
+
* Fix midi beat length; some improvements to the midi animation.
|
| 2538 |
+
* Write ledger lines for grace notes.
|
| 2539 |
+
* Fix crash in parsing.
|
| 2540 |
+
* qpm was being passed in twice for midi animation.
|
| 2541 |
+
* When doing the call back in the midi animation, pass the absolute coordinates of the item that is current.
|
| 2542 |
+
* Handle case where there is an intro drum beat, but it ends at the first note.
|
| 2543 |
+
* Handle common and cut time when doing midi drum beats.
|
| 2544 |
+
* Fix midi transposition.
|
| 2545 |
+
* Fix bug in midi animation when starting and stopping the midi.
|
| 2546 |
+
* Fix bug in finding the written notes when animating the midi output.
|
| 2547 |
+
* Handle creating midi for grace note that appears at the beginning of a part that is not the first part.
|
| 2548 |
+
* Fix bug introduced in creating midi for gracenote.
|
| 2549 |
+
* Fix when the metronome track starts, and fix the tempo of it when the meter is not 4/4
|
| 2550 |
+
* Allow passed in tempo to override the defined tempo.
|
| 2551 |
+
* Fix crash when creating midi for multipart music where the first note has a grace.
|
| 2552 |
+
* Make midi control's css more stable when combined with other css.
|
| 2553 |
+
* Fix bug in displaying note values in tempo field.
|
| 2554 |
+
* Fix crash when there are bar numbers on multi-line music.
|
| 2555 |
+
|
| 2556 |
+
## Features:
|
| 2557 |
+
* Add "pause/resume" to the standard animation.
|
| 2558 |
+
* Report when there is a new beat in the midi listener.
|
| 2559 |
+
* Added drum intro to the MIDI, using a new midiParameter.
|
| 2560 |
+
* Add midi option "voicesOff" to mute the midi output, while leaving the metronome, guitar chords, and the animation.
|
| 2561 |
+
* Implement animation callback when playing MIDI.
|
| 2562 |
+
* Completely change the parsing of %%MIDI parameters; support the "%%MIDI drum" parameters; allow setting midi instrument and channel.
|
| 2563 |
+
* Allow three digit version numbers.
|
| 2564 |
+
|
| 2565 |
+
## Warning:
|
| 2566 |
+
* Turn off instrument/channel selection in midi until it is debugged.
|
| 2567 |
+
|
| 2568 |
+
# Version 3.0
|
| 2569 |
+
|
| 2570 |
+
## Bug fixes:
|
| 2571 |
+
* Fix crash when encountering Cbm or other theoretical-only keys.
|
| 2572 |
+
* Fix crash when there is no start or end point for a dynamic mark.
|
| 2573 |
+
* Don't crash in Firefox if text is written to an element that is not currently visible (Raphael reports NaN for the size.)
|
| 2574 |
+
* Don't crash if the music was removed before animation is done.
|
| 2575 |
+
* Fix centering text using %%center.
|
| 2576 |
+
* Allow blank %%text lines.
|
| 2577 |
+
* Misspelled botmargin.
|
| 2578 |
+
* Fix bugs in measure numbering: put number over the bar line.
|
| 2579 |
+
* Fix placement and style of the measure numbers.
|
| 2580 |
+
* Fix crash when there is a key change after a subtitle line in the header.
|
| 2581 |
+
* Make the + sign of the meter not lay right on the staff line.
|
| 2582 |
+
* Fix note length bugs in the tempo marker.
|
| 2583 |
+
|
| 2584 |
+
## Features:
|
| 2585 |
+
* Added viewPortHorizontal and scrollHorizontal to the renderParams.
|
| 2586 |
+
* Add class "slur" to slurs and ties.
|
| 2587 |
+
* Add "hint measure"
|
| 2588 |
+
* Allow scrolling in the animation.
|
| 2589 |
+
* Handle %%titlecaps directive.
|
| 2590 |
+
* Add curly brace to indicate piano part (with inspiration from Anthony P. Pancerella).
|
| 2591 |
+
* Add invisible marker to the top of each system so that it can be found easily.
|
| 2592 |
+
* Add an option to put each line in a separate svg so that browsers will paginate correctly.
|
| 2593 |
+
|
| 2594 |
+
## MIDI:
|
| 2595 |
+
* First pass at using a new inline MIDI generator.
|
| 2596 |
+
* Make the default MIDI instrument "0" instead of "2"
|
| 2597 |
+
* Implement some MIDI controls: play, pause, reset, tempo, progress bar, BPM, clock, pre- and post-text
|
| 2598 |
+
|
| 2599 |
+
# Version 3.0 Beta
|
| 2600 |
+
|
| 2601 |
+
## MIDI:
|
| 2602 |
+
|
| 2603 |
+
* Update documentation for using MIDI.
|
| 2604 |
+
|
| 2605 |
+
* Update creating a release to package the MIDI.
|
| 2606 |
+
|
| 2607 |
+
* Integrate midi.js and remove the old MIDI attempts.
|
| 2608 |
+
|
| 2609 |
+
* Create MIDI output for both download and playing through midi.js.
|
| 2610 |
+
|
| 2611 |
+
* Create the html for an interactive audio control and implement standard functionality.
|
| 2612 |
+
|
| 2613 |
+
* Make the default midi instrument "0" instead of "2"
|
| 2614 |
+
|
| 2615 |
+
* Don't crash if a chord containing a slash doesn't contain a bass note.
|
| 2616 |
+
|
| 2617 |
+
* Fix playing second repeat; allow strings as parameters.
|
| 2618 |
+
|
| 2619 |
+
## Bug fixes:
|
| 2620 |
+
|
| 2621 |
+
* Fix crash when encountering Cbm or other theoretical-only keys.
|
| 2622 |
+
|
| 2623 |
+
* Report the tune number on clicking the absolute element
|
| 2624 |
+
|
| 2625 |
+
* Fix crash when there is no start or end point for a dynamic mark.
|
| 2626 |
+
|
| 2627 |
+
* Clarify how to use the animation() functionality.
|
| 2628 |
+
|
| 2629 |
+
* Added viewPortHorizontal and scrollHorizontal to the renderParams
|
| 2630 |
+
|
| 2631 |
+
# Version 2.3
|
| 2632 |
+
|
| 2633 |
+
* Completely refactor the midi processing: now supports chords and grace notes and embeds the tune's title.
|
| 2634 |
+
|
| 2635 |
+
* Remove the automatic generation of the QuickTime element.
|
| 2636 |
+
|
| 2637 |
+
* Fix crash when a triplet with a 0 duration is created. That is: (3B0BB
|
| 2638 |
+
|
| 2639 |
+
* Fix having a spacer 'y' between two notes that are tied.
|
| 2640 |
+
|
| 2641 |
+
* Fix starting first line with [P:A]
|
| 2642 |
+
|
| 2643 |
+
# Version 2.2
|
| 2644 |
+
|
| 2645 |
+
* Fix drawing of tempo indicator.
|
| 2646 |
+
|
| 2647 |
+
* Add voice number to the css classes.
|
| 2648 |
+
|
| 2649 |
+
# Version 2.1
|
| 2650 |
+
|
| 2651 |
+
* Fix startChar for chords.
|
| 2652 |
+
|
| 2653 |
+
* Fix placement of left annotation, that is: "< text"
|
| 2654 |
+
|
| 2655 |
+
* Updated compressor version (note: 2.4.8 has a bug and doesn't work, so using 2.4.7)
|
| 2656 |
+
|
| 2657 |
+
* Some improvements to decoration placement.
|
| 2658 |
+
|
| 2659 |
+
* Fix triplet not lining up properly in multiple voices bug.
|
| 2660 |
+
|
| 2661 |
+
* Fix note lengths when chords and broken rhythms interact.
|
| 2662 |
+
|
| 2663 |
+
* If a font appears in the header, then it becomes the default font.
|
| 2664 |
+
|
| 2665 |
+
* Add some debugging capability to the plugin. 4313963
|
| 2666 |
+
|
| 2667 |
+
* Implement gchordfont; make the extra spacing respect the font height.
|
| 2668 |
+
|
| 2669 |
+
* Upgrade bundled version of jQuery to 1.11.3.
|
| 2670 |
+
|
| 2671 |
+
# Version 2.0
|
| 2672 |
+
|
| 2673 |
+
* Many bug fixes.
|
| 2674 |
+
|
| 2675 |
+
* Much work on vertical spacing of elements.
|
| 2676 |
+
|
| 2677 |
+
* Much refactoring of the codebase to make future maintenance easier.
|
| 2678 |
+
|
| 2679 |
+
* Beginning support of "print" mode, that lays out music in a way suitable for creating printable PDFs.
|
| 2680 |
+
|
| 2681 |
+
* Fixed animation jumping around when there is a whole rest or after a bar line.
|
| 2682 |
+
|
| 2683 |
+
* Fixed slurs not behaving across lines.
|
| 2684 |
+
|
| 2685 |
+
* Improved the handling of generating glyphs.
|
| 2686 |
+
|
| 2687 |
+
* Added support for setting a number of fonts.
|
| 2688 |
+
|
| 2689 |
+
* Added support for positioning of lyrics, dynamics, volume marks, ornaments, and guitar chords.
|
| 2690 |
+
|
| 2691 |
+
* Fixed grace note note lengths.
|
| 2692 |
+
|
| 2693 |
+
* Added a set of regression data for the engraver.
|
| 2694 |
+
|
| 2695 |
+
* Added note head choices for slash notation, harmonics, and indeterminate pitch.
|
| 2696 |
+
|
| 2697 |
+
* Fix vertical positioning of many elements.
|
| 2698 |
+
|
| 2699 |
+
* Fixed positioning of ties.
|
| 2700 |
+
|
| 2701 |
+
* Fixed beam height.
|
| 2702 |
+
|
| 2703 |
+
* Set padding for "print" version.
|
| 2704 |
+
|
| 2705 |
+
* Support of many formatting options.
|
| 2706 |
+
|
| 2707 |
+
* Expanded click target so that users can easily select note.
|
| 2708 |
+
|
| 2709 |
+
# Version 1.12
|
| 2710 |
+
|
| 2711 |
+
* Improved documentation.
|
| 2712 |
+
|
| 2713 |
+
* Accept `%%abc-*` meta commands.
|
| 2714 |
+
|
| 2715 |
+
# Version 1.11
|
| 2716 |
+
|
| 2717 |
+
## Features
|
| 2718 |
+
|
| 2719 |
+
* Added new entry points: ABCJS.startAnimation() and ABCJS.stopAnimation(), which allow for a bouncing ball-type cursor.
|
| 2720 |
+
|
| 2721 |
+
* Added getBeatLength() to the returned tune to get the length of a beat in measures.
|
| 2722 |
+
|
| 2723 |
+
* Return the tune object from renderABC() so it can be manipulated further by the caller.
|
| 2724 |
+
|
| 2725 |
+
* Put a copy of the engraver with the outputted tune, so that it can be manipulated later.
|
| 2726 |
+
|
| 2727 |
+
* Made highlighting notes more flexible: both the class name for the highlight and the note-head color can be specified or not used.
|
| 2728 |
+
|
| 2729 |
+
* Added descriptive classes to all SVG elements, including element type, line number, and measure number.
|
| 2730 |
+
|
| 2731 |
+
Bugs
|
| 2732 |
+
---
|
| 2733 |
+
|
| 2734 |
+
* Fixed positioning of the highlighted characters in the editor when a line begins with a space.
|
| 2735 |
+
|
| 2736 |
+
* Fix the duration of whole rests to always be the length of a measure.
|
| 2737 |
+
|
| 2738 |
+
* Fixed bug in "unpausing" the editor's connection with the rendering.
|
| 2739 |
+
|
| 2740 |
+
* Move chord names above everything else on the line.
|
| 2741 |
+
|
| 2742 |
+
* Made more room for decorations, so they don't overlap.
|
| 2743 |
+
|
| 2744 |
+
* Center whole rests in the measure.
|
| 2745 |
+
|
| 2746 |
+
* Put accent on opposite side of the note stem.
|
| 2747 |
+
|
| 2748 |
+
Refactoring
|
| 2749 |
+
---
|
| 2750 |
+
|
| 2751 |
+
* Moved Raphael out of the "write" folder; updated jQuery version.
|
| 2752 |
+
|
| 2753 |
+
* Split graphelements file into many different files.
|
| 2754 |
+
|
| 2755 |
+
* Changed the internal name of "printer" to "engraver" as a first step in refactoring.
|
| 2756 |
+
|
| 2757 |
+
* Updated the minify script to find all js files.
|
| 2758 |
+
|
| 2759 |
+
* Updated the minify script to change the version number in the readme automatically.
|
| 2760 |
+
|
| 2761 |
+
* Updated the minify script to support "a" and "b" in the version name for alpha and beta versions.
|
| 2762 |
+
|
| 2763 |
+
Examples
|
| 2764 |
+
---
|
| 2765 |
+
|
| 2766 |
+
* Created versions of the minimized files with a name that includes "_latest", for easy reference.
|
| 2767 |
+
|
| 2768 |
+
* Updated the example files to always use the latest version.
|
| 2769 |
+
|
| 2770 |
+
* Fixed font displaying html file to note have the elements write on top of each other.
|
SECURITY.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Security Policy
|
| 2 |
+
|
| 3 |
+
## Supported Versions
|
| 4 |
+
|
| 5 |
+
Only the latest version will get security updates. Please stay updated if possible.
|
| 6 |
+
|
| 7 |
+
## Reporting a Vulnerability
|
| 8 |
+
|
| 9 |
+
Contact Paul Rosen directly if you detect a security problem. The most reliable way is to through the contact form on https://abcjs.net.
|
abcjs-audio.css
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Some basic CSS to make the Audio controls in abcjs presentable. */
|
| 2 |
+
|
| 3 |
+
.abcjs-inline-audio {
|
| 4 |
+
height: 26px;
|
| 5 |
+
padding: 0 5px;
|
| 6 |
+
border-radius: 3px;
|
| 7 |
+
background-color: #424242;
|
| 8 |
+
display: flex;
|
| 9 |
+
align-items: center;
|
| 10 |
+
box-sizing: border-box;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
.abcjs-inline-audio.abcjs-disabled {
|
| 14 |
+
opacity: 0.5;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.abcjs-inline-audio .abcjs-btn {
|
| 18 |
+
display: block;
|
| 19 |
+
width: 28px;
|
| 20 |
+
height: 34px;
|
| 21 |
+
margin-right: 2px;
|
| 22 |
+
padding: 7px 4px;
|
| 23 |
+
|
| 24 |
+
background: none !important;
|
| 25 |
+
border: 1px solid transparent;
|
| 26 |
+
box-sizing: border-box;
|
| 27 |
+
line-height: 1;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.abcjs-btn g {
|
| 31 |
+
fill: #f4f4f4;
|
| 32 |
+
stroke: #f4f4f4;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.abcjs-inline-audio .abcjs-btn:hover g {
|
| 36 |
+
fill: #cccccc;
|
| 37 |
+
stroke: #cccccc;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.abcjs-inline-audio .abcjs-midi-selection.abcjs-pushed {
|
| 41 |
+
border: 1px solid #cccccc;
|
| 42 |
+
background-color: #666666;
|
| 43 |
+
box-sizing: border-box;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed {
|
| 47 |
+
border: 1px solid #cccccc;
|
| 48 |
+
background-color: #666666;
|
| 49 |
+
box-sizing: border-box;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.abcjs-inline-audio .abcjs-midi-reset.abcjs-pushed {
|
| 53 |
+
border: 1px solid #cccccc;
|
| 54 |
+
background-color: #666666;
|
| 55 |
+
box-sizing: border-box;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.abcjs-inline-audio .abcjs-midi-start .abcjs-pause-svg {
|
| 59 |
+
display: none;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.abcjs-inline-audio .abcjs-midi-start .abcjs-loading-svg {
|
| 63 |
+
display: none;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-play-svg {
|
| 67 |
+
display: none;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.abcjs-inline-audio .abcjs-midi-start.abcjs-loading .abcjs-play-svg {
|
| 71 |
+
display: none;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-pause-svg {
|
| 75 |
+
display: block;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.abcjs-inline-audio .abcjs-midi-progress-background {
|
| 79 |
+
background-color: #424242;
|
| 80 |
+
height: 10px;
|
| 81 |
+
border-radius: 5px;
|
| 82 |
+
border: 2px solid #cccccc;
|
| 83 |
+
margin: 0 8px 0 15px;
|
| 84 |
+
position: relative;
|
| 85 |
+
flex: 1;
|
| 86 |
+
padding: 0;
|
| 87 |
+
box-sizing: border-box;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.abcjs-inline-audio .abcjs-midi-progress-indicator {
|
| 91 |
+
width: 20px;
|
| 92 |
+
margin-left: -10px; /* half of the width */
|
| 93 |
+
height: 14px;
|
| 94 |
+
background-color: #f4f4f4;
|
| 95 |
+
position: absolute;
|
| 96 |
+
display: inline-block;
|
| 97 |
+
border-radius: 6px;
|
| 98 |
+
top: -4px;
|
| 99 |
+
left: 0;
|
| 100 |
+
box-sizing: border-box;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.abcjs-inline-audio .abcjs-midi-clock {
|
| 104 |
+
margin-left: 4px;
|
| 105 |
+
margin-top: 1px;
|
| 106 |
+
margin-right: 2px;
|
| 107 |
+
display: inline-block;
|
| 108 |
+
font-family: sans-serif;
|
| 109 |
+
font-size: 16px;
|
| 110 |
+
box-sizing: border-box;
|
| 111 |
+
color: #f4f4f4;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.abcjs-inline-audio .abcjs-tempo-wrapper {
|
| 115 |
+
font-size: 10px;
|
| 116 |
+
color: #f4f4f4;
|
| 117 |
+
box-sizing: border-box;
|
| 118 |
+
display: flex;
|
| 119 |
+
align-items: center;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.abcjs-inline-audio .abcjs-midi-tempo {
|
| 123 |
+
border-radius: 2px;
|
| 124 |
+
border: none;
|
| 125 |
+
margin: 0 2px 0 4px;
|
| 126 |
+
width: 42px;
|
| 127 |
+
padding-left: 2px;
|
| 128 |
+
box-sizing: border-box;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.abcjs-inline-audio .abcjs-loading .abcjs-loading-svg {
|
| 132 |
+
display: inherit;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.abcjs-inline-audio .abcjs-loading {
|
| 136 |
+
outline: none;
|
| 137 |
+
animation-name: abcjs-spin;
|
| 138 |
+
animation-duration: 1s;
|
| 139 |
+
animation-iteration-count: infinite;
|
| 140 |
+
animation-timing-function: linear;
|
| 141 |
+
|
| 142 |
+
}
|
| 143 |
+
.abcjs-inline-audio .abcjs-loading-svg circle {
|
| 144 |
+
stroke: #f4f4f4;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
@keyframes abcjs-spin {
|
| 148 |
+
from {transform:rotate(0deg);}
|
| 149 |
+
to {transform:rotate(360deg);}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/* Adding the class "abcjs-large" will make the control easier on a touch device. */
|
| 153 |
+
.abcjs-large .abcjs-inline-audio {
|
| 154 |
+
height: 52px;
|
| 155 |
+
}
|
| 156 |
+
.abcjs-large .abcjs-btn {
|
| 157 |
+
width: 56px;
|
| 158 |
+
height: 52px;
|
| 159 |
+
font-size: 28px;
|
| 160 |
+
padding: 6px 8px;
|
| 161 |
+
}
|
| 162 |
+
.abcjs-large .abcjs-midi-progress-background {
|
| 163 |
+
height: 20px;
|
| 164 |
+
border: 4px solid #cccccc;
|
| 165 |
+
}
|
| 166 |
+
.abcjs-large .abcjs-midi-progress-indicator {
|
| 167 |
+
height: 28px;
|
| 168 |
+
top: -8px;
|
| 169 |
+
width: 40px;
|
| 170 |
+
}
|
| 171 |
+
.abcjs-large .abcjs-midi-clock {
|
| 172 |
+
font-size: 32px;
|
| 173 |
+
margin-right: 10px;
|
| 174 |
+
margin-left: 10px;
|
| 175 |
+
margin-top: -1px;
|
| 176 |
+
}
|
| 177 |
+
.abcjs-large .abcjs-midi-tempo {
|
| 178 |
+
font-size: 20px;
|
| 179 |
+
width: 50px;
|
| 180 |
+
}
|
| 181 |
+
.abcjs-large .abcjs-tempo-wrapper {
|
| 182 |
+
font-size: 20px;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.abcjs-css-warning {
|
| 186 |
+
display: none;
|
| 187 |
+
}
|
deploy-docs.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Get the examples somewhere they can be served
|
| 2 |
+
cp -r examples docs/.vuepress/dist/examples
|
| 3 |
+
cp -r dist docs/.vuepress/dist/dist
|
| 4 |
+
cp abcjs-audio.css docs/.vuepress/dist
|
| 5 |
+
|
| 6 |
+
# navigate into the build output directory
|
| 7 |
+
cd docs/.vuepress/dist
|
| 8 |
+
|
| 9 |
+
git init
|
| 10 |
+
git add -A
|
| 11 |
+
git commit -m 'deploy'
|
| 12 |
+
|
| 13 |
+
# if you are deploying to https://<USERNAME>.github.io
|
| 14 |
+
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
|
| 15 |
+
|
| 16 |
+
# if you are deploying to https://<USERNAME>.github.io/<REPO>
|
| 17 |
+
git push -f git@github.com:paulrosen/abcjs.git master:gh-pages
|
| 18 |
+
|
| 19 |
+
cd -
|
dist/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!.gitignore
|
dist/abcjs-basic-min.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dist/abcjs-basic-min.js.LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke
|
| 3 |
+
|
| 4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 5 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 6 |
+
in the Software without restriction, including without limitation the rights
|
| 7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 8 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 9 |
+
furnished to do so, subject to the following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice shall be included in
|
| 12 |
+
all copies or substantial portions of the Software.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 20 |
+
THE SOFTWARE.
|
| 21 |
+
|
| 22 |
+
**This text is from: http://opensource.org/licenses/MIT**
|
| 23 |
+
!**/
|
dist/abcjs-basic.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dist/abcjs-basic.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dist/abcjs-plugin-min.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dist/abcjs-plugin-min.js.LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke
|
| 3 |
+
|
| 4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 5 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 6 |
+
in the Software without restriction, including without limitation the rights
|
| 7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 8 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 9 |
+
furnished to do so, subject to the following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice shall be included in
|
| 12 |
+
all copies or substantial portions of the Software.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 20 |
+
THE SOFTWARE.
|
| 21 |
+
|
| 22 |
+
**This text is from: http://opensource.org/licenses/MIT**
|
| 23 |
+
!**/
|
docker-build.sh
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
docker compose build
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
app:
|
| 3 |
+
image: abcjs
|
| 4 |
+
build: .
|
| 5 |
+
container_name: abcjs
|
| 6 |
+
volumes:
|
| 7 |
+
- .:/srv/app
|
| 8 |
+
- ./node_modules:/srv/app/node_modules
|
| 9 |
+
ports:
|
| 10 |
+
- $abcjs_docs:8080
|
docker-start.sh
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
docker compose run --publish $abcjs_docs:8080 --rm --name=abcjs app bash
|
docs/.vuepress/client.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createStore } from 'vuex'
|
| 2 |
+
import { store } from "./store";
|
| 3 |
+
import { registerComponents } from './components'
|
| 4 |
+
import { defineClientConfig } from '@vuepress/client'
|
| 5 |
+
|
| 6 |
+
export default defineClientConfig({
|
| 7 |
+
enhance({ app }) {
|
| 8 |
+
const vuexStore = createStore(store)
|
| 9 |
+
app.use(vuexStore)
|
| 10 |
+
registerComponents(app)
|
| 11 |
+
}
|
| 12 |
+
})
|
docs/.vuepress/components.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import abcjsEditor from './components/AbcjsEditor.vue'
|
| 2 |
+
import checkBox from './components/CheckBox.vue'
|
| 3 |
+
import exampleTuneBook from './components/ExampleTuneBook.vue'
|
| 4 |
+
import fieldSet from './components/FieldSet.vue'
|
| 5 |
+
import foundClasses from './components/FoundClasses.vue'
|
| 6 |
+
import numTunes from './components/NumTunes.vue'
|
| 7 |
+
import radioGroup from './components/RadioGroup.vue'
|
| 8 |
+
import renderAbc from './components/RenderAbc.vue'
|
| 9 |
+
import renderAudio from './components/RenderAudio.vue'
|
| 10 |
+
import sandboxCode from './components/SandboxCode.vue'
|
| 11 |
+
import sandboxContainer from './components/SandboxContainer.vue'
|
| 12 |
+
import sandboxInput from './components/SandboxInput.vue'
|
| 13 |
+
import sandboxOutput from './components/SandboxOutput.vue'
|
| 14 |
+
import showAndRenderAbc from './components/ShowAndRenderAbc.vue'
|
| 15 |
+
import timingCallbacks from './components/TimingCallbacks.vue'
|
| 16 |
+
import tuneBookInfo from './components/TuneBookInfo.vue'
|
| 17 |
+
|
| 18 |
+
const registerComponents = (app) => {
|
| 19 |
+
app.component('abcjsEditor', abcjsEditor)
|
| 20 |
+
app.component('checkBox', checkBox)
|
| 21 |
+
app.component('exampleTuneBook', exampleTuneBook)
|
| 22 |
+
app.component('fieldSet', fieldSet)
|
| 23 |
+
app.component('foundClasses', foundClasses)
|
| 24 |
+
app.component('numTunes', numTunes)
|
| 25 |
+
app.component('radioGroup', radioGroup)
|
| 26 |
+
app.component('renderAbc', renderAbc)
|
| 27 |
+
app.component('renderAudio', renderAudio)
|
| 28 |
+
app.component('sandboxCode', sandboxCode)
|
| 29 |
+
app.component('sandboxContainer', sandboxContainer)
|
| 30 |
+
app.component('sandboxInput', sandboxInput)
|
| 31 |
+
app.component('sandboxOutput', sandboxOutput)
|
| 32 |
+
app.component('showAndRenderAbc', showAndRenderAbc)
|
| 33 |
+
app.component('timingCallbacks', timingCallbacks)
|
| 34 |
+
app.component('tuneBookInfo', tuneBookInfo)
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
export { registerComponents }
|
docs/.vuepress/components/AbcjsEditor.vue
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="abcjs-editor">
|
| 3 |
+
<textarea ref="textarea" id="abc"></textarea>
|
| 4 |
+
<div id="warnings"></div>
|
| 5 |
+
<div id="paper"></div>
|
| 6 |
+
</div>
|
| 7 |
+
</template>
|
| 8 |
+
|
| 9 |
+
<script>
|
| 10 |
+
import { waitForAbcjs } from '../wait-for-abcjs';
|
| 11 |
+
|
| 12 |
+
export default {
|
| 13 |
+
name: "abcjs-editor",
|
| 14 |
+
watch: {
|
| 15 |
+
callbacks() {
|
| 16 |
+
this.onchange();
|
| 17 |
+
},
|
| 18 |
+
abc() {
|
| 19 |
+
this.$refs.textarea.value = this.abc;
|
| 20 |
+
const abc_editor = new abcjs.Editor("abc", {
|
| 21 |
+
canvas_id: "paper",
|
| 22 |
+
warnings_id: "warnings",
|
| 23 |
+
onchange: this.onchange,
|
| 24 |
+
abcjsParams: { add_classes: true, responsive: "resize" },
|
| 25 |
+
indicate_changed: true,
|
| 26 |
+
});
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
props: {
|
| 30 |
+
abc: {
|
| 31 |
+
type: String,
|
| 32 |
+
required: true
|
| 33 |
+
},
|
| 34 |
+
callbacks: {
|
| 35 |
+
type: Array,
|
| 36 |
+
required: false
|
| 37 |
+
},
|
| 38 |
+
},
|
| 39 |
+
async mounted() {
|
| 40 |
+
await waitForAbcjs()
|
| 41 |
+
this.$refs.textarea.value = this.abc;
|
| 42 |
+
const abc_editor = new abcjs.Editor("abc", {
|
| 43 |
+
canvas_id: "paper",
|
| 44 |
+
warnings_id: "warnings",
|
| 45 |
+
onchange: this.onchange,
|
| 46 |
+
abcjsParams: { add_classes: true, responsive: "resize" },
|
| 47 |
+
indicate_changed: true,
|
| 48 |
+
});
|
| 49 |
+
},
|
| 50 |
+
methods: {
|
| 51 |
+
onchange() {
|
| 52 |
+
if (this.callbacks) {
|
| 53 |
+
this.callbacks.forEach(fn => {
|
| 54 |
+
if (fn.redraw)
|
| 55 |
+
fn.redraw(this.$refs.textarea.value);
|
| 56 |
+
})
|
| 57 |
+
}
|
| 58 |
+
},
|
| 59 |
+
},
|
| 60 |
+
}
|
| 61 |
+
</script>
|
| 62 |
+
|
| 63 |
+
<style>
|
| 64 |
+
#warnings {
|
| 65 |
+
color: red;
|
| 66 |
+
}
|
| 67 |
+
</style>
|
docs/.vuepress/components/CheckBox.vue
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="check-box">
|
| 3 |
+
<label :class="labelClass">
|
| 4 |
+
<span class="checkbox__input">
|
| 5 |
+
<input type="checkbox" :disabled="disabled" v-model="item">
|
| 6 |
+
<span class="checkbox__control">
|
| 7 |
+
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden="true" focusable="false">
|
| 8 |
+
<path fill='none' stroke='#000000' stroke-width='3' d='M1.73 12.91l6.37 6.37L22.79 4.59'/>
|
| 9 |
+
</svg>
|
| 10 |
+
</span>
|
| 11 |
+
</span>
|
| 12 |
+
<span class="radio__label">{{label}}</span>
|
| 13 |
+
</label>
|
| 14 |
+
|
| 15 |
+
<div v-if="subOptions" class="sub-options">
|
| 16 |
+
<check-box v-for="option in subOptions" :label="option.text" :value="option.value" :disabled="disabled || !item || option.todo" :class="{todo: option.todo}"></check-box>
|
| 17 |
+
</div>
|
| 18 |
+
</div>
|
| 19 |
+
</template>
|
| 20 |
+
|
| 21 |
+
<script>
|
| 22 |
+
export default {
|
| 23 |
+
name: "check-box",
|
| 24 |
+
props: {
|
| 25 |
+
label: {
|
| 26 |
+
type: String,
|
| 27 |
+
required: true
|
| 28 |
+
},
|
| 29 |
+
value: {
|
| 30 |
+
type: String,
|
| 31 |
+
required: true
|
| 32 |
+
},
|
| 33 |
+
subOptions: {
|
| 34 |
+
type: Array,
|
| 35 |
+
required: false,
|
| 36 |
+
default: null
|
| 37 |
+
},
|
| 38 |
+
disabled: {
|
| 39 |
+
type: Boolean,
|
| 40 |
+
required: false,
|
| 41 |
+
default: false
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
computed: {
|
| 45 |
+
labelClass() {
|
| 46 |
+
let classes = ['checkbox'];
|
| 47 |
+
if (this.disabled)
|
| 48 |
+
classes.push("checkbox--disabled");
|
| 49 |
+
return classes.join(" ");
|
| 50 |
+
},
|
| 51 |
+
item:{
|
| 52 |
+
get(){
|
| 53 |
+
return this.$store.getters[this.value];
|
| 54 |
+
},
|
| 55 |
+
set(newValue){
|
| 56 |
+
this.$store.commit(this.value, newValue)
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
|
| 61 |
+
}
|
| 62 |
+
</script>
|
| 63 |
+
|
| 64 |
+
<style scoped>
|
| 65 |
+
.check-box {
|
| 66 |
+
margin-top: 10px;
|
| 67 |
+
}
|
| 68 |
+
.sub-options {
|
| 69 |
+
margin-left: 30px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.checkbox {
|
| 73 |
+
display: grid;
|
| 74 |
+
grid-template-columns: min-content auto;
|
| 75 |
+
grid-gap: 0.5em;
|
| 76 |
+
font-size: 1rem;
|
| 77 |
+
color: #000000;
|
| 78 |
+
}
|
| 79 |
+
.checkbox--disabled {
|
| 80 |
+
color: #959495;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.checkbox--disabled path {
|
| 84 |
+
stroke: #959495;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.checkbox--disabled .checkbox__control {
|
| 88 |
+
border: 0.1em solid #959495;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.checkbox__control {
|
| 92 |
+
display: inline-grid;
|
| 93 |
+
width: 1em;
|
| 94 |
+
height: 1em;
|
| 95 |
+
border-radius: 0.25em;
|
| 96 |
+
border: 0.1em solid #000000;
|
| 97 |
+
}
|
| 98 |
+
.checkbox__control svg {
|
| 99 |
+
transition: transform 0.1s ease-in 25ms;
|
| 100 |
+
transform: scale(0);
|
| 101 |
+
transform-origin: bottom left;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.checkbox__input {
|
| 105 |
+
display: grid;
|
| 106 |
+
grid-template-areas: "checkbox";
|
| 107 |
+
}
|
| 108 |
+
.checkbox__input > * {
|
| 109 |
+
grid-area: checkbox;
|
| 110 |
+
}
|
| 111 |
+
.checkbox__input input {
|
| 112 |
+
opacity: 0;
|
| 113 |
+
width: 1em;
|
| 114 |
+
height: 1em;
|
| 115 |
+
}
|
| 116 |
+
.checkbox__input input:focus + .checkbox__control {
|
| 117 |
+
box-shadow: 0 0 0 0.05em #fff, 0 0 0.15em 0.1em #000000;
|
| 118 |
+
}
|
| 119 |
+
.checkbox__input input:checked + .checkbox__control svg {
|
| 120 |
+
transform: scale(1);
|
| 121 |
+
}
|
| 122 |
+
.checkbox__input input:disabled + .checkbox__control {
|
| 123 |
+
color: #959495;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.todo {
|
| 127 |
+
text-decoration: line-through;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
</style>
|
docs/.vuepress/components/ExampleTuneBook.vue
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
<template>
|
| 2 |
+
<div class="example-tune-book">
|
| 3 |
+
<abcjs-editor :callbacks="callbacks" :abc="abc"></abcjs-editor>
|
| 4 |
+
</div>
|
| 5 |
+
</template>
|
| 6 |
+
|
| 7 |
+
<script>
|
| 8 |
+
import AbcjsEditor from "./AbcjsEditor.vue";
|
| 9 |
+
|
| 10 |
+
export default {
|
| 11 |
+
name: "example-tune-book",
|
| 12 |
+
components: {AbcjsEditor},
|
| 13 |
+
props: {
|
| 14 |
+
callbacks: {
|
| 15 |
+
type: Array,
|
| 16 |
+
required: false
|
| 17 |
+
},
|
| 18 |
+
tuneId: {
|
| 19 |
+
type: Number,
|
| 20 |
+
required: false
|
| 21 |
+
},
|
| 22 |
+
},
|
| 23 |
+
computed: {
|
| 24 |
+
abc() {
|
| 25 |
+
let str;
|
| 26 |
+
if (!window.abcjs)
|
| 27 |
+
return "";
|
| 28 |
+
|
| 29 |
+
if (this.tuneId === undefined)
|
| 30 |
+
return this.allTunes;
|
| 31 |
+
|
| 32 |
+
const book = new window.abcjs.TuneBook(this.allTunes);
|
| 33 |
+
return book.getTuneById(''+this.tuneId).abc;
|
| 34 |
+
},
|
| 35 |
+
},
|
| 36 |
+
data() {
|
| 37 |
+
const abc = `%%gchordfont "itim-music,Itim" 20
|
| 38 |
+
X: 1
|
| 39 |
+
T:Money Lost
|
| 40 |
+
M:3/4
|
| 41 |
+
L:1/8
|
| 42 |
+
Q:1/4=100
|
| 43 |
+
C:Paul Rosen
|
| 44 |
+
S:Copyright 2007, Paul Rosen
|
| 45 |
+
R:Klezmer
|
| 46 |
+
K:Dm
|
| 47 |
+
Ade|:"Dm"(f2d)e gf|"A7"e2^c4|"Gm"B>>^c BA BG|"A"A3Ade|"Dm"(f2d)e gf|"A7"e2^c4|
|
| 48 |
+
"Gm"A>>B "A7"AG FE|1"Dm"D3Ade:|2"Dm"D3DEF||:"Gm"(G2D)E FG|"Dm"A2F4|"Gm"B>>c "A7"BA BG|
|
| 49 |
+
"Dm"A3 DEF|"Gm"(G2D)EFG|"Dm"A2F4|"E°"E>>Fy "(A7)"ED^C2|1"Dm"D3DEF:|2"Dm"D6||
|
| 50 |
+
|
| 51 |
+
X: 32
|
| 52 |
+
T:Pretty Little Liza
|
| 53 |
+
C:Paul Rosen
|
| 54 |
+
S:Copyright 2005, Paul Rosen
|
| 55 |
+
M:4/4
|
| 56 |
+
L:1/8
|
| 57 |
+
Q:1/2=106
|
| 58 |
+
R:old time
|
| 59 |
+
K:Am
|
| 60 |
+
"Am"A2AA c2dd|e2eg e2dc|A2AA c2dd|e2cc A2cc|"Em (G)"B2BB B2BB|
|
| 61 |
+
B2BB B2BB|"Am"A2AA c2dd|e2eg e2c2|"D"d2dd d2dd|d2dd d2cd|
|
| 62 |
+
"Am"e2cc A2c2|"G"BAG2 BAG2|"Am"A2AA A2AA|A2AA A2AA|:"Am"e4 a3e|"G"g2d2- d2eg|
|
| 63 |
+
"Am"a2aa ged2|"Em"e2ee e2ee|"Am"e4 a3e|"G"g2d2- d2Bc|"Em"d2e2 dcB2|"Am"A2AA A2AA:|
|
| 64 |
+
|
| 65 |
+
X:49
|
| 66 |
+
M:4/4
|
| 67 |
+
L:1/16
|
| 68 |
+
%%stretchlast .7
|
| 69 |
+
Q:1/4=100
|
| 70 |
+
T:Piano
|
| 71 |
+
%%staves {(PianoRightHand) (PianoLeftHand)}
|
| 72 |
+
V:PianoRightHand clef=treble
|
| 73 |
+
V:PianoLeftHand clef=bass
|
| 74 |
+
K:C
|
| 75 |
+
[V: PianoRightHand] !mp!e2f2 e2d2 c2B2 A4|!>(!B2d2 g4 c6 !>)!e2|!p![G4e4] z4 A4 G4|c12 z4|[A12f12] [g4d4]|z4 !<(!B4 !<)![A8c8]|
|
| 76 |
+
!mf!A4 z4 d8|B8 [G4c4] z4|f2A2 c4 f4 g4|[f12d12] e4|!<(!A4 A4 c2e2 !<)!g4|!f!e8 z8|
|
| 77 |
+
[A4d4] z4 A8|BcBA G4 c4 G2B2|A2G2 A2B2 c4 B2G2|c12 z4|]
|
| 78 |
+
[V: PianoLeftHand] [E,12C,12] F,4|[G,8D,8] [C,8E,8]|G,4 C,4 C,4 B,,A,,C,B,,|A,,12 z4|A,,4 B,,4 C,2D,2 B,,C,D,E,|C,2E,2 G,4 E,2F,2 G,4|
|
| 79 |
+
F,4 A,4 [A,8F,8]|G,2F,2 E,2D,2 [C,4E,4] z4|[F,8A,8] [D,4A,4] z4|F,2G,2 A,2F,2 D,2F,2 C,2B,,2|C,4 F,A,D,F, E,4 z4|C,8 z8|
|
| 80 |
+
F,4 E,4 F,4 A,4|[D,8G,8] E,4 z4|C,4 [C,4F,4] z4 G,4|C,12 z4|]
|
| 81 |
+
|
| 82 |
+
X:77
|
| 83 |
+
T:Mary
|
| 84 |
+
M:C
|
| 85 |
+
L:1/4
|
| 86 |
+
K:G
|
| 87 |
+
BAGA| BBB2|AAA2| Bdd2|
|
| 88 |
+
w:Mar- y had a lit- tle lamb, lit- tle lamb, lit- tle lamb,
|
| 89 |
+
BAGA| BBBB|AABA |G|]
|
| 90 |
+
w:Mar- y had a lit- tle lamb whose fleece was white as snow.
|
| 91 |
+
|
| 92 |
+
X:102
|
| 93 |
+
%%staves 1 2 3
|
| 94 |
+
T: Sonata I
|
| 95 |
+
C: J.S. Bach
|
| 96 |
+
M: C
|
| 97 |
+
Q:"Adagio"
|
| 98 |
+
L: 1/8
|
| 99 |
+
K:C
|
| 100 |
+
V:1 clef=treble name="Violino I" sname="Vl. I"
|
| 101 |
+
V:2 clef=treble name="Violino II" sname="Vl. II" space=+10
|
| 102 |
+
V:3 clef=bass name="Violoncello" sname="Vc."
|
| 103 |
+
[V:1] g8-|gf/e/ {e}f>g (a/f/d/f/) (A//=B//A//B//TB3//A///B///)|
|
| 104 |
+
[V:2] z8 | z8 |
|
| 105 |
+
[V:3] z cec gGBG | Aa- a/_b/a/g/ f3 g/f/ |
|
| 106 |
+
%
|
| 107 |
+
[V:1] c/gf/ E/ed/ c/c'b/ A/ag/ | ^f/e/d- d/(c/B/A/) G/(e/c/e/) Aa| d2-d/g/_b/a/ a3 g/=f/|
|
| 108 |
+
[V:2] c8- | cB/A/ {A}B>c (e/c/A/c/) (E//^F//E//F//TF3//E///F///) | G/(D/G/A/) _B/G/g/e/ ^cA d2-|
|
| 109 |
+
[V:3] edcB AG^FE | D^FGg c3d/c/| _BG g2-gf/e/ f>g|
|
| 110 |
+
|
| 111 |
+
X:232
|
| 112 |
+
T:Amazing Grace
|
| 113 |
+
C:Lyric Author: John Newton
|
| 114 |
+
R:Early American Melody
|
| 115 |
+
Z:Public Domain
|
| 116 |
+
N:A well known tune
|
| 117 |
+
L:1/4
|
| 118 |
+
M:3/4
|
| 119 |
+
%%staves (S A) (T B)
|
| 120 |
+
V:S clef=treble name=""
|
| 121 |
+
V:A clef=treble name=""
|
| 122 |
+
V:T clef=bass name=""
|
| 123 |
+
V:B clef=bass name=""
|
| 124 |
+
K:Ab
|
| 125 |
+
% Measures 1 - 7
|
| 126 |
+
[V:S] (E/ F/) | A2 (c/ A/) | c2 B | A2 F | E2 (E/ F/) | A2 (c/ A/) | c2 (B/ c/) | He2 |
|
| 127 |
+
[V:A] (C/ D/) | C2 (E/ C/) | E2 D | C2 D | C2 (C/ D/) | C2 (E/ C/) | E2 A | G2 |
|
| 128 |
+
[V:T] A, | E,2 A, | A,2 G, | A,2 A, | A,2 A, | E,2 A, | A,2 A, | HB,2 |
|
| 129 |
+
[V:B] A,, | A,,2 A,, | A,,2 E, | F,2 D, | A,,2 A,, | A,,2 A,, | A,2 F, | E,2 |
|
| 130 |
+
% Measures 8 - 14
|
| 131 |
+
[V:S] (B/ c/) | e2 (e/ c/) | A2 (F/ E/) | A2 F | E2 (E/ F/) | A2 (c/ A/) | c2 B | HA2 |
|
| 132 |
+
[V:A] G | A2 (A/ E/) | E2 (D/ C/) | F2 D | C2 (C/ D/) | C2 (E/ A/) | G2 G | E2 |
|
| 133 |
+
[V:T] E | C2 (C/ A,/) | C2 A, | A,2 A, | A,2 A, | A,2 (A,/ C/) | E2 D | HC2 |
|
| 134 |
+
[V:B] E, | A,2 A, | A,2 A, | D,2 D, | A,,2 A, | F,2 E, | E,2 E, | A,,2 |
|
| 135 |
+
|
| 136 |
+
X:400
|
| 137 |
+
T:Drum Kit
|
| 138 |
+
%%map drummap D print=D heads=x_head % pedal hi-hat
|
| 139 |
+
%%map drummap E print=E % bass drum 1
|
| 140 |
+
%%map drummap F print=F % acoustic bass drum
|
| 141 |
+
%%map drummap G print=G % low floor tom-tom
|
| 142 |
+
%%map drummap A print=A % high floor tom-tom
|
| 143 |
+
%%map drummap B print=B % low tom-tom
|
| 144 |
+
%%map drummap ^B print=B heads=triangle % tambourine
|
| 145 |
+
%%map drummap c print=c % acoustic snare
|
| 146 |
+
%%map drummap _c print=c % electric snare
|
| 147 |
+
%%map drummap ^c print=c heads=triangle % low wood block
|
| 148 |
+
%%map drummap =c print=c % side stick
|
| 149 |
+
%%map drummap d print=d % low-mid tom tom
|
| 150 |
+
%%map drummap ^d print=d heads=triangle % high wood block
|
| 151 |
+
%%map drummap e print=e % high-mid tom tom
|
| 152 |
+
%%map drummap ^e print=e heads=triangle % cowbell
|
| 153 |
+
%%map drummap f print=f % high tom tom
|
| 154 |
+
%%map drummap ^f print=f heads=x_head % ride cymbal 1
|
| 155 |
+
%%map drummap g print=g heads=x_head % closed hi-hat
|
| 156 |
+
%%map drummap ^g print=g heads=diamond % open hi-hat
|
| 157 |
+
%%map drummap a print=a heads=x_head % crash cymbal 1
|
| 158 |
+
%%map drummap ^a print=a heads=triangle % open triangle
|
| 159 |
+
%%MIDI drummap D 44 % pedal hi-hat
|
| 160 |
+
%%MIDI drummap E 36 % bass drum 1
|
| 161 |
+
%%MIDI drummap F 35 % acoustic bass drum
|
| 162 |
+
%%MIDI drummap G 41 % low floor tom-tom
|
| 163 |
+
%%MIDI drummap A 43 % high floor tom-tom
|
| 164 |
+
%%MIDI drummap B 45 % low tom-tom
|
| 165 |
+
%%MIDI drummap ^B 54 % tambourine
|
| 166 |
+
%%MIDI drummap c 38 % acoustic snare
|
| 167 |
+
%%MIDI drummap _c 40 % electric snare
|
| 168 |
+
%%MIDI drummap ^c 77 % low wood block
|
| 169 |
+
%%MIDI drummap =c 37 % side stick
|
| 170 |
+
%%MIDI drummap d 47 % low-mid tom tom
|
| 171 |
+
%%MIDI drummap ^d 76 % high wood block
|
| 172 |
+
%%MIDI drummap e 48 % high-mid tom tom
|
| 173 |
+
%%MIDI drummap ^e 56 % cowbell
|
| 174 |
+
%%MIDI drummap f 50 % high tom tom
|
| 175 |
+
%%MIDI drummap ^f 51 % ride cymbal 1
|
| 176 |
+
%%MIDI drummap g 42 % closed hi-hat
|
| 177 |
+
%%MIDI drummap ^g 46 % open hi-hat
|
| 178 |
+
%%MIDI drummap a 49 % crash cymbal 1
|
| 179 |
+
%%MIDI drummap ^a 81 % open triangle
|
| 180 |
+
%%score (1 2)
|
| 181 |
+
Q:1/4=120
|
| 182 |
+
M:4/4
|
| 183 |
+
L:1/4
|
| 184 |
+
K:C perc
|
| 185 |
+
V:1
|
| 186 |
+
z4| g/^f/g/^f/ g/^f/g/^f/| c/^f/g/^f/ A/^f/g/^f/| c/^f/g/^f/ A/^f/g/^f/|
|
| 187 |
+
c/c/g/^f/ A/A/g/^f/| c/^f/c/^f/ A/^f/A/^f/|(3B/B/B/ (3f/f/f/ (3e/e/e/ (3d/d/d/ | a4|
|
| 188 |
+
V:2
|
| 189 |
+
E D E/E/ D|E D E/E/ D|E D E/E/ D|E D E/E/ D|
|
| 190 |
+
E D E/E/ D|E D E/E/ D|E D E/E/ D|E D E/E/ D|
|
| 191 |
+
`;
|
| 192 |
+
|
| 193 |
+
return {
|
| 194 |
+
allTunes: abc,
|
| 195 |
+
abcjs: null,
|
| 196 |
+
}
|
| 197 |
+
},
|
| 198 |
+
};
|
| 199 |
+
</script>
|
docs/.vuepress/components/FieldSet.vue
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<fieldset>
|
| 3 |
+
<legend v-if="label">{{label}}</legend>
|
| 4 |
+
<slot name="controls"></slot>
|
| 5 |
+
</fieldset>
|
| 6 |
+
</template>
|
| 7 |
+
|
| 8 |
+
<script>
|
| 9 |
+
export default {
|
| 10 |
+
name: "field-set",
|
| 11 |
+
props: {
|
| 12 |
+
label: {
|
| 13 |
+
type: String,
|
| 14 |
+
required: false,
|
| 15 |
+
default: ""
|
| 16 |
+
}
|
| 17 |
+
},
|
| 18 |
+
}
|
| 19 |
+
</script>
|
| 20 |
+
|
| 21 |
+
<style scoped>
|
| 22 |
+
fieldset {
|
| 23 |
+
margin-bottom: 1em;
|
| 24 |
+
display: inline-block;
|
| 25 |
+
width: calc(100% - 30px);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
</style>
|
docs/.vuepress/components/FoundClasses.vue
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="found-classes">
|
| 3 |
+
<div class="checkboxes">
|
| 4 |
+
<label v-for="cls in classNames"><input type="checkbox" v-model="checkedClasses" :value="cls"> {{cls}}</label>
|
| 5 |
+
</div>
|
| 6 |
+
<div class="language- my-code" v-if="selector">
|
| 7 |
+
var paper = document.querySelector("{{target}}");<br>
|
| 8 |
+
var elements = paper.querySelectorAll("{{selector}}");
|
| 9 |
+
</div>
|
| 10 |
+
</div>
|
| 11 |
+
</template>
|
| 12 |
+
|
| 13 |
+
<script>
|
| 14 |
+
import { nextTick } from 'vue';
|
| 15 |
+
|
| 16 |
+
export default {
|
| 17 |
+
name: "found-classes",
|
| 18 |
+
watch: {
|
| 19 |
+
target() {
|
| 20 |
+
this.redraw();
|
| 21 |
+
},
|
| 22 |
+
checkedClasses: function (val) {
|
| 23 |
+
const paper = document.querySelector(this.target);
|
| 24 |
+
const svg = paper.querySelector("svg");
|
| 25 |
+
const elements = svg.querySelectorAll('[fill]');
|
| 26 |
+
elements.forEach((el) => {
|
| 27 |
+
if (el.getAttribute("fill") !== "none")
|
| 28 |
+
el.setAttribute("fill", "#000000");
|
| 29 |
+
if (el.getAttribute("stroke") !== "none")
|
| 30 |
+
el.setAttribute("stroke", "#000000");
|
| 31 |
+
});
|
| 32 |
+
|
| 33 |
+
this.selector = (val.length > 0) ? "." + val.join(".") : "";
|
| 34 |
+
this.highlightSelectedClasses();
|
| 35 |
+
},
|
| 36 |
+
},
|
| 37 |
+
props: {
|
| 38 |
+
target: {
|
| 39 |
+
type: String,
|
| 40 |
+
required: true
|
| 41 |
+
},
|
| 42 |
+
},
|
| 43 |
+
data() {
|
| 44 |
+
return {
|
| 45 |
+
classNames: [],
|
| 46 |
+
checkedClasses: [],
|
| 47 |
+
selector: "",
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
mounted() {
|
| 51 |
+
nextTick(() => {
|
| 52 |
+
this.redraw();
|
| 53 |
+
});
|
| 54 |
+
},
|
| 55 |
+
methods: {
|
| 56 |
+
redraw() {
|
| 57 |
+
if (this.target) {
|
| 58 |
+
const svg = document.querySelector(this.target);
|
| 59 |
+
if (svg) {
|
| 60 |
+
const elements = svg.querySelectorAll('*');
|
| 61 |
+
|
| 62 |
+
let classes = [];
|
| 63 |
+
elements.forEach((el) => {
|
| 64 |
+
const arr = el.classList ? el.classList.value.split(" ") : [];
|
| 65 |
+
classes = classes.concat(arr);
|
| 66 |
+
});
|
| 67 |
+
this.classNames = [...new Set(classes)].filter(Boolean).sort();
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
highlightSelectedClasses() {
|
| 72 |
+
if (this.selector.length > 0) {
|
| 73 |
+
document.getElementById('paper').querySelectorAll(this.selector).forEach((el) => {
|
| 74 |
+
if (el.getAttribute("fill") !== "none")
|
| 75 |
+
el.setAttribute("fill", "#3D9AFC");
|
| 76 |
+
if (el.getAttribute("stroke") !== "none")
|
| 77 |
+
el.setAttribute("stroke", "#3D9AFC");
|
| 78 |
+
});
|
| 79 |
+
}
|
| 80 |
+
},
|
| 81 |
+
},
|
| 82 |
+
}
|
| 83 |
+
</script>
|
| 84 |
+
|
| 85 |
+
<style scoped>
|
| 86 |
+
.checkboxes {
|
| 87 |
+
display: flex;
|
| 88 |
+
flex-wrap: wrap;
|
| 89 |
+
margin-bottom: 20px;
|
| 90 |
+
}
|
| 91 |
+
label {
|
| 92 |
+
display: inline-block;
|
| 93 |
+
width: 180px;
|
| 94 |
+
}
|
| 95 |
+
</style>
|
docs/.vuepress/components/NumTunes.vue
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<ClientOnly>
|
| 3 |
+
<div class="num-tunes">
|
| 4 |
+
<div class="language- my-code">
|
| 5 |
+
<span class="code-results">{{answer}}</span>
|
| 6 |
+
<span> = ABCJS.numberOfTunes(tunebookString);</span>
|
| 7 |
+
</div>
|
| 8 |
+
</div>
|
| 9 |
+
</ClientOnly>
|
| 10 |
+
</template>
|
| 11 |
+
|
| 12 |
+
<script>
|
| 13 |
+
export default {
|
| 14 |
+
name: "num-tunes",
|
| 15 |
+
data() {
|
| 16 |
+
return {
|
| 17 |
+
answer: "",
|
| 18 |
+
abcjs: null,
|
| 19 |
+
};
|
| 20 |
+
},
|
| 21 |
+
methods: {
|
| 22 |
+
redraw(tunebookString) {
|
| 23 |
+
this.answer = window.abcjs.numberOfTunes(tunebookString);
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
</script>
|
docs/.vuepress/components/RadioGroup.vue
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="radio-group">
|
| 3 |
+
<field-set :label="label">
|
| 4 |
+
<template v-slot:controls>
|
| 5 |
+
<label class="radio radio-gradient" v-for="choice in options">
|
| 6 |
+
<span class="radio__input">
|
| 7 |
+
<input type="radio" v-model="item" :name="name" :value="choice.value">
|
| 8 |
+
<span class="radio__control"></span>
|
| 9 |
+
</span>
|
| 10 |
+
<span class="radio__label">{{choice.text}}</span>
|
| 11 |
+
</label>
|
| 12 |
+
</template>
|
| 13 |
+
</field-set>
|
| 14 |
+
</div>
|
| 15 |
+
</template>
|
| 16 |
+
|
| 17 |
+
<script>
|
| 18 |
+
import FieldSet from "./FieldSet.vue";
|
| 19 |
+
export default {
|
| 20 |
+
name: "radio-group",
|
| 21 |
+
components: {FieldSet},
|
| 22 |
+
props: {
|
| 23 |
+
label: {
|
| 24 |
+
type: String,
|
| 25 |
+
required: true
|
| 26 |
+
},
|
| 27 |
+
name: {
|
| 28 |
+
type: String,
|
| 29 |
+
required: true
|
| 30 |
+
},
|
| 31 |
+
options: {
|
| 32 |
+
type: Array,
|
| 33 |
+
required: true
|
| 34 |
+
}
|
| 35 |
+
},
|
| 36 |
+
computed: {
|
| 37 |
+
item:{
|
| 38 |
+
get(){
|
| 39 |
+
return this.$store.getters[this.name];
|
| 40 |
+
},
|
| 41 |
+
set(newValue){
|
| 42 |
+
this.$store.commit(this.name, newValue)
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
}
|
| 47 |
+
</script>
|
| 48 |
+
|
| 49 |
+
<style scoped>
|
| 50 |
+
.radio {
|
| 51 |
+
display: grid;
|
| 52 |
+
grid-template-columns: min-content auto;
|
| 53 |
+
grid-gap: 0.5em;
|
| 54 |
+
font-size: 1rem;
|
| 55 |
+
color: #000000;
|
| 56 |
+
margin-bottom: .5em;
|
| 57 |
+
}
|
| 58 |
+
.radio:focus-within .radio__label {
|
| 59 |
+
transform: scale(1.05);
|
| 60 |
+
opacity: 1;
|
| 61 |
+
margin-left: 8px;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.radio__label {
|
| 65 |
+
line-height: 1;
|
| 66 |
+
transition: 180ms all ease-in-out;
|
| 67 |
+
opacity: 0.8;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.radio__input {
|
| 71 |
+
display: flex;
|
| 72 |
+
}
|
| 73 |
+
.radio__input input {
|
| 74 |
+
opacity: 0;
|
| 75 |
+
width: 0;
|
| 76 |
+
height: 0;
|
| 77 |
+
}
|
| 78 |
+
.radio__input input:focus + .radio__control {
|
| 79 |
+
box-shadow: 0 0 0 0.05em #fff, 0 0 0.15em 0.1em #000000;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.radio-gradient input:checked + .radio__control {
|
| 83 |
+
background: radial-gradient(#000000 41%, #ffffff 41%) 0.1px;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.radio-before .radio__control {
|
| 87 |
+
display: grid;
|
| 88 |
+
place-items: center;
|
| 89 |
+
}
|
| 90 |
+
.radio-before input + .radio__control::before {
|
| 91 |
+
content: "";
|
| 92 |
+
width: 0.5em;
|
| 93 |
+
height: 0.5em;
|
| 94 |
+
box-shadow: inset 0.5em 0.5em #000000;
|
| 95 |
+
border-radius: 50%;
|
| 96 |
+
transition: 180ms transform ease-in-out;
|
| 97 |
+
transform: scale(0);
|
| 98 |
+
}
|
| 99 |
+
.radio-before input:checked + .radio__control::before {
|
| 100 |
+
transform: scale(1);
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.radio__control {
|
| 104 |
+
display: block;
|
| 105 |
+
width: 1em;
|
| 106 |
+
height: 1em;
|
| 107 |
+
border-radius: 50%;
|
| 108 |
+
border: 0.1em solid #000000;
|
| 109 |
+
transform: translateY(-0.05em);
|
| 110 |
+
}
|
| 111 |
+
</style>
|
docs/.vuepress/components/RenderAbc.vue
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<ClientOnly>
|
| 3 |
+
<div ref='paper' class="render-abc"></div>
|
| 4 |
+
</ClientOnly>
|
| 5 |
+
</template>
|
| 6 |
+
|
| 7 |
+
<script>
|
| 8 |
+
import { waitForAbcjs } from '../wait-for-abcjs';
|
| 9 |
+
export default {
|
| 10 |
+
name: "render-abc",
|
| 11 |
+
props: {
|
| 12 |
+
abc: {
|
| 13 |
+
type: String,
|
| 14 |
+
required: true
|
| 15 |
+
},
|
| 16 |
+
options: {
|
| 17 |
+
type: Object,
|
| 18 |
+
required: false,
|
| 19 |
+
default: {}
|
| 20 |
+
}
|
| 21 |
+
},
|
| 22 |
+
data() {
|
| 23 |
+
return {
|
| 24 |
+
visualObj: null,
|
| 25 |
+
defaultOptions: { paddingleft: 0, paddingright: 0, responsive: "resize" },
|
| 26 |
+
};
|
| 27 |
+
},
|
| 28 |
+
async mounted() {
|
| 29 |
+
await waitForAbcjs()
|
| 30 |
+
const el = this.$refs.paper;
|
| 31 |
+
this.visualObj = abcjs.renderAbc(el, this.abc, this.defaultOptions, this.options);
|
| 32 |
+
},
|
| 33 |
+
methods: {
|
| 34 |
+
getObj() {
|
| 35 |
+
return this.visualObj[0];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
</script>
|
docs/.vuepress/components/RenderAudio.vue
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<ClientOnly>
|
| 3 |
+
<div ref='audio' class="render-audio"></div>
|
| 4 |
+
</ClientOnly>
|
| 5 |
+
</template>
|
| 6 |
+
|
| 7 |
+
<script>
|
| 8 |
+
import { waitForAbcjs } from '../wait-for-abcjs';
|
| 9 |
+
export default {
|
| 10 |
+
name: "render-audio",
|
| 11 |
+
props: {
|
| 12 |
+
obj: {
|
| 13 |
+
type: Object,
|
| 14 |
+
required: false
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
data() {
|
| 18 |
+
return {
|
| 19 |
+
synthControl: null,
|
| 20 |
+
};
|
| 21 |
+
},
|
| 22 |
+
async mounted() {
|
| 23 |
+
await waitForAbcjs()
|
| 24 |
+
this.synthControl = new abcjs.synth.SynthController();
|
| 25 |
+
this.synthControl.load(this.$refs.audio, null, {displayLoop: true, displayRestart: true, displayPlay: true, displayProgress: true, displayWarp: true});
|
| 26 |
+
this.setTune();
|
| 27 |
+
},
|
| 28 |
+
methods: {
|
| 29 |
+
setTune() {
|
| 30 |
+
if (this.obj.tune)
|
| 31 |
+
this.synthControl.setTune(this.obj.tune.getObj(), false);
|
| 32 |
+
else {
|
| 33 |
+
setTimeout(() => {
|
| 34 |
+
this.setTune();
|
| 35 |
+
}, 100);
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
},
|
| 39 |
+
}
|
| 40 |
+
</script>
|
docs/.vuepress/components/SandboxCode.vue
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="sandbox-code">
|
| 3 |
+
<h3>Header</h3>
|
| 4 |
+
<code>{{declaration}}</code>
|
| 5 |
+
<h3>HTML</h3>
|
| 6 |
+
<code>{{sheetMusicHtml}}</code>
|
| 7 |
+
<h3>JavaScript</h3>
|
| 8 |
+
<code>{{sheetMusicJs}}</code>
|
| 9 |
+
<h3>CSS</h3>
|
| 10 |
+
<code>{{sheetMusicCss}}</code>
|
| 11 |
+
</div>
|
| 12 |
+
</template>
|
| 13 |
+
|
| 14 |
+
<script>
|
| 15 |
+
import {mapGetters} from "vuex";
|
| 16 |
+
|
| 17 |
+
export default {
|
| 18 |
+
name: 'sandbox-code',
|
| 19 |
+
computed: {
|
| 20 |
+
...mapGetters([
|
| 21 |
+
'declaration',
|
| 22 |
+
'sheetMusicHtml',
|
| 23 |
+
'sheetMusicJs',
|
| 24 |
+
'sheetMusicCss',
|
| 25 |
+
]),
|
| 26 |
+
},
|
| 27 |
+
}
|
| 28 |
+
</script>
|
| 29 |
+
|
| 30 |
+
<style scoped>
|
| 31 |
+
code {
|
| 32 |
+
background: black;
|
| 33 |
+
color: white;
|
| 34 |
+
width: 100%;
|
| 35 |
+
display: inline-block;
|
| 36 |
+
white-space: pre-wrap;
|
| 37 |
+
font-size: 1.1em;
|
| 38 |
+
}
|
| 39 |
+
</style>
|
docs/.vuepress/components/SandboxContainer.vue
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="sandbox-container">
|
| 3 |
+
<nav>
|
| 4 |
+
<div class="tab-container">
|
| 5 |
+
<button @click="selected = 'options'" :class="optionsClass">Options</button>
|
| 6 |
+
<button @click="selected = 'demo'" :class="demoClass">Demo</button>
|
| 7 |
+
<button @click="selected = 'source'" :class="sourceClass">Source Code</button>
|
| 8 |
+
</div>
|
| 9 |
+
<button @click="download" class="download">Download Working Demo</button>
|
| 10 |
+
</nav>
|
| 11 |
+
<div class="options" v-if="selected === 'options'">
|
| 12 |
+
<sandbox-input></sandbox-input>
|
| 13 |
+
</div>
|
| 14 |
+
|
| 15 |
+
<div class="demo" v-if="selected === 'demo'">
|
| 16 |
+
<sandbox-output></sandbox-output>
|
| 17 |
+
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
<div class="source-code" v-if="selected === 'source'">
|
| 21 |
+
<sandbox-code ref="code"></sandbox-code>
|
| 22 |
+
</div>
|
| 23 |
+
|
| 24 |
+
</div>
|
| 25 |
+
</template>
|
| 26 |
+
|
| 27 |
+
<script>
|
| 28 |
+
import {mapGetters, mapMutations} from "vuex";
|
| 29 |
+
import SandboxInput from "./SandboxInput.vue";
|
| 30 |
+
import SandboxOutput from "./SandboxOutput.vue";
|
| 31 |
+
import SandboxCode from "./SandboxCode.vue";
|
| 32 |
+
export default {
|
| 33 |
+
name: "sandbox-container",
|
| 34 |
+
components: {SandboxCode, SandboxOutput, SandboxInput},
|
| 35 |
+
computed: {
|
| 36 |
+
...mapGetters([
|
| 37 |
+
'fullDemo',
|
| 38 |
+
'filename',
|
| 39 |
+
]),
|
| 40 |
+
optionsClass() {
|
| 41 |
+
let k = [ 'tab' ];
|
| 42 |
+
if (this.selected === 'options')
|
| 43 |
+
k.push("selected");
|
| 44 |
+
return k;
|
| 45 |
+
},
|
| 46 |
+
demoClass() {
|
| 47 |
+
let k = [ 'tab' ];
|
| 48 |
+
if (this.selected === 'demo')
|
| 49 |
+
k.push("selected");
|
| 50 |
+
return k;
|
| 51 |
+
},
|
| 52 |
+
sourceClass() {
|
| 53 |
+
let k = [ 'tab' ];
|
| 54 |
+
if (this.selected === 'source')
|
| 55 |
+
k.push("selected");
|
| 56 |
+
return k;
|
| 57 |
+
},
|
| 58 |
+
},
|
| 59 |
+
data() {
|
| 60 |
+
return {
|
| 61 |
+
selected: 'options',
|
| 62 |
+
}
|
| 63 |
+
},
|
| 64 |
+
methods: {
|
| 65 |
+
...mapMutations({
|
| 66 |
+
'setIsDownloading' : 'isDownloading',
|
| 67 |
+
}),
|
| 68 |
+
download() {
|
| 69 |
+
this.setIsDownloading(true);
|
| 70 |
+
const url = "data:application/txt," + encodeURIComponent(this.fullDemo);
|
| 71 |
+
const link = document.createElement('a');
|
| 72 |
+
document.body.appendChild(link);
|
| 73 |
+
link.setAttribute("style", "display: none;");
|
| 74 |
+
link.href = url;
|
| 75 |
+
link.download = this.filename;
|
| 76 |
+
link.click();
|
| 77 |
+
window.URL.revokeObjectURL(url);
|
| 78 |
+
document.body.removeChild(link);
|
| 79 |
+
this.setIsDownloading(false);
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
</script>
|
| 84 |
+
|
| 85 |
+
<style scoped>
|
| 86 |
+
nav {
|
| 87 |
+
display: flex;
|
| 88 |
+
justify-content: space-between;
|
| 89 |
+
margin-bottom: 10px;
|
| 90 |
+
}
|
| 91 |
+
.tab-container {
|
| 92 |
+
border-bottom: 2px solid #5c5c5c;
|
| 93 |
+
padding: 0 10px;
|
| 94 |
+
}
|
| 95 |
+
button {
|
| 96 |
+
font-size: 1em;
|
| 97 |
+
padding: 5px 10px;
|
| 98 |
+
background: #9ce9c7;
|
| 99 |
+
border: 1px solid #5c5c5c;
|
| 100 |
+
border-radius: 4px;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
button.tab {
|
| 104 |
+
border-radius: 8px 8px 0 0;
|
| 105 |
+
border-bottom: none;
|
| 106 |
+
}
|
| 107 |
+
button.tab.selected {
|
| 108 |
+
background: #ffffff;
|
| 109 |
+
font-weight: bold;
|
| 110 |
+
}
|
| 111 |
+
button:hover {
|
| 112 |
+
background-color: #3FB07C;
|
| 113 |
+
color: white;
|
| 114 |
+
}
|
| 115 |
+
button.selected:hover {
|
| 116 |
+
background: #ffffff;
|
| 117 |
+
color: inherit;
|
| 118 |
+
}
|
| 119 |
+
button.tab.selected:after {
|
| 120 |
+
content: " ";
|
| 121 |
+
position: absolute;
|
| 122 |
+
border-bottom: 2px solid white;
|
| 123 |
+
bottom: -2px;
|
| 124 |
+
width: 100%;
|
| 125 |
+
left: 0;
|
| 126 |
+
}
|
| 127 |
+
</style>
|
docs/.vuepress/components/SandboxInput.vue
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="sandbox-input">
|
| 3 |
+
<div>
|
| 4 |
+
<field-set label="Setup">
|
| 5 |
+
<template v-slot:controls>
|
| 6 |
+
<check-box
|
| 7 |
+
label="I am using the Node ecosystem"
|
| 8 |
+
value="usingNode">
|
| 9 |
+
</check-box>
|
| 10 |
+
</template>
|
| 11 |
+
</field-set>
|
| 12 |
+
|
| 13 |
+
<field-set label="Visual">
|
| 14 |
+
<template v-slot:controls>
|
| 15 |
+
<check-box
|
| 16 |
+
label="Show sheet music"
|
| 17 |
+
:sub-options="[
|
| 18 |
+
{ text: 'The width of the music should change with the width of the display', value: 'responsive' },
|
| 19 |
+
{ text: 'Cursor should follow the playback', value: 'cursor' },
|
| 20 |
+
{ text: 'Measures should hide as they finish playing', value: 'hideMeasures'},
|
| 21 |
+
{ text: 'I want to style the chords like a fake book', value: 'jazzChords'}
|
| 22 |
+
]"
|
| 23 |
+
value="sheetMusic">
|
| 24 |
+
</check-box>
|
| 25 |
+
</template>
|
| 26 |
+
</field-set>
|
| 27 |
+
|
| 28 |
+
<radio-group
|
| 29 |
+
label="Changes"
|
| 30 |
+
name="changes"
|
| 31 |
+
:options="[
|
| 32 |
+
{ text: 'The tune is determined programmatically', value: 'programmatic' },
|
| 33 |
+
{ text: 'User changes the tune with a visual editor', value: 'drag' },
|
| 34 |
+
{ text: 'User changes the tune with a text editor', value: 'editor' }, ]">
|
| 35 |
+
</radio-group>
|
| 36 |
+
|
| 37 |
+
<field-set label="Audio Control">
|
| 38 |
+
<template v-slot:controls>
|
| 39 |
+
<check-box
|
| 40 |
+
label="Show playback widget"
|
| 41 |
+
:sub-options="[
|
| 42 |
+
{ text: 'I want the large playback widget', value: 'large' },
|
| 43 |
+
{ text: 'Include Loop', value: 'loop' },
|
| 44 |
+
{ text: 'Include Restart', value: 'restart' },
|
| 45 |
+
{ text: 'Include Play', value: 'play' },
|
| 46 |
+
{ text: 'Include Progress', value: 'progress' },
|
| 47 |
+
{ text: 'Include Warp', value: 'warp' },
|
| 48 |
+
{ text: 'Include Clock', value: 'clock' },
|
| 49 |
+
]"
|
| 50 |
+
value="playbackWidget"
|
| 51 |
+
:disabled="!hasSound"
|
| 52 |
+
>
|
| 53 |
+
</check-box>
|
| 54 |
+
</template>
|
| 55 |
+
</field-set>
|
| 56 |
+
</div>
|
| 57 |
+
<div>
|
| 58 |
+
<field-set label="Sound">
|
| 59 |
+
<template v-slot:controls>
|
| 60 |
+
<check-box
|
| 61 |
+
label="I want sound"
|
| 62 |
+
value="hasSound"
|
| 63 |
+
:sub-options="audioOptions"
|
| 64 |
+
></check-box>
|
| 65 |
+
</template>
|
| 66 |
+
</field-set>
|
| 67 |
+
|
| 68 |
+
<field-set label="Timing">
|
| 69 |
+
<template v-slot:controls>
|
| 70 |
+
<check-box
|
| 71 |
+
label="Listen for callbacks"
|
| 72 |
+
value="usingCallbacks"
|
| 73 |
+
:disabled="!sheetMusic"
|
| 74 |
+
>
|
| 75 |
+
</check-box>
|
| 76 |
+
</template>
|
| 77 |
+
</field-set>
|
| 78 |
+
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
</template>
|
| 82 |
+
|
| 83 |
+
<script>
|
| 84 |
+
import {mapGetters} from "vuex";
|
| 85 |
+
import FieldSet from "./FieldSet.vue";
|
| 86 |
+
import CheckBox from "./CheckBox.vue";
|
| 87 |
+
import RadioGroup from "./RadioGroup.vue";
|
| 88 |
+
export default {
|
| 89 |
+
name: "sandbox-input",
|
| 90 |
+
components: {RadioGroup, CheckBox, FieldSet},
|
| 91 |
+
computed: {
|
| 92 |
+
...mapGetters([
|
| 93 |
+
'hasSound',
|
| 94 |
+
'sheetMusic',
|
| 95 |
+
]),
|
| 96 |
+
},
|
| 97 |
+
data() {
|
| 98 |
+
return {
|
| 99 |
+
audioOptions: [
|
| 100 |
+
{ text: 'I want a metronome accompaniment', value: 'metronome' },
|
| 101 |
+
{ text: 'I want to control the tempo programmatically', value: 'tempo' },
|
| 102 |
+
{ text: 'I want to create a stereo effect', value: 'stereo' },
|
| 103 |
+
{ text: 'I want to set the instrument(s) that are played back', value: 'instrument' },
|
| 104 |
+
{ text: 'I want to transpose', value: 'transpose' },
|
| 105 |
+
{ text: 'I want to turn off the chord accompaniment', value: 'noChords' },
|
| 106 |
+
{ text: 'I want to turn off a voice', value: 'noVoice' },
|
| 107 |
+
{ text: 'I want to be able to tweak the audio before it is created.', value: 'tweak', todo: true },
|
| 108 |
+
{ text: 'I want to download a MIDI file', value: 'midi' },
|
| 109 |
+
{ text: 'I want to play an arbitrary note without ABC', value: 'playImmediate' },
|
| 110 |
+
{ text: 'I want to switch tunes dynamically', value: 'switchTunes', todo: true },
|
| 111 |
+
{ text: 'I want to hide a voice visually but play it', value: 'hideVoice' },
|
| 112 |
+
{ text: 'I want to preload notes', value: 'preload', todo: true },
|
| 113 |
+
{ text: 'I want to loop some measures', value: 'loopMeasures', todo: true },
|
| 114 |
+
{ text: 'I want to add swing feel', value: 'swingFeel', todo: true },
|
| 115 |
+
{ text: 'I have my own soundfont', value: 'soundfont' },
|
| 116 |
+
]
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
</script>
|
| 121 |
+
|
| 122 |
+
<style scoped>
|
| 123 |
+
.sandbox-input {
|
| 124 |
+
display: flex;
|
| 125 |
+
}
|
| 126 |
+
.sandbox-input > div {
|
| 127 |
+
width: 50%;
|
| 128 |
+
}
|
| 129 |
+
.sandbox-input > div:first-child {
|
| 130 |
+
margin-right: 5px;
|
| 131 |
+
}
|
| 132 |
+
.sandbox-input > div:last-child {
|
| 133 |
+
margin-left: 5px;
|
| 134 |
+
}
|
| 135 |
+
</style>
|
docs/.vuepress/components/SandboxOutput.vue
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="sandbox-output">
|
| 3 |
+
<div v-html="sheetMusicCss"></div>
|
| 4 |
+
<button class="run-demo" v-if="!running" @click="onloadCode">Run Demo</button>
|
| 5 |
+
<div :class="`demo ${running ? 'running' : ''}`" v-html="sheetMusicHtml"></div>
|
| 6 |
+
</div>
|
| 7 |
+
</template>
|
| 8 |
+
|
| 9 |
+
<script>
|
| 10 |
+
import {mapGetters} from 'vuex'
|
| 11 |
+
import { nextTick } from "vue"
|
| 12 |
+
|
| 13 |
+
export default {
|
| 14 |
+
name: "sandbox-output",
|
| 15 |
+
computed: {
|
| 16 |
+
...mapGetters([
|
| 17 |
+
'sheetMusicCss',
|
| 18 |
+
'sheetMusicJsNode',
|
| 19 |
+
'sheetMusicHtml',
|
| 20 |
+
]),
|
| 21 |
+
},
|
| 22 |
+
watch: {
|
| 23 |
+
sheetMusicJsNode() {
|
| 24 |
+
this.running = false;
|
| 25 |
+
},
|
| 26 |
+
},
|
| 27 |
+
data() {
|
| 28 |
+
return {
|
| 29 |
+
running: false,
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
methods: {
|
| 33 |
+
onloadCode() {
|
| 34 |
+
this.running = true;
|
| 35 |
+
const abcString = `T: Cooley's
|
| 36 |
+
M: 4/4
|
| 37 |
+
L: 1/8
|
| 38 |
+
R: reel
|
| 39 |
+
K: Emin
|
| 40 |
+
|:D2|"Em"EB{c}BA B2 EB|~B2 AB dBAG|"D"FDAD BDAD|FDAD dAFD|
|
| 41 |
+
"Em"EBBA B2 EB|B2 AB defg|"D"afe^c dBAF|"Em"DEFD E2:|
|
| 42 |
+
|:gf|"Em"eB B2 efge|eB B2 gedB|"D"A2 FA DAFA|A2 FA defg|
|
| 43 |
+
"Em"eB B2 eBgB|eB B2 defg|"D"afe^c dBAF|"Em"DEFD E2:|`;
|
| 44 |
+
|
| 45 |
+
nextTick().then(() => {
|
| 46 |
+
eval(this.sheetMusicJsNode)
|
| 47 |
+
})
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
</script>
|
| 52 |
+
|
| 53 |
+
<style>
|
| 54 |
+
.sandbox-output .demo {
|
| 55 |
+
border: 1px solid #888888;
|
| 56 |
+
padding: 10px;
|
| 57 |
+
background: #fefffa;
|
| 58 |
+
box-shadow: -1px -1px 1px #aaaaaa, 1px 2px 4px #aaaaaa;
|
| 59 |
+
border-top: none;
|
| 60 |
+
border-left: none;
|
| 61 |
+
width: 800px;
|
| 62 |
+
transform: scale(.9);
|
| 63 |
+
transform-origin: top left;
|
| 64 |
+
transition: opacity 4s cubic-bezier(.25,.8,.25,1);
|
| 65 |
+
opacity: 0;
|
| 66 |
+
}
|
| 67 |
+
.sandbox-output .demo.running {
|
| 68 |
+
opacity: 1;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.sandbox-output #paper {
|
| 72 |
+
max-width: 780px;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.sandbox-output button {
|
| 76 |
+
font-size: 1em;
|
| 77 |
+
padding: 5px 10px;
|
| 78 |
+
background: #e2fdf1;
|
| 79 |
+
border: 1px solid #5c5c5c;
|
| 80 |
+
border-radius: 4px;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.sandbox-output button:hover {
|
| 84 |
+
background-color: #3FB07C;
|
| 85 |
+
color: white;
|
| 86 |
+
}
|
| 87 |
+
</style>
|
docs/.vuepress/components/ShowAndRenderAbc.vue
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="show-and-render">
|
| 3 |
+
<div class="language- extra-class"><pre class="language-text"><code>{{abc}}</code></pre></div>
|
| 4 |
+
<render-abc :abc="abc" :options="options"></render-abc>
|
| 5 |
+
</div>
|
| 6 |
+
</template>
|
| 7 |
+
|
| 8 |
+
<script>
|
| 9 |
+
import { waitForAbcjs } from '../wait-for-abcjs';
|
| 10 |
+
import RenderAbc from "./RenderAbc.vue";
|
| 11 |
+
export default {
|
| 12 |
+
name: "show-and-render-abc",
|
| 13 |
+
components: {RenderAbc},
|
| 14 |
+
props: {
|
| 15 |
+
abc: {
|
| 16 |
+
type: String,
|
| 17 |
+
required: true
|
| 18 |
+
},
|
| 19 |
+
options: {
|
| 20 |
+
type: Object,
|
| 21 |
+
required: false,
|
| 22 |
+
default: {}
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
data() {
|
| 26 |
+
return {
|
| 27 |
+
visualObj: null,
|
| 28 |
+
defaultOptions: { paddingleft: 0, paddingright: 0, responsive: "resize" },
|
| 29 |
+
};
|
| 30 |
+
},
|
| 31 |
+
async mounted() {
|
| 32 |
+
await waitForAbcjs()
|
| 33 |
+
const el = this.$refs.paper;
|
| 34 |
+
this.visualObj = ABCJS.renderAbc(el, this.abc, this.defaultOptions);
|
| 35 |
+
},
|
| 36 |
+
methods: {
|
| 37 |
+
getObj() {
|
| 38 |
+
return this.visualObj[0];
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
</script>
|
docs/.vuepress/components/TimingCallbacks.vue
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<div class="timing-callbacks">
|
| 3 |
+
<form @submit.prevent="startTiming">
|
| 4 |
+
<div class="language- my-code">
|
| 5 |
+
<div>timer = new abcjs.TimingCallbacks(visualObj, {</div>
|
| 6 |
+
<label>
|
| 7 |
+
<span>qpm: </span>
|
| 8 |
+
<input type="number" min="4" max="300" step="4" v-model="qpm">,
|
| 9 |
+
</label>
|
| 10 |
+
<label>
|
| 11 |
+
<span>extraMeasuresAtBeginning: </span>
|
| 12 |
+
<input type="number" min="0" max="4" v-model="extraMeasuresAtBeginning">,
|
| 13 |
+
</label>
|
| 14 |
+
<label>
|
| 15 |
+
<span>lineEndAnticipation: </span>
|
| 16 |
+
<input type="number" min="0" max="4000" step="100" v-model="lineEndAnticipation">,
|
| 17 |
+
</label>
|
| 18 |
+
<label>
|
| 19 |
+
<span>beatSubdivisions: </span>
|
| 20 |
+
<input type="number" min="1" max="8" v-model="beatSubdivisions">,
|
| 21 |
+
</label>
|
| 22 |
+
<div></div>
|
| 23 |
+
<div class="label-indent">beatCallback: function() {...},</div>
|
| 24 |
+
<div class="label-indent">eventCallback: function() {...},</div>
|
| 25 |
+
<div class="label-indent">lineEndCallback: function() {...}</div>
|
| 26 |
+
<div>}</div>
|
| 27 |
+
</div>
|
| 28 |
+
<button type="submit">Start()</button>
|
| 29 |
+
</form>
|
| 30 |
+
<button @click="stopTiming">Stop()</button>
|
| 31 |
+
<button @click="pauseTiming">Pause()</button>
|
| 32 |
+
<button @click="resetTiming">Reset()</button>
|
| 33 |
+
<button @click="setProgress">Set Progress(10)</button>
|
| 34 |
+
<div>
|
| 35 |
+
<h3>Output Stream:</h3>
|
| 36 |
+
<div class="output" v-html="outputStream"></div>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
</template>
|
| 40 |
+
|
| 41 |
+
<script>
|
| 42 |
+
import { nextTick } from 'vue';
|
| 43 |
+
|
| 44 |
+
export default {
|
| 45 |
+
name: "timing-callbacks",
|
| 46 |
+
watch: {
|
| 47 |
+
},
|
| 48 |
+
props: {
|
| 49 |
+
target: {
|
| 50 |
+
type: String,
|
| 51 |
+
required: true
|
| 52 |
+
},
|
| 53 |
+
},
|
| 54 |
+
data() {
|
| 55 |
+
return {
|
| 56 |
+
abcjs: null,
|
| 57 |
+
visualObj: null,
|
| 58 |
+
timer: null,
|
| 59 |
+
|
| 60 |
+
outputStream: "",
|
| 61 |
+
|
| 62 |
+
qpm: 100,
|
| 63 |
+
extraMeasuresAtBeginning: 0,
|
| 64 |
+
lineEndAnticipation: 500,
|
| 65 |
+
beatSubdivisions: 4,
|
| 66 |
+
}
|
| 67 |
+
},
|
| 68 |
+
// mounted() {
|
| 69 |
+
// nextTick(() => {
|
| 70 |
+
// this.redraw();
|
| 71 |
+
// });
|
| 72 |
+
// },
|
| 73 |
+
methods: {
|
| 74 |
+
// redraw() {
|
| 75 |
+
// console.log("redraw")
|
| 76 |
+
// },
|
| 77 |
+
startTiming() {
|
| 78 |
+
const abc = document.getElementById("abc").value;
|
| 79 |
+
this.visualObj = window.abcjs.renderAbc("*", abc)[0];
|
| 80 |
+
console.log("startTiming",{
|
| 81 |
+
qpm: this.qpm,
|
| 82 |
+
extraMeasuresAtBeginning: this.extraMeasuresAtBeginning,
|
| 83 |
+
lineEndAnticipation: this.lineEndAnticipation,
|
| 84 |
+
beatSubdivisions: this.beatSubdivisions,
|
| 85 |
+
})
|
| 86 |
+
this.timer = new window.abcjs.TimingCallbacks(this.visualObj, {
|
| 87 |
+
qpm: this.qpm,
|
| 88 |
+
extraMeasuresAtBeginning: this.extraMeasuresAtBeginning,
|
| 89 |
+
lineEndAnticipation: this.lineEndAnticipation,
|
| 90 |
+
beatSubdivisions: this.beatSubdivisions,
|
| 91 |
+
|
| 92 |
+
beatCallback: this.beatCallback,
|
| 93 |
+
eventCallback: this.eventCallback,
|
| 94 |
+
lineEndCallback: this.lineEndCallback,
|
| 95 |
+
});
|
| 96 |
+
this.timer.start();
|
| 97 |
+
this.outputStream = "";
|
| 98 |
+
},
|
| 99 |
+
stopTiming() {
|
| 100 |
+
if (!this.timer) return;
|
| 101 |
+
this.timer.stop();
|
| 102 |
+
},
|
| 103 |
+
pauseTiming() {
|
| 104 |
+
if (!this.timer) return;
|
| 105 |
+
this.timer.pause();
|
| 106 |
+
},
|
| 107 |
+
resetTiming() {
|
| 108 |
+
if (!this.timer) return;
|
| 109 |
+
this.timer.reset();
|
| 110 |
+
this.outputStream = "";
|
| 111 |
+
},
|
| 112 |
+
setProgress() {
|
| 113 |
+
if (!this.timer) return;
|
| 114 |
+
this.timer.setProgress(10);
|
| 115 |
+
this.outputStream = "";
|
| 116 |
+
},
|
| 117 |
+
beatCallback(beatNumber, totalBeats, totalTime) {
|
| 118 |
+
this.outputStream += `<div class="beat-callback"><div class="header">BEAT CALLBACK</div>
|
| 119 |
+
<div class="data">beatNumber = ${beatNumber}, totalBeats = ${totalBeats}, totalTime = ${totalTime}</div>
|
| 120 |
+
</div>`;
|
| 121 |
+
},
|
| 122 |
+
eventCallback(ev) {
|
| 123 |
+
if (ev) {
|
| 124 |
+
delete ev.elements;
|
| 125 |
+
this.outputStream += `<div class="event-callback"><div class="header">EVENT CALLBACK</div>
|
| 126 |
+
<div class="data">${JSON.stringify(ev, null, "\t")}</div>
|
| 127 |
+
</div>`;
|
| 128 |
+
}
|
| 129 |
+
},
|
| 130 |
+
lineEndCallback( info, event, details) {
|
| 131 |
+
this.outputStream += `<div class="line-end-callback"><div class="header">LINE END CALLBACK</div>
|
| 132 |
+
<div class="data">${JSON.stringify(info, null, "\t")}</div>
|
| 133 |
+
<div class="data">${JSON.stringify(event, null, "\t")}</div>
|
| 134 |
+
<div class="data">${JSON.stringify(details, null, "\t")}</div>
|
| 135 |
+
</div>`;
|
| 136 |
+
},
|
| 137 |
+
},
|
| 138 |
+
}
|
| 139 |
+
</script>
|
| 140 |
+
|
| 141 |
+
<style scoped>
|
| 142 |
+
label, .label-indent {
|
| 143 |
+
display: block;
|
| 144 |
+
margin-left: 30px;
|
| 145 |
+
width: calc(100% - 30px);
|
| 146 |
+
}
|
| 147 |
+
label span {
|
| 148 |
+
display: inline-block;
|
| 149 |
+
width: 240px;
|
| 150 |
+
}
|
| 151 |
+
input {
|
| 152 |
+
width: 60px;
|
| 153 |
+
}
|
| 154 |
+
button {
|
| 155 |
+
background: #acffd9;
|
| 156 |
+
padding: 10px;
|
| 157 |
+
border-radius: 8px;
|
| 158 |
+
font-size: 1.2em;
|
| 159 |
+
border: none;
|
| 160 |
+
box-shadow: 3px 3px 3px #aaaaaa;
|
| 161 |
+
margin: 10px;
|
| 162 |
+
}
|
| 163 |
+
</style>
|
| 164 |
+
|
| 165 |
+
<style>
|
| 166 |
+
.timing-callbacks .output {
|
| 167 |
+
max-height: 600px;
|
| 168 |
+
overflow: auto;
|
| 169 |
+
}
|
| 170 |
+
.timing-callbacks .beat-callback {
|
| 171 |
+
padding: 4px;
|
| 172 |
+
margin-bottom: 4px;
|
| 173 |
+
background: #c8ffe6;
|
| 174 |
+
}
|
| 175 |
+
.timing-callbacks .event-callback {
|
| 176 |
+
padding: 4px;
|
| 177 |
+
margin-bottom: 4px;
|
| 178 |
+
background: #c8f2ff;
|
| 179 |
+
}
|
| 180 |
+
.timing-callbacks .line-end-callback {
|
| 181 |
+
padding: 4px;
|
| 182 |
+
margin-bottom: 4px;
|
| 183 |
+
background: #ffc8c8;
|
| 184 |
+
}
|
| 185 |
+
.timing-callbacks .output .header {
|
| 186 |
+
font-weight: bold;
|
| 187 |
+
}
|
| 188 |
+
</style>
|
| 189 |
+
|
docs/.vuepress/components/TuneBookInfo.vue
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<template>
|
| 2 |
+
<ClientOnly>
|
| 3 |
+
<div class="tune-book-info">
|
| 4 |
+
<label>Choose Tune:
|
| 5 |
+
<select v-model="currentTune" @change="setInfo">
|
| 6 |
+
<option v-for="tune in tuneNames" :key="tune">{{tune}}</option>
|
| 7 |
+
</select>
|
| 8 |
+
</label>
|
| 9 |
+
<div class="language- my-code" v-if="currentTune">
|
| 10 |
+
<div>const info = tunebook.{{functionString}}("{{currentTune}}");</div>
|
| 11 |
+
<div>console.log(info);</div>
|
| 12 |
+
<div class="code-results" v-html="currentInfo"></div>
|
| 13 |
+
</div>
|
| 14 |
+
</div>
|
| 15 |
+
</ClientOnly>
|
| 16 |
+
</template>
|
| 17 |
+
|
| 18 |
+
<script>
|
| 19 |
+
export default {
|
| 20 |
+
name: "tune-book-info",
|
| 21 |
+
props: {
|
| 22 |
+
type: {
|
| 23 |
+
type: String,
|
| 24 |
+
required: true
|
| 25 |
+
},
|
| 26 |
+
},
|
| 27 |
+
computed: {
|
| 28 |
+
functionString() {
|
| 29 |
+
if (this.type === 'title') return "getTuneByTitle";
|
| 30 |
+
else return "getTuneById";
|
| 31 |
+
},
|
| 32 |
+
},
|
| 33 |
+
data() {
|
| 34 |
+
return {
|
| 35 |
+
tuneNames: [],
|
| 36 |
+
currentTune: "",
|
| 37 |
+
currentInfo: "",
|
| 38 |
+
abcjs: null,
|
| 39 |
+
tunebook: null,
|
| 40 |
+
};
|
| 41 |
+
},
|
| 42 |
+
methods: {
|
| 43 |
+
redraw(tunebookString) {
|
| 44 |
+
this.tunebook = new window.abcjs.TuneBook(tunebookString);
|
| 45 |
+
if (this.type === "title") {
|
| 46 |
+
this.tuneNames = this.tunebook.tunes.map(tune => {
|
| 47 |
+
return tune.title;
|
| 48 |
+
});
|
| 49 |
+
} else {
|
| 50 |
+
this.tuneNames = this.tunebook.tunes.map(tune => {
|
| 51 |
+
return tune.id;
|
| 52 |
+
});
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
+
setInfo() {
|
| 56 |
+
let info;
|
| 57 |
+
if (this.type === "title")
|
| 58 |
+
info = this.tunebook.getTuneByTitle(this.currentTune);
|
| 59 |
+
else
|
| 60 |
+
info = this.tunebook.getTuneById(this.currentTune);
|
| 61 |
+
this.currentInfo = `{
|
| 62 |
+
id: "${info.id}",
|
| 63 |
+
title: "${info.title}",
|
| 64 |
+
startPos: ${info.startPos},
|
| 65 |
+
abc: "${this.abcSnippet(info.abc)}",
|
| 66 |
+
pure: "${this.abcSnippet(info.pure)}",
|
| 67 |
+
}`;
|
| 68 |
+
this.currentInfo = this.currentInfo.replace(/\n/g, "<br>");
|
| 69 |
+
},
|
| 70 |
+
sanitizeAbcString(abc) {
|
| 71 |
+
return abc.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
| 72 |
+
},
|
| 73 |
+
abcSnippet(abc) {
|
| 74 |
+
return this.sanitizeAbcString(abc.substring(0, 50)).replace(/\n/g, "\\n") + '...';
|
| 75 |
+
},
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
</script>
|
| 79 |
+
|
| 80 |
+
<style scoped>
|
| 81 |
+
label {
|
| 82 |
+
margin-bottom: 10px;
|
| 83 |
+
display: inline-block;
|
| 84 |
+
}
|
| 85 |
+
</style>
|
docs/.vuepress/components/example-strings-css.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
export const cssString = (hasAudio, hasCursor, hideMeasures, allowDragging, usingCallbacks) => {
|
| 3 |
+
let css = [];
|
| 4 |
+
if (hasAudio)
|
| 5 |
+
css.push(`<link rel="stylesheet" type="text/css" href="abcjs-audio.css">`);
|
| 6 |
+
if (hasCursor)
|
| 7 |
+
css.push(`<style>
|
| 8 |
+
.abcjs-highlight {
|
| 9 |
+
fill: #0a9ecc;
|
| 10 |
+
}
|
| 11 |
+
.abcjs-cursor {
|
| 12 |
+
stroke: red;
|
| 13 |
+
}
|
| 14 |
+
</style>
|
| 15 |
+
`);
|
| 16 |
+
if (hideMeasures) {
|
| 17 |
+
css.push(`<style>
|
| 18 |
+
.hide-note {
|
| 19 |
+
opacity: 0;
|
| 20 |
+
transition: opacity .5s ease;
|
| 21 |
+
}
|
| 22 |
+
</style>
|
| 23 |
+
`)
|
| 24 |
+
}
|
| 25 |
+
if (allowDragging) {
|
| 26 |
+
css.push(`<style>
|
| 27 |
+
#source {
|
| 28 |
+
font-size: 18px;
|
| 29 |
+
max-width: 700px;
|
| 30 |
+
overflow: auto;
|
| 31 |
+
font-family: "Lucida Console", Monaco, monospace;
|
| 32 |
+
white-space: nowrap;
|
| 33 |
+
}
|
| 34 |
+
.select {
|
| 35 |
+
background-color: #FCF9BB;
|
| 36 |
+
box-shadow: 0 0 1px black;
|
| 37 |
+
}
|
| 38 |
+
</style>
|
| 39 |
+
`)
|
| 40 |
+
}
|
| 41 |
+
if (usingCallbacks) {
|
| 42 |
+
css.push(`<style>
|
| 43 |
+
.clicked-info {
|
| 44 |
+
height: 200px;
|
| 45 |
+
}
|
| 46 |
+
.instructions {
|
| 47 |
+
color: red;
|
| 48 |
+
font-size: 2em;
|
| 49 |
+
font-style: italic;
|
| 50 |
+
}
|
| 51 |
+
</style>
|
| 52 |
+
`)
|
| 53 |
+
}
|
| 54 |
+
return css.join("\n");
|
| 55 |
+
};
|
docs/.vuepress/components/example-strings-js-audio.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const soundJsString = ((usingNode, getters) => {
|
| 2 |
+
if (!getters.hasSound)
|
| 3 |
+
return "";
|
| 4 |
+
const abcjs = usingNode ? "abcjs" : "ABCJS";
|
| 5 |
+
|
| 6 |
+
let output = `document.querySelector(".activate-audio").addEventListener("click", activate);
|
| 7 |
+
function activate() {
|
| 8 |
+
if (${abcjs}.synth.supportsAudio()) {
|
| 9 |
+
`;
|
| 10 |
+
|
| 11 |
+
if (getters.playbackWidget) {
|
| 12 |
+
let controlOptions = []
|
| 13 |
+
if (getters.loop) controlOptions.push("\t\t\tdisplayLoop: true");
|
| 14 |
+
if (getters.restart) controlOptions.push("\t\t\tdisplayRestart: true");
|
| 15 |
+
if (getters.play) controlOptions.push("\t\t\tdisplayPlay: true");
|
| 16 |
+
if (getters.progress) controlOptions.push("\t\t\tdisplayProgress: true");
|
| 17 |
+
if (getters.warp) controlOptions.push("\t\t\tdisplayWarp: true");
|
| 18 |
+
if (getters.clock) controlOptions.push("\t\t\tdisplayClock: true");
|
| 19 |
+
output += `\t\tvar controlOptions = {\n${controlOptions.join(",\n")}\n\t\t};\n`
|
| 20 |
+
}
|
| 21 |
+
let options = [];
|
| 22 |
+
let optionsOptions = [];
|
| 23 |
+
if (getters.tempo) options.push("millisecondsPerMeasure: 800");
|
| 24 |
+
if (getters.stereo) optionsOptions.push("pan: [-.5,.5]");
|
| 25 |
+
// if (getters.instrument) options.push("instrument");
|
| 26 |
+
// if (getters.transpose) options.push("transpose");
|
| 27 |
+
if (getters.noChords) options.push("chordsOff: true");
|
| 28 |
+
if (getters.noVoice) options.push("voicesOff: true");
|
| 29 |
+
// if (getters.tweak) options.push("tweak");
|
| 30 |
+
if (getters.midi) options.push("midi");
|
| 31 |
+
// if (getters.playImmediate) options.push("immediate");
|
| 32 |
+
// if (getters.switchTunes) options.push("switchtunes");
|
| 33 |
+
// if (getters.hideVoice) options.push("hideVoice");
|
| 34 |
+
// if (getters.preload) options.push("preload");
|
| 35 |
+
// if (getters.loopMeasures) options.push("loopmeasures");
|
| 36 |
+
if (getters.swingFeel) options.push("swing");
|
| 37 |
+
if (getters.soundfont) optionsOptions.push("soundfont: '/path/to/soundfont/'");
|
| 38 |
+
options.push("options: {\n\t\t\t\t"+optionsOptions.join(",\n\t\t\t\t") + "\n\t\t\t}\n")
|
| 39 |
+
|
| 40 |
+
output += `\t\tvar synthControl = new ${abcjs}.synth.SynthController();\n`;
|
| 41 |
+
var cursorControl = getters.cursor ? "cursorControl" : "null";
|
| 42 |
+
output += `\t\tsynthControl.load("#audio", ${cursorControl}, controlOptions);\n`;
|
| 43 |
+
|
| 44 |
+
output += ` synthControl.disable(true);
|
| 45 |
+
var midiBuffer = new ${abcjs}.synth.CreateSynth();
|
| 46 |
+
midiBuffer.init({
|
| 47 |
+
visualObj: visualObj[0],
|
| 48 |
+
${options.join(",\n\t\t\t")}
|
| 49 |
+
}).then(function () {
|
| 50 |
+
synthControl.setTune(visualObj[0], true).then(function (response) {
|
| 51 |
+
document.querySelector(".abcjs-inline-audio").classList.remove("disabled");
|
| 52 |
+
\t\t\t})
|
| 53 |
+
});
|
| 54 |
+
`;
|
| 55 |
+
|
| 56 |
+
output += `\t} else {
|
| 57 |
+
console.log("audio is not supported on this browser");
|
| 58 |
+
};
|
| 59 |
+
}
|
| 60 |
+
`
|
| 61 |
+
return output
|
| 62 |
+
})
|
| 63 |
+
|
| 64 |
+
const str = `
|
| 65 |
+
if (ABCJS.synth.supportsAudio()) {
|
| 66 |
+
\tvar synthControl = new ABCJS.synth.SynthController();
|
| 67 |
+
\tsynthControl.load("#audio",
|
| 68 |
+
cursorControl,
|
| 69 |
+
{
|
| 70 |
+
displayLoop: true,
|
| 71 |
+
displayRestart: true,
|
| 72 |
+
displayPlay: true,
|
| 73 |
+
displayProgress: true,
|
| 74 |
+
displayWarp: true
|
| 75 |
+
}
|
| 76 |
+
);
|
| 77 |
+
|
| 78 |
+
var audioParams = { chordsOff: true };
|
| 79 |
+
|
| 80 |
+
\tvar createSynth = new ABCJS.synth.CreateSynth();
|
| 81 |
+
\tcreateSynth.init({ visualObj: visualObj[0] }).then(function () {
|
| 82 |
+
\t\tsynthControl.setTune(visualObj[0], false, audioParams).then(function () {
|
| 83 |
+
\t\t\tconsole.log("Audio successfully loaded.")
|
| 84 |
+
\t\t}).catch(function (error) {
|
| 85 |
+
\t\t\tconsole.warn("Audio problem:", error);
|
| 86 |
+
\t\t});
|
| 87 |
+
\t}).catch(function (error) {
|
| 88 |
+
\t\tconsole.warn("Audio problem:", error);
|
| 89 |
+
\t});
|
| 90 |
+
} else {
|
| 91 |
+
\tdocument.querySelector("#audio").innerHTML =
|
| 92 |
+
"Audio is not supported in this browser.";
|
| 93 |
+
\t}
|
| 94 |
+
}`
|
| 95 |
+
////////////////////////////////////////////
|
| 96 |
+
|
| 97 |
+
// TODO-PER: from sheetMusicJs. To be integrated:
|
| 98 |
+
|
| 99 |
+
// const synthOptions = {}; // will be passed to mySynth.init
|
| 100 |
+
// const audioParams = {}; // will be passed to synthControl.setTune()
|
| 101 |
+
// const animationOptions = {}; // will be passed to startAnimation()
|
| 102 |
+
//
|
| 103 |
+
// if (getters.soundfont) {
|
| 104 |
+
// synthOptions.soundFontURL = 'URL';
|
| 105 |
+
// audioParams.soundFontURL = 'URL';
|
| 106 |
+
// }
|
| 107 |
+
//
|
| 108 |
+
// // VISUAL
|
| 109 |
+
// const animation = animationCode(getters, animationOptions);
|
| 110 |
+
//
|
| 111 |
+
// // AUDIO CONTROL
|
| 112 |
+
// const widget = audioControlCode(getters);
|
| 113 |
+
//
|
| 114 |
+
// // SOUND
|
| 115 |
+
// soundCode(getters, animationOptions, visualOptions, audioParams);
|
| 116 |
+
//
|
| 117 |
+
// // OTHER
|
| 118 |
+
// const other = otherCode(getters, synthOptions, audioParams);
|
| 119 |
+
//
|
| 120 |
+
// // RETURNED CODE
|
| 121 |
+
// return `
|
| 122 |
+
// var visualOptions = ${replaceFunctionPlaceholders(JSON.stringify(visualOptions))};
|
| 123 |
+
// var audioParams = ${JSON.stringify(audioParams)};
|
| 124 |
+
// var cursorControl = null;
|
| 125 |
+
// var synthOptions = { visualObj: visualObj[0], ...${JSON.stringify(synthOptions)} };
|
| 126 |
+
//
|
| 127 |
+
// ${changes}
|
| 128 |
+
//
|
| 129 |
+
// // trigger these on a user gesture:
|
| 130 |
+
// ${widget}
|
| 131 |
+
//
|
| 132 |
+
// ${animation} ${timing} ${other}`;
|
| 133 |
+
|
| 134 |
+
////////////////////////////////////////////
|
| 135 |
+
// TODO-PER: to be integrated
|
| 136 |
+
|
| 137 |
+
// const audioControlCode = (sandbox) => {
|
| 138 |
+
// if (!sandbox.playbackWidget) {
|
| 139 |
+
// return `var mySynth = new ABCJS.synth.CreateSynth();
|
| 140 |
+
// mySynth.init(synthOptions).then(() => {
|
| 141 |
+
// synth.prime().then(() => {
|
| 142 |
+
// start();
|
| 143 |
+
// });
|
| 144 |
+
// });`;
|
| 145 |
+
// }
|
| 146 |
+
//
|
| 147 |
+
// return `var mySynth = new ABCJS.synth.CreateSynth();
|
| 148 |
+
// var synthControl = new synth.SynthController();
|
| 149 |
+
// var mySynth = new ABCJS.synth.CreateSynth();
|
| 150 |
+
//
|
| 151 |
+
// mySynth.init(synthOptions).then(function() {
|
| 152 |
+
// synthControl.setTune(visualObj[0], true, audioParams)
|
| 153 |
+
// .then(function(){
|
| 154 |
+
// console.log('Audio successfully loaded.')
|
| 155 |
+
// }).catch(function(error) {
|
| 156 |
+
// console.warn('Audio problem: ', error);
|
| 157 |
+
// })
|
| 158 |
+
// });
|
| 159 |
+
//
|
| 160 |
+
// synthControl.load('#audio', cursorControl, {
|
| 161 |
+
// displayLoop: ${sandbox.loop},
|
| 162 |
+
// displayRestart: ${sandbox.restart},
|
| 163 |
+
// displayPlay: ${sandbox.play},
|
| 164 |
+
// displayProgress: ${sandbox.progress},
|
| 165 |
+
// displayWarp: ${sandbox.warp},
|
| 166 |
+
// displayClock: ${sandbox.clock}
|
| 167 |
+
// });`
|
| 168 |
+
// }
|
| 169 |
+
//
|
| 170 |
+
// const soundCode = (sandbox, animationOptions, visualOptions, audioParams) => {
|
| 171 |
+
// // TODO: How should a dev use these parameters if they do not have a playback widget to pass audioParams to?
|
| 172 |
+
// if(sandbox.metronome) console.log('metronome') // TODO
|
| 173 |
+
// if(sandbox.tempo) {
|
| 174 |
+
// animationOptions.bpm = 120;
|
| 175 |
+
// audioParams.qpm = 120;
|
| 176 |
+
// }
|
| 177 |
+
// if(sandbox.stereo) console.log('stereo') // TODO
|
| 178 |
+
// if(sandbox.instrument) audioParams.program = 0;
|
| 179 |
+
// if(sandbox.transpose) {
|
| 180 |
+
// visualOptions.visualTranspose = 0;
|
| 181 |
+
// audioParams.midiTranspose = 0;
|
| 182 |
+
// }
|
| 183 |
+
// if(sandbox.noChords) audioParams.chordsOff = true;
|
| 184 |
+
// if(sandbox.noVoice) audioParams.voicesOff = true;
|
| 185 |
+
// }
|
| 186 |
+
//
|
| 187 |
+
// const timingCode = (sandbox) => {
|
| 188 |
+
// if (!sandbox.usingCallbacks) return '';
|
| 189 |
+
//
|
| 190 |
+
// // TODO: Currently, both objects will be instantiated if user selects "Listen for callbacks". Suggestion to present TimingCallbacks and CursorControl as separate options in the sandbox.
|
| 191 |
+
// return `
|
| 192 |
+
// var timingCallbacks = new abcjs.TimingCallbacks(visualObj, {});
|
| 193 |
+
// cursorControl = new synth.CursorControl();`
|
| 194 |
+
// }
|
| 195 |
+
//
|
| 196 |
+
// const otherCode = (sandbox, synthOptions, audioParams) => {
|
| 197 |
+
// if(sandbox.tweak) {
|
| 198 |
+
// synthOptions.sequenceCallback = 'callback to change audio before it is buffered';
|
| 199 |
+
// audioParams.sequenceCallback = 'callback to change audio before it is buffered';
|
| 200 |
+
// }
|
| 201 |
+
// // TODO
|
| 202 |
+
// if(sandbox.playImmediate) {
|
| 203 |
+
// console.log('playImmediate')
|
| 204 |
+
// }
|
| 205 |
+
//
|
| 206 |
+
// // TODO: Midi is deprecated.
|
| 207 |
+
// return sandbox.midi ? `ABCJS.renderMidi("midi-download", abc, { generateDownload: true, generateInline: false });` : '';
|
| 208 |
+
// }
|
docs/.vuepress/components/example-strings-js-cursor.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {entryPoint} from "./example-strings-js";
|
| 2 |
+
|
| 3 |
+
const cursor1 = `
|
| 4 |
+
// This demonstrates two methods of indicating where the music is.
|
| 5 |
+
// 1) An element is created that is moved along for each note.
|
| 6 |
+
// 2) The currently being played note is given a class so that it can be transformed.
|
| 7 |
+
self.cursor = null; // This is the svg element that will move with the music.
|
| 8 |
+
self.rootSelector = rootSelector; // This is the same selector as the renderAbc call uses.
|
| 9 |
+
|
| 10 |
+
self.onStart = function() {
|
| 11 |
+
// This is called when the timer starts so we know the svg has been drawn by now.
|
| 12 |
+
// Create the cursor and add it to the sheet music's svg.
|
| 13 |
+
var svg = document.querySelector(self.rootSelector + " svg");
|
| 14 |
+
self.cursor = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
| 15 |
+
self.cursor.setAttribute("class", "abcjs-cursor");
|
| 16 |
+
self.cursor.setAttributeNS(null, 'x1', 0);
|
| 17 |
+
self.cursor.setAttributeNS(null, 'y1', 0);
|
| 18 |
+
self.cursor.setAttributeNS(null, 'x2', 0);
|
| 19 |
+
self.cursor.setAttributeNS(null, 'y2', 0);
|
| 20 |
+
svg.appendChild(self.cursor);
|
| 21 |
+
};
|
| 22 |
+
|
| 23 |
+
self.removeSelection = function() {
|
| 24 |
+
// Unselect any previously selected notes.
|
| 25 |
+
var lastSelection = document.querySelectorAll(self.rootSelector + " .abcjs-highlight");
|
| 26 |
+
for (var k = 0; k < lastSelection.length; k++)
|
| 27 |
+
lastSelection[k].classList.remove("abcjs-highlight");
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
`;
|
| 31 |
+
|
| 32 |
+
const cursor2 = `
|
| 33 |
+
// This is called every time a note or a rest is reached and contains the coordinates of it.
|
| 34 |
+
if (ev.measureStart && ev.left === null)
|
| 35 |
+
return; // this was the second part of a tie across a measure line. Just ignore it.
|
| 36 |
+
|
| 37 |
+
self.removeSelection();
|
| 38 |
+
|
| 39 |
+
// Select the currently selected notes.
|
| 40 |
+
for (var i = 0; i < ev.elements.length; i++ ) {
|
| 41 |
+
var note = ev.elements[i];
|
| 42 |
+
for (var j = 0; j < note.length; j++) {
|
| 43 |
+
note[j].classList.add("abcjs-highlight");
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
// Move the cursor to the location of the current note.
|
| 48 |
+
if (self.cursor) {
|
| 49 |
+
self.cursor.setAttribute("x1", ev.left - 2);
|
| 50 |
+
self.cursor.setAttribute("x2", ev.left - 2);
|
| 51 |
+
self.cursor.setAttribute("y1", ev.top);
|
| 52 |
+
self.cursor.setAttribute("y2", ev.top + ev.height);
|
| 53 |
+
}
|
| 54 |
+
`;
|
| 55 |
+
|
| 56 |
+
const cursor3 = ` self.removeSelection();
|
| 57 |
+
|
| 58 |
+
if (self.cursor) {
|
| 59 |
+
self.cursor.setAttribute("x1", 0);
|
| 60 |
+
self.cursor.setAttribute("x2", 0);
|
| 61 |
+
self.cursor.setAttribute("y1", 0);
|
| 62 |
+
self.cursor.setAttribute("y2", 0);
|
| 63 |
+
}
|
| 64 |
+
`;
|
| 65 |
+
|
| 66 |
+
const hide1 = ` if (ev.measureStart) {
|
| 67 |
+
var elements = document.querySelectorAll('.abcjs-mm' + ev.measureNumber);
|
| 68 |
+
for (var j = 0; j < elements.length; j++) {
|
| 69 |
+
const element = elements[j];
|
| 70 |
+
if (!element.classList.contains('abcjs-bar'))
|
| 71 |
+
element.classList.add('hide-note');
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
`;
|
| 75 |
+
|
| 76 |
+
const hide2 = `
|
| 77 |
+
var elements = document.querySelectorAll('.hide-note');
|
| 78 |
+
for (var j = 0; j < elements.length; j++) {
|
| 79 |
+
const element = elements[j];
|
| 80 |
+
element.classList.remove('hide-note');
|
| 81 |
+
}
|
| 82 |
+
`;
|
| 83 |
+
|
| 84 |
+
const cursorString = (usingNode, hasCursor, hideMeasures) => {
|
| 85 |
+
return `function CursorControl(rootSelector) {
|
| 86 |
+
var self = this;
|
| 87 |
+
${hasCursor ? cursor1 : '' }
|
| 88 |
+
self.onEvent = function(ev) {
|
| 89 |
+
${hasCursor ? cursor2 : '' }
|
| 90 |
+
${hideMeasures ? hide1 : '' }
|
| 91 |
+
|
| 92 |
+
};
|
| 93 |
+
self.onFinished = function() {
|
| 94 |
+
${hasCursor ? cursor3 : '' }
|
| 95 |
+
${hideMeasures ? hide2 : '' }
|
| 96 |
+
};
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
var cursorControl = new CursorControl("#paper");
|
| 100 |
+
|
| 101 |
+
document.querySelector(".start").addEventListener("click", startTimer);
|
| 102 |
+
|
| 103 |
+
function onEvent(ev) {
|
| 104 |
+
if (ev)
|
| 105 |
+
cursorControl.onEvent(ev);
|
| 106 |
+
else
|
| 107 |
+
cursorControl.onFinished();
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
function startTimer() {
|
| 111 |
+
${hasCursor ? 'cursorControl.onStart();' : '' }
|
| 112 |
+
|
| 113 |
+
var timingCallbacks = new ${usingNode ? 'abcjs' : 'ABCJS'}.TimingCallbacks(visualObj[0], {
|
| 114 |
+
eventCallback: onEvent
|
| 115 |
+
});
|
| 116 |
+
timingCallbacks.start();
|
| 117 |
+
}
|
| 118 |
+
`
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
export const cursorJsString = (usingNode, hasCursor, hideMeasures) => {
|
| 122 |
+
if (!hasCursor && !hideMeasures)
|
| 123 |
+
return '';
|
| 124 |
+
return cursorString(usingNode, hasCursor, hideMeasures);
|
| 125 |
+
};
|
| 126 |
+
|
docs/.vuepress/components/example-strings-js-drag.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const dragJsString = (usingNode, allowDragging) => {
|
| 2 |
+
if (!allowDragging)
|
| 3 |
+
return '';
|
| 4 |
+
|
| 5 |
+
return `function sanitize(str) {
|
| 6 |
+
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
| 7 |
+
}
|
| 8 |
+
function formatAbc(start, end) {
|
| 9 |
+
var abc;
|
| 10 |
+
if (start < 0 || end < 0)
|
| 11 |
+
abc = sanitize(abcString);
|
| 12 |
+
else {
|
| 13 |
+
abc = sanitize(abcString.substring(0, start)) +
|
| 14 |
+
'<span class="select">' +
|
| 15 |
+
sanitize(abcString.substring(start, end)) +
|
| 16 |
+
'</span>' +
|
| 17 |
+
sanitize(abcString.substring(end));
|
| 18 |
+
}
|
| 19 |
+
var el = document.getElementById("source");
|
| 20 |
+
el.innerHTML = abc.replace(/\\n/g,"<br>");
|
| 21 |
+
}
|
| 22 |
+
function draw() {
|
| 23 |
+
var options = {
|
| 24 |
+
add_classes: true,
|
| 25 |
+
selectionColor: "green",
|
| 26 |
+
dragColor: "blue",
|
| 27 |
+
clickListener: clickListener,
|
| 28 |
+
dragging: true,
|
| 29 |
+
selectTypes: [ 'note' ]
|
| 30 |
+
};
|
| 31 |
+
|
| 32 |
+
${usingNode ? 'abcjs' : 'ABCJS'}.renderAbc("paper", abcString, options);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
var allPitches = [
|
| 36 |
+
'C,,,,', 'D,,,,', 'E,,,,', 'F,,,,', 'G,,,,', 'A,,,,', 'B,,,,',
|
| 37 |
+
'C,,,', 'D,,,', 'E,,,', 'F,,,', 'G,,,', 'A,,,', 'B,,,',
|
| 38 |
+
'C,,', 'D,,', 'E,,', 'F,,', 'G,,', 'A,,', 'B,,',
|
| 39 |
+
'C,', 'D,', 'E,', 'F,', 'G,', 'A,', 'B,',
|
| 40 |
+
'C', 'D', 'E', 'F', 'G', 'A', 'B',
|
| 41 |
+
'c', 'd', 'e', 'f', 'g', 'a', 'b',
|
| 42 |
+
"c'", "d'", "e'", "f'", "g'", "a'", "b'",
|
| 43 |
+
"c''", "d''", "e''", "f''", "g''", "a''", "b''",
|
| 44 |
+
"c'''", "d'''", "e'''", "f'''", "g'''", "a'''", "b'''",
|
| 45 |
+
"c''''", "d''''", "e''''", "f''''", "g''''", "a''''", "b''''"
|
| 46 |
+
];
|
| 47 |
+
|
| 48 |
+
function moveNote(note, step) {
|
| 49 |
+
var x =allPitches.indexOf(note);
|
| 50 |
+
if (x >= 0)
|
| 51 |
+
return allPitches[x-step];
|
| 52 |
+
return note;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
function tokenize(str) {
|
| 56 |
+
var arr = str.split(/(!.+?!|".+?")/);
|
| 57 |
+
var output = [];
|
| 58 |
+
for (var i = 0; i < arr.length; i++) {
|
| 59 |
+
var token = arr[i];
|
| 60 |
+
if (token.length > 0) {
|
| 61 |
+
if (token[0] !== '"' && token[0] !== '!') {
|
| 62 |
+
var arr2 = arr[i].split(/([A-Ga-g][,']*)/);
|
| 63 |
+
output = output.concat(arr2);
|
| 64 |
+
} else
|
| 65 |
+
output.push(token);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
return output;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
var selectionCallback;
|
| 72 |
+
var currentIndex = -1;
|
| 73 |
+
var maxIndex = -1;
|
| 74 |
+
|
| 75 |
+
function clickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent) {
|
| 76 |
+
if (drag) {
|
| 77 |
+
selectionCallback = drag.setSelection;
|
| 78 |
+
currentIndex = drag.index;
|
| 79 |
+
maxIndex = drag.max;
|
| 80 |
+
}
|
| 81 |
+
if (abcelem.pitches && drag && drag.step && abcelem.startChar >= 0 && abcelem.endChar >= 0) {
|
| 82 |
+
var originalText = abcString.substring(abcelem.startChar, abcelem.endChar);
|
| 83 |
+
var arr = tokenize(originalText);
|
| 84 |
+
// arr now contains elements that are either a chord, a decoration, a note name, or anything else. It can be put back to its original string with .join("").
|
| 85 |
+
for (var i = 0; i < arr.length; i++) {
|
| 86 |
+
arr[i] = moveNote(arr[i], drag.step);
|
| 87 |
+
}
|
| 88 |
+
var newText = arr.join("");
|
| 89 |
+
|
| 90 |
+
abcString = abcString.substring(0, abcelem.startChar) + newText + abcString.substring(abcelem.endChar);
|
| 91 |
+
formatAbc(abcelem.startChar, abcelem.endChar);
|
| 92 |
+
draw();
|
| 93 |
+
} else if (abcelem.startChar >= 0 && abcelem.endChar >= 0)
|
| 94 |
+
formatAbc(abcelem.startChar, abcelem.endChar);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
formatAbc(-1,-1);
|
| 98 |
+
draw();
|
| 99 |
+
`
|
| 100 |
+
};
|
docs/.vuepress/components/example-strings-js.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function entryPoint(usingNode) {
|
| 2 |
+
return usingNode ? 'abcjs' : 'ABCJS';
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
function target(sheetMusic) {
|
| 6 |
+
return sheetMusic ? 'paper' : '*';
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
export const renderAbcString = (usingNode, hasRender, showMusic, visualOptions) => {
|
| 10 |
+
if (!hasRender)
|
| 11 |
+
return '';
|
| 12 |
+
|
| 13 |
+
return `var visualOptions = ${visualOptions};
|
| 14 |
+
var visualObj = ${entryPoint(usingNode)}.renderAbc("${target(showMusic)}", abcString, visualOptions);`
|
| 15 |
+
};
|
| 16 |
+
|
| 17 |
+
export const editorJsString = (usingNode, hasEditor, showMusic) => {
|
| 18 |
+
if (!hasEditor)
|
| 19 |
+
return '';
|
| 20 |
+
|
| 21 |
+
return `var options = {};
|
| 22 |
+
var editor = new ${entryPoint(usingNode)}.Editor("abc", {
|
| 23 |
+
canvas_id: "${target(showMusic)}",
|
| 24 |
+
warnings_id: "warnings",
|
| 25 |
+
abcjsParams: options
|
| 26 |
+
});`
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
export const visualOptionsString = (responsive, callbacks, metronome, hideMeasures, jazzChords) => {
|
| 30 |
+
let options = [];
|
| 31 |
+
if (responsive)
|
| 32 |
+
options.push("responsive: 'resize'");
|
| 33 |
+
if (callbacks) {
|
| 34 |
+
options.push("clickListener: clickListener");
|
| 35 |
+
}
|
| 36 |
+
if (callbacks || hideMeasures) {
|
| 37 |
+
options.push("add_classes: true");
|
| 38 |
+
}
|
| 39 |
+
if (jazzChords) {
|
| 40 |
+
options.push("jazzchords: true");
|
| 41 |
+
}
|
| 42 |
+
if (metronome)
|
| 43 |
+
options.push("drum: 'dddd 76 77 77 77 60 30 30 30'");
|
| 44 |
+
return "{ " + options.join(", ") + " }";
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
export const clickListenerJsString = (callbacks) => {
|
| 48 |
+
if (!callbacks)
|
| 49 |
+
return '';
|
| 50 |
+
return `function clickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent) {
|
| 51 |
+
var output = "abcelem: [Object]<br>tuneNumber: " + tuneNumber + "<br>classes: " + classes + "<br>analysis: " + JSON.stringify(analysis) + "<br>drag: " + JSON.stringify(drag) + "<br>mouseEvent: { clientX: " + mouseEvent.clientX + ", clientY: " + mouseEvent.clientY + " }";
|
| 52 |
+
document.querySelector(".clicked-info").innerHTML = "<div class='label'>Clicked info:</div>" + output;
|
| 53 |
+
}
|
| 54 |
+
`;
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
///////////////////////////
|
| 59 |
+
|
| 60 |
+
const replaceFunctionPlaceholders = (stringifiedObject) => {
|
| 61 |
+
return stringifiedObject
|
| 62 |
+
.replace("\"__FUNCTION_PLACEHOLDER_CLICK_LISTENER__\"", CLICK_LISTENER_FUNCTION);
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
const animationCode = (sandbox, animationOptions) => {
|
| 66 |
+
if (sandbox.cursor || sandbox.hideMeasures) {
|
| 67 |
+
if (sandbox.cursor) {
|
| 68 |
+
animationOptions.showCursor = true;
|
| 69 |
+
}
|
| 70 |
+
if (sandbox.hideMeasures) {
|
| 71 |
+
animationOptions.hideFinishedMeasures = true;
|
| 72 |
+
}
|
| 73 |
+
// TODO: startAnimation() is deprecated.
|
| 74 |
+
return `
|
| 75 |
+
ABCJS.startAnimation(paper, abc_editor.tunes[0], ${JSON.stringify(animationOptions)});`
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
return '';
|
| 79 |
+
}
|
docs/.vuepress/components/example-strings.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const setupString = (isNode) => {
|
| 2 |
+
if (isNode)
|
| 3 |
+
return 'import abcjs from "abcjs"';
|
| 4 |
+
else
|
| 5 |
+
return '<script src="abcjs-basic.js" type="text/javascript"></script>';
|
| 6 |
+
};
|
| 7 |
+
|
| 8 |
+
export const paperString = (showMusic) => {
|
| 9 |
+
return showMusic ? '<div id="paper"></div>' : '';
|
| 10 |
+
};
|
| 11 |
+
|
| 12 |
+
export const editorString = (showEditor) => {
|
| 13 |
+
return showEditor ? '<textarea id="abc" cols="80" rows="12" spellcheck="false">X: 1\n' +
|
| 14 |
+
'T: Cooley\'s\n' +
|
| 15 |
+
'M: 4/4\n' +
|
| 16 |
+
'L: 1/8\n' +
|
| 17 |
+
'R: reel\n' +
|
| 18 |
+
'K: Emin\n' +
|
| 19 |
+
'|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|\n' +
|
| 20 |
+
'EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:|\n' +
|
| 21 |
+
'|:gf|eB B2 efge|eB B2 gedB|A2 FA DAFA|A2 FA defg|\n' +
|
| 22 |
+
'eB B2 eBgB|eB B2 defg|afe^c dBAF|DEFD E2:|\n' +
|
| 23 |
+
'</textarea>\n' +
|
| 24 |
+
'\n' +
|
| 25 |
+
'<div id="warnings">No errors</div>' : '';
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
export const audioString = (showAudio, isLarge) => {
|
| 29 |
+
let audio = '';
|
| 30 |
+
if (showAudio) {
|
| 31 |
+
if (isLarge) {
|
| 32 |
+
audio = `<div id="audio" class="abcjs-large"></div>`;
|
| 33 |
+
}
|
| 34 |
+
else audio = '<div id="audio"></div>';
|
| 35 |
+
audio += `<button class="activate-audio">Activate Audio</button>`
|
| 36 |
+
}
|
| 37 |
+
return audio;
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
export const midiString = (showMidi) => {
|
| 41 |
+
return showMidi ? '<div id="midi-download"></div>' : '';
|
| 42 |
+
};
|
| 43 |
+
|
| 44 |
+
export const clickListenerHtmlString = (clickListener) => {
|
| 45 |
+
return clickListener ? '<div class="clicked-info"><div class="instructions">Click on a note to see information about that note.</div></div>' : '';
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
export const dragExplanationHtmlString = (allowDragging) => {
|
| 49 |
+
return allowDragging ? '<p>Drag a note up and down and watch the source code change to match it.</p>' : '';
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
export const dragHtmlString = (allowDragging) => {
|
| 53 |
+
return allowDragging ? '<h2>Source</h2>\n' +
|
| 54 |
+
'<div id="source"></div>' : '';
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
export const startTimerHtmlString = (hasTimer) => {
|
| 58 |
+
if (!hasTimer)
|
| 59 |
+
return '';
|
| 60 |
+
return '<button class="start">Start</button>';
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
export const preambleString = (title) => {
|
| 64 |
+
return `<!DOCTYPE html>
|
| 65 |
+
<html lang="en">
|
| 66 |
+
<head>
|
| 67 |
+
<meta charset="utf-8">
|
| 68 |
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
| 69 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 70 |
+
|
| 71 |
+
<title>${title}</title>
|
| 72 |
+
`
|
| 73 |
+
};
|
| 74 |
+
|
| 75 |
+
export const preamble2String = (hasEditor) => {
|
| 76 |
+
const abcString = hasEditor ? '' : `var abcString = "T: Cooley's\\n" +
|
| 77 |
+
"M: 4/4\\n" +
|
| 78 |
+
"L: 1/8\\n" +
|
| 79 |
+
"R: reel\\n" +
|
| 80 |
+
"K: Emin\\n" +
|
| 81 |
+
"|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|\\n" +
|
| 82 |
+
"EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:|\\n" +
|
| 83 |
+
"|:gf|eB B2 efge|eB B2 gedB|A2 FA DAFA|A2 FA defg|\\n" +
|
| 84 |
+
"eB B2 eBgB|eB B2 defg|afe^c dBAF|DEFD E2:|";`;
|
| 85 |
+
|
| 86 |
+
return `<script src="abcjs-basic.js" type="text/javascript"></script>
|
| 87 |
+
<script type="text/javascript">
|
| 88 |
+
${abcString}
|
| 89 |
+
|
| 90 |
+
function load() {
|
| 91 |
+
`
|
| 92 |
+
};
|
| 93 |
+
|
| 94 |
+
export const middleString = (title) => `}\n</script>
|
| 95 |
+
</head>
|
| 96 |
+
<body onload="load()">
|
| 97 |
+
<header>
|
| 98 |
+
<h1>${title}</h1>
|
| 99 |
+
</header>
|
| 100 |
+
<div class="container">
|
| 101 |
+
`;
|
| 102 |
+
|
| 103 |
+
export const postAmbleString = () => `</div>
|
| 104 |
+
</body>
|
| 105 |
+
</html>
|
| 106 |
+
`;
|
| 107 |
+
|
docs/.vuepress/config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defaultTheme } from '@vuepress/theme-default'
|
| 2 |
+
export default {
|
| 3 |
+
base: "/abcjs/",
|
| 4 |
+
title: "abcjs",
|
| 5 |
+
description: "JavaScript library for displaying sheet music in a browser.",
|
| 6 |
+
theme: defaultTheme({
|
| 7 |
+
logo: '/img/abcjs_comp_extended_08.svg',
|
| 8 |
+
displayAllHeaders: true,
|
| 9 |
+
sidebar: require("./sidebar")
|
| 10 |
+
}),
|
| 11 |
+
head: [
|
| 12 |
+
['link', { rel: 'icon', href: '/abcjs/favicon.ico' }],
|
| 13 |
+
['link', { rel:"stylesheet", type: "text/css", href: 'https://paulrosen.github.io/abcjs/abcjs-audio.css'}],
|
| 14 |
+
['script', { src: "https://paulrosen.github.io/abcjs/dist/abcjs-basic.js", type:"text/javascript" }]
|
| 15 |
+
],
|
| 16 |
+
};
|
docs/.vuepress/public/favicon.ico
ADDED
|
|
docs/.vuepress/public/fonts/itim-music.svg
ADDED
|
|