-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automatically created **fb
spine
#53
Conversation
Remove octave and doubled intervals, use compound interval, sort intervals
Missing 7 when running
|
Fixed missing 7 with eef094d. |
An idea how to implement the feature to show only figures on certain beats would be something like the following. This is currently still far from perfect and e.g. completely ignores upbeats. // tool-figuredbass.cpp line 95
for (int i=0; i<(int)grid.getSliceCount(); i++) {
int usedBaseVoiceIndex = baseQ;
NoteCell* baseCell = grid.cell(usedBaseVoiceIndex, i);
if(tpqQ != 0) {
int tpq = infile.tpq();
int starttime = baseCell->getToken()->getDurationFromStart(tpq).getInteger();
if(fmod(starttime, tpq / tpqQ) != 0) {
continue;
}
}
// ...
} |
I cannot get this running in the JS toolkit. Is there something I am missing? From my side this is ready to merge now. Everything else I can contribute in new PRs. I observed some problems with the numbers in some of the demo data available in VHV but I will open new issues for these and fix them in individual pull requests as this thread is getting long… |
# Conflicts: # include/humlib.h # src/humlib.cpp
Closes craigsapp#57 in d7f1db7
Do you have any idea how to debug the Could |
For the problem of not running in Javascript, I am thinking that you need to register the tool for use as a filter in the
I don't find tool-figuredbass.o in my directories. That is probably the old name for the class file before you changed it to To be certain, you can run: to remove all compiled files, and then re-run But if you mean it crashes in Javascript but not on the command line, here is some discussion about that (how I debug): I don't know how to debug verovio in a web browser. There are debugging tools for javascript in browsers, but I don't think they work very well on WASM-compiled C++ code since the Javascript code is basically like assembly code and not human readable (but I have not tried to use them because I suspect they will not be useful). You can compile it into the command-line version of verovio, and run test input through that version which will be a little more easy. There is a debugging system in XCode (but I only use command-line compiling, so I have never used it). If you run it on the command line and the program generates a segmentation fault, then there should be a diagnostic file in I am suspecting that your code is trying to access an array element that it should not. If you use I will otherwise put lots of print statements in places where I think the problem is, and then gradually narrow down the point (which usually does not take long, especially when I know which function is causing the problem). If I get stuck, it is likely some memory access problem, and in that case I would use valgrind to find the problem: |
May bad. I meant the new
Thank you, this already helped. It does not crash when using bool Tool_fb::run(HumdrumFile &infile)
{
cerr << "1" << endl;
initialize();
cerr << "2" << endl;
processFile(infile);
cerr << "3" << endl;
return true;
} Output: $ ./verovio /paht/to/test.krn
1
2
3 But it does not exit and I have no idea why. |
If the program (verovio Javascript and/or verovio/fb CLI) does not exit, then the most likely case is there is a while loop which is getting stuck in an infinite loop.
I am not guaranteeing that either of these functions is bug free :-) I will checkout the current version of |
The problem is that you need to add this line at the end of the m_humdrum_text << infile; I cannot remember if this is a feature or a bug, but it seems that when using the After adding that line, the I was thinking that it could be related to the insertion direction. When using |
# Conflicts: # include/humlib.h # src/humlib.cpp
Perfect, this fixed it and now it's also running for my project. This PR is ready to merge now. This was the last issue I wanted to address. I will open new PRs when I find a solution for #59 and #60. Next I will add a PR on vhv-documentation with some details about this filter. |
I created a page for the |
The fb tool is now online on VHV: https://verovio.humdrum.org/?file=chorales/chor001.krn&filter=fb%20-f (Also added to verovio) |
See humdrum-tools/verovio-humdrum-viewer#658.
This PR adds a basic implementation for a figured bass filter to automatically add
**fb
spines to the kern score. Ideally this filter should be implemented into Verovio to allow dynamic score manipulation with this filter in the browser.These are my first lines of code in C++, so any feedback or code review is welcome. And please excuse me if I didn't follow conventions of the programming language.
I had a more generic solution but I couldn't compile it because I have no knowledge of pointers and references.I always compile the whole lib with
make
, this takes some time. Is there a way to compile onlytool-figuredbass.cpp
and then run the binary (bin/figuredbass
)?Todos:
6 5 3
=>6 5
,6 4 3
=>4 3
, etc.)appendDataSpine
(segmentation fault)figuredBassAbbrs
mappings2
and9
-s
and-k
Questions:
fb
is already existing.-
is reserved for flats in**fb
spines.NoteGrid
? I foundgetNoteDuration
but we would also need the position of the note relative to the time signature.