paulrosen / abcjs

javascript for rendering abc music notation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to initial sharp/flat of a note after same pitch is called again in synthesized sound ?

AppleIsCute opened this issue · comments

For example, in the Abc notation score it wrotes:

X: 1 T: V: 1 clef = treble K: C2 _E2 E2 E2

And it shows:
螢幕擷取畫面 2023-09-28 於 上午1 19 24

But in Abc.js Synth audio it plays: C2 _E2 _E2 _E2 , which is C2 Eb2 Eb2 Eb2 , when I expected it sounds like C2 E2 E2 E2 as the score was written.

Is it a possible way to directly nature it without adding "=" before the second E2 in Abcjs Synth, and make the audio sequence sound same as the score shows ? Thanks !

Here's an explanation of how accidentals work. Until there is a bar line, the accidental propagates to all notes of the same pitch: https://en.wikipedia.org/wiki/Accidental_(music)

That is how a human player would play the above phrase.

Thank you for replying.

Yes, I understand that.
I am just wondering if there is a way to know how the Synth system adjusts the playback pitch of a note before and after the accidentals until the next bar line, and if there is a way to manipulate it.

You can do anything with the synth by using synthCallback referenced here: https://paulrosen.github.io/abcjs/audio/synthesized-sound.html#audioparams

The simplest thing is to use a natural, though, so you would write this: C2 _E2 =E2 E2. That has the advantage of the sheet music being the same as the synth.