Skip to content

How to combine tabs #654

Answered by Danielku15
Reiji777 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the late answer, it seems I somehow missed this question completely. Combining the tracks of different files might not be so easy. There are quite some things which are expected to be consistent across the tracks. One main rule is: the number of bars within the staves of a track must be the same as the number of masterbars: https://alphatab.net/docs/reference/score

Here an untested example of how you could organize your code:

function createEmptyBar(staff) {
    const bar = new Bar();                
    staff.addBar(bar);
    let voiceCount = 1;
    if(bar.index > 0) {
        bar.clef = bar.previousBar.clef;
        voiceCount = bar.previousBar.voices.length;
    }
    
    for(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Danielku15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants