PageSourceSearch

https://web-music-score.github.io/assets/js/940997c8.f38a4c15.js

js web-music-score.github.io collected 2026-10-03 10:11:44 UTC 5,673 bytes, 17 lines download raw bytes

1"use strict";(self.webpackChunkweb_music_score_org=self.webpackChunkweb_music_score_org||[]).push([["8593"],{404(e,n,r){r.r(n),r.d(n,{metadata:()=>i,default:()=>x,frontMatter:()=>l,contentTitle:()=>c,toc:()=>u,assets:()=>o});var i=JSON.parse('{"id":"create-doc/add-key-signature","title":"Add Key Signature","description":"Set key signature form the beginning of current measure.","source":"@site/versioned_docs/version-v6/060-create-doc/060-add-key-signature.md","sourceDirName":"060-create-doc","slug":"/create-doc/add-key-signature","permalink":"/docs/v6/create-doc/add-key-signature","draft":false,"unlisted":false,"tags":[],"version":"v6","sidebarPosition":60,"frontMatter":{"sidebar_position":60},"sidebar":"docSidebar","previous":{"title":"Add Document Header","permalink":"/docs/v6/create-doc/add-header"},"next":{"title":"Add Time Signature","permalink":"/docs/v6/create-doc/add-time-signature"}}'),s=r(4848),d=r(8453),t=r(5751);let a=`
2function ExampleCode() {
3    const doc = new Score.DocumentBuilder()
4        .addMeasure()
5        .setKeySignature("D", "Major")
6        .addMeasure()
7        .setKeySignature("C Dorian")
8        .addMeasure()
9        .setKeySignature("F Natural Minor")
10        .getDocument();
11
12    return <div>
13        <ReactUI.WmsControls doc={doc} playStopPause />
14        <br />
15        <ReactUI.WmsView doc={doc} />
16    </div>;
17}`,l={sidebar_position:60},c="Add Key Signature",o={},u=[{value:"Live Example",id:"live-example",level:2}];function h(e){let n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"add-key-signature",children:"Add Key Signature"})}),"\n",(0,s.jsx)(n.p,{children:"Set key signature form the beginning of current measure."}),"\n",(0,s.jsx)(n.p,{children:"Key signature consists of tonic and scale type."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:'builder.setKeySignature("C Major");            // Create C Major scale.\r\nbuilder.setKeySignature("D", "Major");         // Create D Major scale.\r\nbuilder.setKeySignature("A", "Natural Minor"); // Create A natural minor scale.\n'})}),"\n",(0,s.jsx)(n.p,{children:"Here is list of supported scale types:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Major"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Natural Minor"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Harmonic Minor"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Ionian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Dorian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Phrygian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Lydian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Mixolydian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Aeolian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Locrian"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Major Pentatonic"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Minor Pentatonic"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Major Hexatonic Blues"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Minor Hexatonic Blues"'})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.code,{children:'"Heptatonic Blues"'})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"live-example",children:"Live Example"}),"\n",(0,s.jsx)(t.r,{code:a})]})}function x(e={}){let{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},5751(e,n,r){r.d(n,{r:()=>u});var i,s=r(4848),d=r(6540),t=r(923),a=r(85),l=r(9526);async function c(){let[e,n,i,s,d,t,a,l]=await Promise.all([r.e("6743").then(r.bind(r,5690)),Promise.all([r.e("6743"),r.e("8933"),r.e("7381"),r.e("7762")]).then(r.bind(r,3721)),Promise.all([r.e("6743"),r.e("8933"),r.e("7381"),r.e("3575")]).then(r.bind(r,1978)),Promise.all([r.e("8933"),r.e("6100")]).then(r.bind(r,8500)),Promise.all([r.e("6743"),r.e("8933"),r.e("7381"),r.e("730"),r.e("8116")]).then(r.bind(r,2175)),Promise.all([r.e("6743"),r.e("7381")]).then(r.bind(r,4388)),Promise.all([r.e("6743"),r.e("8933"),r.e("7381"),r.e("730")]).then(r.bind(r,9041)),Promise.all([r.e("6743"),r.e("8933"),r.e("7381"),r.e("730"),r.e("4931")]).then(r.bind(r,3774))]);return{Core:e,Audio:n,AudioCG:i,AudioSynth:s,ReactUI:d,Theory:t,Score:a,Pieces:l}}function o(e){let[n,a]=d.useState(e.entry.code);return(0,s.jsx)(l.A,{children:()=>{let[l,o]=d.useState(null);if(d.useEffect(()=>{c().then(e=>{e.Audio.stop(),o(e)})},[]),!l)return(0,s.jsx)("div",{children:"Loading..."});let{Core:u,Audio:h,AudioCG:x,AudioSynth:j,ReactUI:m,Score:g,Theory:p,Pieces:b}=l;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.Q,{language:"jsx",code:n,scope:{Core:u,Audio:h,AudioCG:x,AudioSynth:j,Score:g,Theory:p,Pieces:b,ReactUI:m,React:i||(i=r.t(d,2))},children:[(0,s.jsx)(t.w,{onChange:n=>{e.onEdit&&e.onEdit(n),a(n),h.stop()}}),(0,s.jsx)(t.p1,{}),(0,s.jsx)("br",{}),(0,s.jsx)(t.pA,{})]}),(0,s.jsx)("br",{}),(0,s.jsxs)("p",{children:["\u2139\uFE0F Runs on ",(0,s.jsx)("code",{children:u.getLibInfo()}),"."]})]})}})}function u(e){let[n,r]=d.useState(0),i=(0,a.M)(e.code),t=i[n];return(0,s.jsxs)(s.Fragment,{children:[i.length>1?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("select",{value:n,onChange:e=>r(Number(e.target.value)),className:"select",children:i.map((e,n)=>(0,s.jsx)("option",{value:n,children:e.name},n))}),(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]}):null,(0,s.jsx)(o,{entry:t},n)]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.