paulrosen / abcjs

javascript for rendering abc music notation
Other
1.93k stars 284 forks source link

Synth play Drum Intro beats during Intro/Count-In measure only #1020

Open Staff2Stand opened 5 months ago

Staff2Stand commented 5 months ago

Hi Paul,

I'm trying to implement count in beats with the editor synth and have the metronome beats play only during the Intro measure. For the life of me I cannot figure out how to do so.

Any help is much appreciated.

Here's my relevant code in the editor params.

class CursorControl {
        constructor() {
            this.extraMeasuresAtBeginning = 1
        }
    }

...

synth: {
            el: `#synth_controller_${instrument}`,
            cursorControl: new CursorControl(),
            options: { 
                displayRestart: true, 
                displayPlay: true, 
                displayWarp: true,
                displayProgress: true,
                //audio params
                drum: "dd 76 77 60 30",
                drumIntro: 1,
                midiTranspose: 0,
                program: ABCJS.synth.instrumentIndexToName.indexOf(instrument)
            }
        },
paulrosen commented 4 months ago

I don't think that is currently possible, but I'm not sure. I will see if I can create an option for that next week.

paulrosen commented 4 months ago

Will be fixed in version 6.4.0

Staff2Stand commented 4 months ago

Amazing, thank you!