先看谱号,再找符头所在的线或间。高音谱号可以从第二线 G4 出发,低音谱号可以从第四线 F3 出发。读音名时,把八度和变音记号一起读出来。
先练一种谱号的自然音。熟悉位置后换另一种谱号,再交替练习。遇到升降号,先认字母,再改变音高:C♯ 与 D♭ 虽然可以发出相同的声音,符头的位置却不同。
读音练习
正在呈现知识画面
读音练习先找熟悉的谱线作参照,再数相邻的线与间;加线向谱表上下延续同样的排列。
{"id":"music-staff-drill","title":"读音练习","summary":"先找熟悉的谱线作参照,再数相邻的线与间;加线向谱表上下延续同样的排列。","height":800,"html":"<h2 data-i18n=\"heading\"></h2>\n<p class=\"mf-intro\" data-i18n=\"intro\"></p>\n<div id=\"controls\" class=\"mf-controls\"></div>\n<div id=\"stats\" class=\"trainer-stats\"></div>\n<div id=\"sheet\"></div>\n<p id=\"feedback\" class=\"mf-feedback\" role=\"status\" aria-live=\"polite\" data-i18n=\"question\"></p>\n<div id=\"modifiers\" class=\"mf-actions\" role=\"group\" data-i18n-label=\"accidental\" hidden></div>\n<div id=\"answers\" class=\"trainer-keys\" role=\"group\" data-i18n-label=\"pitch_keys\"></div>\n<div class=\"mf-actions\"><button id=\"pause\" data-i18n=\"pause\"></button><button id=\"hint\" data-i18n=\"hint\"></button><button id=\"note-hint\" data-i18n=\"note_hint\"></button></div>\n<p id=\"meta\" class=\"mf-meta\"></p>\n<div class=\"trainer-sound\"><label><input id=\"sound\" type=\"checkbox\"><span data-i18n=\"sound\"></span></label><button id=\"play\" data-i18n=\"play\"></button><button id=\"stop\" data-i18n=\"stop\" disabled></button></div>\n<p id=\"status\" class=\"mf-meta\" role=\"status\" data-i18n=\"idle\"></p>\n<label class=\"mf-volume\"><span data-i18n=\"volume\"></span><input id=\"volume\" type=\"range\" min=\"0\" max=\"100\" value=\"65\"></label>\n","css":"body{padding:24px}h2{font-size:22px;line-height:1.4}p{line-height:1.75}.mf-intro{color:var(--muted);margin:10px 0 18px}.mf-staff{display:block;width:100%;height:auto;max-height:270px;color:var(--ink);background:var(--surface);border:1px solid var(--rule);border-radius:8px;margin:16px 0}.mf-controls,.mf-actions,.mf-answers{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}button,select{min-height:46px;font-size:16px}button{white-space:normal;line-height:1.5}.mf-controls button,.mf-answers button{flex:1 1 64px}.mf-actions button{flex:1 1 110px}label{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:16px;margin:12px 0}select{max-width:100%;background:var(--paper);color:var(--ink);border:1px solid var(--rule);padding:8px;border-radius:6px}.mf-feedback{border-left:3px solid var(--accent);padding:12px;background:var(--surface);min-height:3.5em;margin:14px 0;font-size:16px}.mf-meta{font-size:14px;color:var(--muted);margin:10px 0}.mf-staff [data-current=true]{color:var(--accent);filter:drop-shadow(0 0 1px currentColor)}.mf-staff [data-current=true] path{fill:currentColor}.mf-queue{display:flex;flex-wrap:wrap;gap:8px}.mf-queue button{min-width:50px}.mf-queue button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}.mf-score{font-variant-numeric:tabular-nums}.mf-volume{display:flex;gap:12px;align-items:center;font-size:14px;border-top:1px solid var(--rule);padding-top:12px}.mf-volume input{min-width:80px;max-width:180px}.mf-answer-note{color:var(--muted);font-size:14px}button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent)}[hidden]{display:none!important}@media(max-width:420px){body{padding:20px 14px}h2{font-size:20px}.mf-controls button{flex-basis:75px}}\n\n.mf-answers button{border:1px solid var(--rule);background:var(--surface);border-radius:8px;min-height:52px;padding:10px 14px;cursor:pointer}.mf-answers button:not(:disabled):hover{border-color:var(--accent);background:var(--accent-soft)}.mf-answers button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.mf-answers button[aria-pressed=true]{border:2px solid var(--accent);background:var(--accent-soft);font-weight:600}.mf-answers button:disabled{cursor:default}\n.trainer-stats{display:flex;gap:10px;justify-content:space-between;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.trainer-stats strong{display:block;color:var(--ink);font-size:21px}.trainer-keys{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;min-height:112px}.trainer-keys button{width:100%;min-width:44px;margin:0;font-size:18px;border:1px solid var(--rule);background:var(--surface);border-radius:8px;min-height:52px;padding:8px 2px;cursor:pointer;font-variant-numeric:tabular-nums}.trainer-keys button:hover{background:var(--accent-soft);border-color:var(--accent)}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.trainer-keys button[data-result=correct]{background:var(--accent-soft);border:2px solid var(--accent);font-weight:700}.trainer-keys button[data-result=wrong]{border:2px dashed var(--ink)}.trainer-keys button[aria-disabled=true]{cursor:default}.trainer-sound{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.trainer-sound button{padding:6px 12px}.trainer-sound label{margin-right:auto}.mf-staff{max-height:210px;margin:10px 0}.mf-feedback{min-height:3em;margin:10px 0;padding:8px 12px}.mf-controls{margin:8px 0;gap:8px 16px}.mf-controls label{display:block;font-size:13px;margin:0;flex:1 1 130px}.mf-controls select{display:block;width:100%;margin-top:4px;font-size:14px}.mf-meta{min-height:1.5em}.mf-intro{margin-bottom:12px}.mf-actions{margin:10px 0}body[data-phase=paused] #sheet{opacity:.45}@media(max-width:480px){.trainer-keys{grid-template-columns:repeat(4,minmax(0,1fr));min-height:172px}.trainer-stats{font-size:12px}.mf-staff{max-height:185px}.mf-actions button{flex-basis:90px;font-size:14px}.mf-intro{font-size:14px}}\n","js":"const GLYPHS = {\"treble\":\"M376 415C374 427 376 428 382 434C398 449 419 470 438 491C522 583 572 702 572 815C572 902 548 988 507 1048C492 1070 466 1098 455 1098C441 1098 410 1072 390 1050C316 968 292 843 292 739C292 681 299 616 306 575C308 563 309 561 297 551C233 498 164 437 112 373C43 287 0 194 0 87C0 -87 119 -252 364 -252C387 -252 413 -250 433 -246C444 -244 446 -243 448 -255C460 -322 475 -409 475 -456C475 -604 375 -622 316 -622C262 -622 236 -606 236 -593C236 -586 245 -583 268 -576C299 -567 335 -540 335 -482C335 -427 300 -380 239 -380C172 -380 132 -433 132 -495C132 -560 171 -658 322 -658C389 -658 519 -628 519 -458C519 -401 501 -306 490 -244C488 -232 489 -233 503 -227C604 -187 671 -102 671 11C671 139 577 252 430 252C404 252 404 252 401 270ZM470 943C503 943 530 916 530 861C530 792 497 728 419 650C403 634 379 611 356 591C349 585 345 586 343 599C339 625 337 659 337 691C337 847 409 943 470 943ZM361 262C364 243 364 244 346 238C258 208 201 129 201 44C201 -46 248 -110 316 -133C324 -136 336 -139 343 -139C351 -139 355 -134 355 -128C355 -121 347 -118 340 -115C298 -97 268 -54 268 -8C268 49 307 92 368 109C384 113 386 112 388 101L438 -197C440 -208 439 -208 424 -211C408 -214 388 -216 368 -216C193 -216 80 -119 80 20C80 79 90 158 173 252C233 319 279 356 326 394C336 402 338 401 340 390ZM430 103C428 115 429 118 441 117C522 110 589 42 589 -46C589 -109 551 -160 495 -188C483 -194 481 -194 479 -182Z\",\"bass\":\"M252 262C78 262 0 135 0 39C0 -41 42 -110 123 -110C186 -110 229 -66 229 -4C229 60 182 100 133 100C106 100 96 93 83 93C70 93 67 101 67 111C67 151 127 224 229 224C335 224 381 120 381 -37C381 -140 359 -260 297 -356C237 -449 134 -534 10 -605C1 -610 -5 -615 -5 -623C-5 -629 -1 -635 8 -635C13 -635 19 -633 25 -630C158 -565 286 -489 392 -375C479 -281 531 -159 531 -28C531 146 425 262 252 262ZM629 180C598 180 574 156 574 125C574 94 598 70 629 70C660 70 684 94 684 125C684 156 660 180 629 180ZM630 -71C599 -71 576 -94 576 -125C576 -156 599 -179 630 -179C661 -179 684 -156 684 -125C684 -94 661 -71 630 -71Z\",\"black\":\"M97 -125C186 -125 295 -43 295 42C295 93 255 125 198 125C88 125 0 44 0 -42C0 -94 43 -125 97 -125Z\",\"half\":\"M97 -125C262 -125 295 9 295 42C295 93 254 125 196 125C47 125 0 10 0 -42C0 -95 42 -125 97 -125ZM173 -46C128 -76 97 -87 75 -87C54 -87 42 -76 35 -64C32 -58 29 -51 29 -44C29 -22 51 5 120 45C170 74 201 84 221 84C240 84 251 75 258 63C261 57 264 51 264 44C264 24 243 0 173 -46Z\",\"whole\":\"M216 125C83 125 0 70 0 2C0 -65 57 -125 206 -125C370 -125 422 -68 422 2C422 73 309 125 216 125ZM111 63C122 98 159 103 190 103C259 103 314 29 314 -31C314 -38 313 -44 312 -50C307 -75 293 -92 268 -98C258 -101 247 -102 237 -102C228 -102 220 -101 211 -98C194 -93 178 -84 164 -72C156 -65 149 -58 143 -50C123 -27 108 7 108 39C108 47 109 55 111 63Z\",\"flag\":\"M238 -790C238 -790 264 -695 264 -617C264 -492 212 -374 149 -274C98 -195 56 -109 40 -13C37 3 29 9 19 9C8 9 0 6 0 -6V-245C66 -257 161 -393 197 -478C212 -512 221 -569 221 -628C221 -673 214 -720 197 -765C195 -771 194 -776 194 -780C194 -796 204 -805 210 -809C211 -810 213 -810 215 -810C222 -810 234 -804 238 -790Z\",\"quarterRest\":\"M78 -38C94 -58 108 -77 121 -98C123 -102 127 -110 127 -112C127 -113 127 -115 126 -116C124 -120 120 -121 115 -121C111 -121 103 -119 99 -118C94 -118 88 -115 83 -115C40 -115 1 -158 1 -211C1 -261 44 -310 117 -366C125 -372 135 -375 143 -375C150 -375 157 -373 158 -369C159 -366 160 -364 160 -362C160 -353 152 -345 144 -338C131 -338 120 -311 118 -302C115 -294 114 -285 114 -276C114 -245 129 -210 161 -204C166 -203 171 -203 177 -203C206 -203 239 -214 255 -220C256 -220 257 -221 258 -221C261 -222 263 -222 265 -222C268 -222 270 -221 270 -218C270 -206 244 -173 233 -161C195 -115 164 -78 164 -22C164 -18 165 -13 165 -9C169 49 205 97 231 138C234 143 235 148 235 153C235 163 231 172 231 172C231 172 83 348 66 365C61 370 54 373 48 373C38 373 28 366 28 352C28 347 29 342 32 336C36 325 93 274 93 202C93 165 78 122 33 75C23 65 19 54 19 46C19 32 29 22 29 22Z\",\"eighthRest\":\"M134 107C134 144 104 174 67 174C30 174 0 144 0 107C0 86 12 68 27 56C36 50 45 45 55 43C63 41 72 39 81 39C95 39 109 42 120 46C134 50 143 54 156 61C158 62 160 62 161 62C165 62 166 58 166 53C166 50 166 46 165 42C162 27 90 -172 72 -238C72 -250 95 -251 101 -251C112 -251 126 -249 136 -241C139 -239 237 112 237 112C241 130 246 146 247 151C247 161 237 166 235 167C233 167 230 167 224 163C217 157 167 97 134 97Z\",\"halfRest\":\"M282 24V116C282 131 270 142 256 142H26C11 142 0 131 0 116V24C0 10 11 -2 26 -2H256C270 -2 282 10 282 24Z\",\"wholeRest\":\"M282 -109V-17C282 -2 270 9 256 9H26C11 9 0 -2 0 -17V-109C0 -123 11 -135 26 -135H256C270 -135 282 -123 282 -109Z\",\"sharp\":\"M237 118C244 121 249 129 249 135V206C249 211 246 214 242 214C240 214 239 214 237 213C237 213 217 205 212 204C205 204 198 209 198 217V339C198 345 192 350 184 350C174 350 168 345 168 339V209C167 199 164 186 155 180C143 173 109 159 92 155C83 155 80 167 80 175V295C80 301 73 306 66 306C56 306 50 301 50 295V160C50 146 44 136 38 133C32 130 12 122 12 122C5 120 0 112 0 106V35C0 29 3 26 8 26C9 26 11 27 12 27C12 27 27 33 34 37C35 37 36 38 37 38C44 38 50 28 50 20V-79C50 -90 45 -99 39 -102C33 -104 12 -113 12 -113C5 -115 0 -123 0 -129V-200C0 -206 3 -209 8 -209C9 -209 11 -208 12 -208C12 -208 26 -202 35 -199C36 -198 37 -198 38 -198C45 -198 50 -209 50 -214V-337C50 -343 56 -348 63 -348C73 -348 80 -343 80 -337V-198C80 -185 85 -178 90 -176L151 -151C152 -151 154 -150 155 -150C163 -150 168 -162 168 -168V-293C168 -299 174 -304 181 -304C192 -304 198 -299 198 -293V-151C198 -143 202 -131 209 -128C216 -125 237 -117 237 -117C244 -114 249 -106 249 -100V-29C249 -24 246 -21 242 -21C240 -21 239 -21 237 -22L211 -32C205 -32 198 -26 198 -14V79C198 86 203 105 211 108ZM168 -45C162 -65 115 -85 92 -85C86 -85 81 -83 80 -80C78 -76 77 -54 77 -30C77 1 78 36 80 44C82 61 128 82 153 82C160 82 166 80 168 76C170 71 172 46 172 19C172 -8 170 -36 168 -45Z\",\"flat\":\"M12 -170C15 -174 18 -175 21 -175C24 -175 27 -173 27 -173C57 -156 81 -129 106 -112C195 -50 226 11 226 57C226 114 182 150 136 153C129 153 122 152 115 150C104 147 92 143 81 136C75 131 64 122 59 122C57 122 56 122 54 123C47 126 43 133 43 140C44 162 50 402 50 422C50 433 41 439 31 439C17 439 1 429 0 411C0 411 4 -160 12 -170ZM47 -81C47 -81 44 -21 44 19C44 35 45 47 46 51C50 63 76 85 90 93C99 98 108 100 116 100C126 100 135 96 141 89C151 78 157 61 157 42C157 24 152 3 140 -18C127 -42 98 -74 68 -93C64 -95 61 -96 58 -96C49 -96 47 -86 47 -81Z\",\"natural\":\"M141 181C139 181 138 180 137 180C137 180 73 157 47 157C41 157 37 158 37 162V329C37 336 31 341 25 341H12C5 341 0 336 0 329V-186C0 -192 3 -195 8 -195C9 -195 11 -194 12 -194C12 -194 14 -194 15 -193C29 -187 85 -163 114 -163C124 -163 131 -166 131 -174V-323C131 -330 136 -335 143 -335H156C162 -335 168 -330 168 -323V179C168 184 164 187 160 187C159 187 157 187 156 186ZM37 39C37 53 98 79 122 79C128 79 131 78 131 74V-29C131 -47 74 -70 49 -70C42 -70 37 -68 37 -64Z\",\"flagDown\":\"M240 760C254 718 261 668 261 623C261 564 236 480 221 446C184 362 134 281 0 236V1C0 -9 8 -14 16 -14C25 -14 38 -8 40 8C57 103 131 190 182 269C245 368 306 487 306 612C306 690 286 761 278 793C275 804 269 808 262 808C250 808 237 796 237 777C237 772 238 766 240 760Z\"};\n// Small SVG engraver for the deliberately limited notation taught in this course.\n// Bravura outlines: Steinberg, SIL OFL 1.1; see engraving/OFL.txt.\nconst MusicStaff=(()=>{\n const ns='http://www.w3.org/2000/svg',letters=['C','D','E','F','G','A','B'],pcs=[0,2,4,5,7,9,11];\n const el=(tag,attrs={})=>{const n=document.createElementNS(ns,tag);for(const [k,v] of Object.entries(attrs))n.setAttribute(k,v);return n;};\n const parse=p=>{const m=p.match(/^([A-G])([♯♭♮]?)([0-8])$/);if(!m)throw Error('invalid written pitch');const letter=letters.indexOf(m[1]),oct=+m[3],alter=m[2]==='♯'?1:m[2]==='♭'?-1:0;return {step:oct*7+letter,midi:(oct+1)*12+pcs[letter]+alter,alter,sign:m[2],name:p};};\n const fromStep=(step,alter=0)=>letters[((step%7)+7)%7]+(alter>0?'♯':alter<0?'♭':'')+Math.floor(step/7);\n const fromMidi=(m,flat=false)=>{const names=flat?['C','D♭','D','E♭','E','F','G♭','G','A♭','A','B♭','B']:['C','C♯','D','D♯','E','F','F♯','G','G♯','A','A♯','B'];return names[m%12]+(Math.floor(m/12)-1);};\n function glyph(parent,name,x,y,gap){parent.append(el('path',{d:GLYPHS[name],transform:`translate(${x} ${y}) scale(${gap/250} ${-gap/250})`,fill:'currentColor'}));}\n function render({clef='treble',notes=[],meter=null,key=null,labels=false,small=false,answerLabel='',barEnds=[]}={}){\n const gap=small?12:16,bottom=small?92:114,width=Math.max(300,Math.min(660,110+notes.length*66)),height=small?158:196;\n const svg=el('svg',{viewBox:`0 0 ${width} ${height}`,class:'mf-staff',role:'img','aria-label':answerLabel||viz.t('staff_description')});\n const line=(x1,y1,x2,y2,w=1)=>svg.append(el('line',{x1,y1,x2,y2,stroke:'currentColor','stroke-width':w,opacity:.7}));\n for(let i=0;i<5;i++)line(12,bottom-i*gap,width-12,bottom-i*gap);\n glyph(svg,clef,24,clef==='treble'?bottom-gap:bottom-3*gap,gap);\n let left=80;\n if(key==='G'){glyph(svg,'sharp',left,bottom-4*gap,gap);left+=32;}\n if(meter){const [n,d]=meter.split('/');for(const [v,y] of [[n,bottom-2.65*gap],[d,bottom-.7*gap]]){const t=el('text',{x:left,y,'font-size':gap*1.9,'font-weight':700,'text-anchor':'middle',fill:'currentColor'});t.textContent=v;svg.append(t);}left+=30;}\n const base=clef==='treble'?30:18,positions=[];\n notes.forEach((n,i)=>{\n const x=left+(i+.5)*(width-24-left)/Math.max(1,notes.length),group=el('g',{'data-note-index':i});svg.append(group);positions.push(x);\n if(n.blank){group.append(el('rect',{x:x-11,y:bottom-2*gap-13,width:22,height:26,fill:'var(--paper)',stroke:'currentColor','stroke-dasharray':'3 2'}));}\n else if(n.rest){glyph(group,({4:'wholeRest',2:'halfRest',1:'quarterRest','0.5':'eighthRest'})[n.value]||'quarterRest',x-6,bottom-(n.value===4?3:2)*gap,gap);}\n else{\n const pitches=n.chord||[n.pitch];\n for(const pitch of pitches){const p=parse(pitch),pos=p.step-base,y=bottom-pos*gap/2;\n for(let k=-2;k>=pos;k-=2)line(x-14,bottom-k*gap/2,x+14,bottom-k*gap/2,1.4);\n for(let k=10;k<=pos;k+=2)line(x-14,bottom-k*gap/2,x+14,bottom-k*gap/2,1.4);\n glyph(group,n.value===4?'whole':n.value===2?'half':'black',x-gap*.59,y,gap);\n if(p.sign)glyph(group,p.sign==='♯'?'sharp':p.sign==='♭'?'flat':'natural',x-gap*1.7,y,gap);\n if(n.dot)group.append(el('circle',{cx:x+gap*.95,cy:y-(pos%2===0?gap/2:0),r:gap*.13,fill:'currentColor'}));\n }\n const ps=pitches.map(parse).map(p=>p.step-base),highest=Math.max(...ps),lowest=Math.min(...ps),down=(highest+lowest)/2>=4;\n if(n.value!==4){const stemx=x+(down?-gap*.55:gap*.55),from=bottom-(down?highest:lowest)*gap/2,to=bottom-(down?lowest:highest)*gap/2+(down?gap*3.5:-gap*3.5);group.append(el('line',{x1:stemx,x2:stemx,y1:from,y2:to,stroke:'currentColor','stroke-width':1.5}));\n if(n.value===.5){glyph(group,down?'flagDown':'flag',stemx,to,gap);}\n }\n }\n if(labels){const text=el('text',{x,y:height-15,'font-size':14,'text-anchor':'middle',fill:'currentColor'});text.textContent=n.rest?viz.t('rest'):(n.chord||[n.pitch]).join(' ');svg.append(text);}\n if(n.barAfter||barEnds.includes(i))line(x+(width-24-left)/notes.length*.48,bottom,x+(width-24-left)/notes.length*.48,bottom-4*gap,1.5);\n });\n for(let i=0;i<notes.length-1;i++)if(notes[i].tie){const x=positions[i],x2=positions[i+1],pos=parse(notes[i].pitch).step-base,direction=pos>=4?-1:1,y=bottom-pos*gap/2+direction*gap;svg.append(el('path',{d:`M ${x} ${y} Q ${(x+x2)/2} ${y+direction*gap} ${x2} ${y}`,fill:'none',stroke:'currentColor','stroke-width':1.5}));}\n line(width-12,bottom,width-12,bottom-4*gap,1.5);return svg;\n }\n function score(notes,bpm=90){let beat=0;const events=[];notes.forEach(n=>{const length=n.value*(n.dot?1.5:1);if(!n.rest){if(n.continueTie){const last=events[events.length-1];last.duration+=length*60/bpm;}else for(const p of n.chord||[n.pitch])events.push({beat,hz:440*2**((parse(p).midi-69)/12),duration:length*60/bpm*.94,gain:.8,wave:'triangle',hold:true});}beat+=length;});return {bpm,beats:beat,events};}\n return {render,parse,fromStep,fromMidi,score};\n})();\n\nconst PRACTICE = {\"kind\": \"pitchTrainer\"};\nconst $=s=>document.querySelector(s),t=viz.t;\nfunction make(tag,attrs={},text=''){const e=document.createElement(tag);for(const [k,v]of Object.entries(attrs))e.setAttribute(k,v);e.textContent=text;return e;}\nconst shuffle=a=>{a=[...a];for(let i=a.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[a[i],a[j]]=[a[j],a[i]];}return a;};\nlet mode='treble',ledger=false,altered=false,modifier=0,deck=[],reviews=[],current=null,serial=0;\nlet phase='asking',paused=false,assisted=false,mistaken=false,completed=0,firstTry=0,streak=0;\nconst player=viz.audio({onState(s){document.body.dataset.audioState=s;$('#stop').disabled=s==='idle';$('#status').textContent=t(s==='idle'?'idle':s==='starting'?'starting':'playing');},onError(){ $('#status').textContent=t('error'); }});\nconst advance=viz.playback({delay:500,canAdvance:()=>phase==='correct'&&!paused,advance:next,onChange(running){if(!running&&phase==='correct'){paused=true;updateState();}}});\nfunction bounds(clef){return clef==='treble'?(ledger?[28,39]:[30,38]):(ledger?[16,28]:[18,26]);}\nfunction identity(q){return q.clef+':'+q.pitch;}\nfunction bank(){const qs=[];for(const clef of mode==='mixed'?['treble','bass']:[mode]){const [lo,hi]=bounds(clef);for(let step=lo;step<=hi;step++)for(const alter of altered?[-1,0,1]:[0])qs.push({clef,step,alter,pitch:MusicStaff.fromStep(step,alter)});}return shuffle(qs);}\nfunction pick(){\n const previous=current&&identity(current);\n const due=reviews.findIndex(r=>r.due<=serial&&identity(r.q)!==previous);\n if(due>=0)return reviews.splice(due,1)[0].q;\n if(!deck.length)deck=bank();\n const i=deck.findIndex(q=>identity(q)!==previous);\n return deck.splice(i<0?0:i,1)[0];\n}\nfunction review(){if(!reviews.some(r=>identity(r.q)===identity(current)))reviews.push({q:{...current},due:serial+3});}\nfunction select(key,id,items,change){const label=make('label',{},t(key)),s=make('select',{id});for(const [value,text]of items)s.append(make('option',{value},t(text)));s.onchange=()=>{change(s.value);reset();};label.append(s);$('#controls').append(label);}\nselect('clef','clef',[['treble','treble'],['bass','bass'],['mixed','mixed']],v=>mode=v);\nselect('range','range',[['staff','staff_only'],['ledger','ledger_range']],v=>ledger=v==='ledger');\nselect('difficulty','difficulty',[['plain','plain'],['altered','altered']],v=>altered=v==='altered');\nfor(const [value,key,symbol]of [[-1,'flat','♭'],[0,'natural','♮'],[1,'sharp','♯']]){const b=make('button',{type:'button','data-modifier':value,'aria-label':t(key)},symbol);b.onclick=()=>{if(paused||phase!=='asking')return;modifier=value;updateKeys();};$('#modifiers').append(b);}\nfunction stats(){const row=$('#stats');row.replaceChildren();for(const [key,value]of [['read_count',completed],['accuracy',completed?Math.round(firstTry/completed*100)+'%':'—'],['streak',streak]]){const item=make('span',{},t(key));item.append(make('strong',{'data-stat':key},String(value)));row.append(item);}}\nfunction updateState(){document.body.dataset.phase=paused?'paused':phase;$('#pause').textContent=t(paused?'resume':'pause');$('#pause').setAttribute('aria-pressed',String(paused));for(const b of document.querySelectorAll('[data-answer],[data-modifier]'))b.setAttribute('aria-disabled',String(paused||phase!=='asking'));$('#hint').disabled=$('#note-hint').disabled=paused||phase!=='asking';$('#play').disabled=paused;}\nfunction updateKeys(){for(const b of document.querySelectorAll('[data-pitch-step]')){const pitch=MusicStaff.fromStep(+b.dataset.pitchStep,modifier);b.dataset.answer=pitch;b.textContent=pitch;delete b.dataset.result;}for(const b of document.querySelectorAll('[data-modifier]'))b.setAttribute('aria-pressed',String(+b.dataset.modifier===modifier));}\nfunction drawKeys(){\n const row=$('#answers'),[lo,hi]=bounds(current.clef),focused=document.activeElement?.dataset.pitchStep;\n // Keep the same buttons while practising a clef, including keyboard focus.\n if(row.dataset.bounds!==lo+':'+hi){row.replaceChildren();for(let step=lo;step<=hi;step++){const b=make('button',{type:'button','data-pitch-step':step});b.onclick=()=>answer(b);row.append(b);}row.dataset.bounds=lo+':'+hi;if(focused)row.querySelector(`[data-pitch-step=\"${Math.max(lo,Math.min(hi,+focused))}\"]`)?.focus({preventScroll:true});}\n updateKeys();\n}\nfunction next(){\n phase='asking';current=pick();serial++;assisted=false;mistaken=false;modifier=0;\n $('#sheet').replaceChildren(MusicStaff.render({clef:current.clef,notes:[{pitch:current.pitch,value:1}]}));\n $('#feedback').textContent=t('question');$('#meta').textContent='';$('#modifiers').hidden=!altered;\n drawKeys();stats();updateState();\n}\nfunction answer(b){\n if(paused||phase!=='asking')return;\n player.stop();\n if(b.dataset.answer!==current.pitch){mistaken=true;streak=0;review();for(const key of document.querySelectorAll('[data-answer]'))delete key.dataset.result;b.dataset.result='wrong';$('#feedback').textContent=t(+b.dataset.pitchStep===current.step?'check_sign':'try_again');stats();return;}\n phase='correct';completed++;if(!mistaken&&!assisted){firstTry++;streak++;}else{streak=0;review();}\n b.dataset.result='correct';$('#feedback').textContent=t('correct')+' '+current.pitch;stats();updateState();\n if($('#sound').checked)player.play(MusicStaff.score([{pitch:current.pitch,value:1}],140));\n advance.play();\n}\nfunction help(showName){if(paused||phase!=='asking')return;assisted=true;streak=0;review();stats();$('#meta').textContent=t('anchor_'+current.clef)+' '+t('position')+' '+(current.step-(current.clef==='treble'?30:18));if(showName)$('#meta').textContent+=' · '+t('answer')+' '+current.pitch;}\n$('#hint').onclick=()=>help(false);$('#note-hint').onclick=()=>help(true);\n$('#pause').onclick=()=>{if(paused){paused=false;if(phase==='correct')next();else{$('#feedback').textContent=t('question');updateState();}}else{paused=true;advance.pause();player.stop();$('#feedback').textContent=t('paused');updateState();}};\n$('#play').onclick=()=>{if(!paused)player.play(MusicStaff.score([{pitch:current.pitch,value:1}]));};\n$('#stop').onclick=()=>player.stop();$('#volume').oninput=e=>player.setVolume(+e.target.value/100);$('#sound').onchange=()=>player.stop();\nfunction reset(){phase='asking';advance.pause();player.stop();deck=[];reviews=[];current=null;serial=completed=firstTry=streak=0;paused=false;next();}\n// Leaving the activity during feedback preserves the solved note until Resume.\n// The host's playback controller cancels its timer when the iframe goes offscreen.\nreset();\n","audio":true,"strings":{"accidental":"变音记号","accuracy":"首次正确率","altered":"加入变音记号","anchor_bass":"参照:从下往上第四线、两点之间是 F3。","anchor_treble":"参照:从下往上第二线是 G4。每换到相邻线或间,音名字母走一步。","answer":"答案:","arrange_tip":"选择小节,再替换材料并试听。谱面显示所选小节,整段播放时跟随当前小节。","assisted":"使用过提示的题目","bar":"小节","bar_hint":"先把拍号换成四分音符单位,再把已有时值相加,从小节总值中减去。","bar_prompt":"补齐这一小节。方框是缺少的时值,请选择需要几个四分音符拍。","bar_total":"小节总值","bass":"低音谱号","before":"选好答案,再核对解释。","before_check":"先选择答案,再检查或主动显示解释。","check":"检查答案","check_sign":"留意符头旁的升降号。","choose_p":"P 是移调","choose_q":"Q 是移调","chord_tip":"从下往上读叠音。改变转位时,根音标签保持不变。","clef":"谱号","compare_title":"先作答,再显示图示","comparison_correct":"P 保留全部音程,Q 改了内部一个音。请核对揭示后的距离。","correct":"正确。","difficulty":"题目范围","dotted":"附点四分音符 · 1½","down":"下移一个线/间","eighth":"八分音符 · ½","eighth_rest":"八分休止符 · ½","error":"音频未能启动,请重试或阅读文字说明。","finished":"本轮完成。可复习最后一题解释,或开始新一轮。","first_inversion":"第一转位","first_try":"首次作答正确","flat":"降号 ♭","full":"播放整段编排","half":"二分音符 · 2","half_rest":"二分休止符 · 2","heading":"读音练习","hint":"位置提示","idle":"勾选发声或点击试听后才有声音。","intro":"先看谱号,再找符头,读出音名与八度。别漏掉升降号。","inversion":"低音位置","key_hint":"调号一个升号表示各八度 F 升高,除非临时记号改变它。小节线重置临时记号,不清除调号。","key_prompt":"结合调号与临时变音记号,读出突出显示的音。","ledger":"短加线延伸五线谱,计数方法与谱内线相同。","ledger_range":"包含加线","major":"大三","material":"所选小节的材料","melody_only":"只听旋律","minor":"小三","missing":"缺少","mixed":"混合谱号","natural":"还原 ♮","next":"下一题","note_hint":"显示音名","one_bar":"只播放所选小节","pause":"暂停","paused":"已暂停","pitch_keys":"音名","plain":"自然音","play":"播放","playing":"正在播放…","position":"相对最下方线的位置步数(线到相邻间为 1):","pulse":"参照脉冲","quality":"性质","quarter":"四分音符 · 1","quarter_rest":"四分休止符 · 1","question":"选择音名与八度。","range":"音域","read_count":"已读音符","reset":"恢复初始编排","rest":"休止","restart":"新一轮","resume":"继续","reveal":"显示解释","root":"根音","root_position":"原位","round":"轮次进度","second_inversion":"第二转位","sharp":"升号 ♯","sound":"答对时发声","staff_description":"五线谱。无法看图时可使用位置说明。","staff_only":"五线谱内","starting":"正在准备声音…","stop":"停止","streak":"连续正确","symbols":"音符与休止符时值","target_note":"读第几音:","tied":"两个四分音符延音 · 2","treble":"高音谱号","try_again":"再试一次,留意谱号、位置与八度。","unit":"这里展示符号片段,不是完整小节;时值用四分音符单位。每次试听四拍,轻脉冲在休止处继续计时。","untied":"两个独立四分音符 · 1 + 1","up":"上移一个线/间","volume":"音量","whole":"全音符 · 4","whole_rest":"全休止符 · 此处为 4","written":"已有时值","wrong":"还不对,请对照解释检查所选答案。"}}
一个音迟迟认不出来时,找附近熟悉的参照音,一边经过线与间,一边说出音名字母。然后移开视线,再找到这个音。逐渐让常见位置变得熟悉,不必每次都从最下面数起;速度会随着熟悉程度提高。
卡住时可以使用位置提示。遇到升降号,先在音名键上方选择对应记号。
参考谱表与纸笔练习

遮住每行下方的音名,从左向右读。四行分别是高音谱号的线、高音谱号的间、低音谱号的线、低音谱号的间。再不看表回答四题:
- 高音谱号,从下往上第三间。
- 低音谱号,从下往上第二线。
- 高音谱号,谱表下方第一条加线。
- 低音谱号,谱表上方第一条加线,前面有升号。
核对四题答案
- C5。2. B2。3. C4(中央 C)。4. C♯4。升号使声音升高半音,记谱位置仍是 C。
其他读谱练习
接着练音符与休止符时值:看谱补齐小节,再练调号与临时变音记号。和弦叠音可以在三和弦构造器中练习。