[Sugar-devel] Relevant code related to key change in Music Blocks
Anindya Kundu
anindyaak007 at gmail.com
Thu May 7 05:12:29 EDT 2020
Key changes happen if solfege is moveable, i.e. moveableDo returns true.
>From logo.js, I got references to getNote() function in utils/musicutils.js.
I think you should be looking for the (three) "if (moveable)" blocks inside
getNote() in musicutils.js.
Also, the first of the said if blocks references
getScaleAndHalfSteps(keySignature), which is present in the same file.
*Anindya Kundu*
On Thu, 7 May 2020 at 13:23, Aviral Gangwar <aviralgangwar24 at gmail.com>
wrote:
> Hello
> Could you please guide me to the relevant files which handle a key change?
> E.g From C Major to G Major. Where do we do the calculations regarding
> this shift?
>
> I guess one place to look would be _playPitch() inside PitchBlock.js.
>
> Thank You
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20200507/cbea037c/attachment.htm>
More information about the Sugar-devel
mailing list