Comments (5)
I know what you mean, but could you include an example ABC string anyway so
I can see the extent of what you are trying to do? If it is just a little
bit too large then sliding notes around might be reasonable, if it is way
too large, then I need to layer it.
On Fri, Apr 24, 2015 at 12:12 PM, David Randolph [email protected]
wrote:
The horizontal alignment of the notes seems to be fixed. So annotations
wider than two characters on two consecutive notes are allowed to draw over
each other. In my application, it is really important that all of the
annotations be legible. It would be nice if there were a way to tell ABCJS
to keep annotations aligned and visible (sliding the notes to the right as
needed). I realize this may be a tall order. Perhaps an easier option would
be to layer the annotations so they don't obscure each other. That would do
the trick.Many thanks for a great library.
—
Reply to this email directly or view it on GitHub
#32.
Paul Rosen
Performant Software Solutions, LLC
from abcjs.
Sure thing. Here is some ABC that should illustrate the problem:
X: 1
T: Cooley Snippet
M: 4/4
L: 1/8
R: reel
K: Emin
|:"^1/2"D2|"^2/3"E"^4/1"B"<2"{c}+1+B+3+A+5+ B2 +1+E+3+B|"^232323"~B2 "^121212"~B2 +5+d+3+B+2+A+1+G|+3+F+1+D+4+A+1+D BDAD|FDAD dAFD|
EBBA B2 EB|B2 AB defg|afe^c dBAF|DEFD E2:|
I am writing a little a collection tool for piano fingering data. (It lives at https://github.com/dvdrndlph/didactyl/tree/master/mdc.) Basically, pianists enter fingering values in a text box, and these are rendered in real time by your fine library. The problem is that some note heads (those marked with trill or grupetto marks and notes with different fingerings within different repeated sections, for example) require more than one character to annotate completely. The +1+ fingering annotations are not usable for this task, since they expect a single value 1-5. So I am using double-quote annotations.
A related problem appears with annotations for multiple grace notes, which cannot be placed with their specific note heads at all. As seen in the ABC above, I am annotating grace notes to the left of the main note. This can also lead to bits writing over each other.
I realize this may be a hard thing to get right, but it seems that each elements need to know how not to draw over other elements on the page. But anything you can do in your library (or any workarounds you could suggest) to mitigate these problems would be appreciated.
Thanks,
Dave
from abcjs.
Would you try this version and let me know if it works for you? https://github.com/paulrosen/abcjs/blob/master/bin/abcjs_basic_2.1b1-min.js
from abcjs.
Thanks for the quick turnaround. For my immediate purposes, this new version works great. The notes slide over nicely.
But I am thinking now that for most use cases, people might prefer a layered approach with some clever way to make sure no annotations overwrite any others.
Also, for general consumption, we would need some way to make these behaviors configurable.
Cheers,
Dave
from abcjs.
There can definitely be improvement here, but I'd like to get all reasonable examples to not touch first. I'll try to have the above code in an official version in the next couple weeks.
from abcjs.
Related Issues (20)
- TimingCallbacks clarification/bug? HOT 3
- Revisiting server-side rendering SVG
- Audio is not playing on mobile Safari (iPhone) HOT 2
- Direct Midi Render? HOT 1
- Is it possible to add numbered musical notation? HOT 2
- Changing accent position HOT 3
- Adjust the tempo compared to the ABC HOT 10
- type: `playEvent` with parameter declaration in tpyescript
- Editor Audio control: CSS required: load abcjs-audio.css HOT 8
- Feature Suggestion: Chord-only view (Inspired by iRealPro) HOT 1
- get svg in nodejs environment HOT 3
- slur direction HOT 2
- Adding Hyphens HOT 2
- Q: Is it possible to visually transpose in ABC string? HOT 1
- Q: notes higher than 'c' are not audible when using MIDI instrument 67. Why? HOT 2
- inverted fermata placement HOT 3
- Support for snare buzz/closed roll HOT 1
- How to click lyrics and update them HOT 1
- Dotted quarter with half note
- Absolute drawing of note after initial rendering HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abcjs.