「VexFlow タブ譜 ハーモニクス」の版間の差分
(→概要) |
|||
(同じ利用者による、間の53版が非表示) | |||
6行目: | 6行目: | ||
== '''概要''' == | == '''概要''' == | ||
Mobile Chrome ブラウザには使えないフォントのコードポイントがあるみたい。\u2540もダメだったし、\uFFA0もダメでした。なんで?全部調べるのは大変だ。Edgeブラウザはいけたよ。なんで?誰も知らない謎が増えた。誰か知ってる人いるのかな。全部調べてみようかな。0000~FFFF無理だと思うけど、0~65535まであるからね。いつまでかかんのっていう調査になるね。よっぽど暇なときになら調べてみてもいいかなと思ったけどね。都度、つかえるかどうか確認するしかねぇのかな。嫌だわ。わからないことって。巨大な権力をもつアプリケーションの謎。どうすんのコレ。って感じ。共通点は何。両方とも最後の桁が0ってだけ。2進数の世界からみても共通点はわからない。使えるEdgeがダメなのか。Chromeがダメなのか。どっちが正しいのかさえもわからない。Chromeでは使えるとこから見ても、Mobile Chromeだけの謎かもしれない。 | |||
587行目: | 588行目: | ||
new VF.StaveNote({ keys: ["a/4", "d/5"], duration: "8", stem_direction: -1 }), | new VF.StaveNote({ keys: ["a/4", "d/5"], duration: "8", stem_direction: -1 }), | ||
new VF.StaveNote({ keys: ["a/4 | new VF.StaveNote({ keys: ["a/4"], duration: "8", stem_direction: -1 }), | ||
new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }), | new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }), | ||
new VF.StaveNote({ keys: ["a/4"], duration: "4", stem_direction: -1 }), | new VF.StaveNote({ keys: ["a/4", "d/5"], duration: "4", stem_direction: -1 }), | ||
]; | ]; | ||
const Guitar1_St2_notes_2 = [ | const Guitar1_St2_notes_2 = [ | ||
621行目: | 622行目: | ||
]); | ]); | ||
const Guitar1_St2_beam_2 = new VF.Beam([ | const Guitar1_St2_beam_2 = new VF.Beam([ | ||
Guitar1_St2_notes_1[4], Guitar1_St2_notes_1[5 | Guitar1_St2_notes_1[4], Guitar1_St2_notes_1[5] | ||
]); | ]); | ||
642行目: | 643行目: | ||
shiftGuitar1_2st= addShift( | shiftGuitar1_2st= addShift( | ||
Guitar1_St2_notes_1, | Guitar1_St2_notes_1, | ||
[5, | [5, 5, 6, 6], | ||
[0, - | [0.5, -0.5, 3, 1.5] | ||
); | ); | ||
676行目: | 677行目: | ||
Guitar1tab_1st.x = Guitar1_Tab_St1_1.x | Guitar1tab_1st.x = Guitar1_Tab_St1_1.x | ||
Guitar1tab_1st.y = Guitar1_Tab_St1_1.y | Guitar1tab_1st.y = Guitar1_Tab_St1_1.y | ||
const Guitar1_Tab_St1_notes_1 = [ | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["d/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["f/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["d/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
]; | |||
const Guitar1_Tab_St1_notes_2 = [ | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
]; | |||
UniqueIds = getUniqueNoteheadIds(Guitar1_Tab_St1_notes_1, [0, 1, 2, 3, 4, 5, 6, 7]); | |||
allUniqueIds = updateAllUniqueIds(UniqueIds); | |||
const Guitar1_Tab_St1_beam_1 = new VF.Beam([ | |||
Guitar1_Tab_St1_notes_1[0], Guitar1_Tab_St1_notes_1[1], Guitar1_Tab_St1_notes_1[2], Guitar1_Tab_St1_notes_1[3] | |||
]); | |||
const Guitar1_Tab_St1_beam_2 = new VF.Beam([ | |||
Guitar1_Tab_St1_notes_1[4], Guitar1_Tab_St1_notes_1[5], Guitar1_Tab_St1_notes_1[6], Guitar1_Tab_St1_notes_1[7] | |||
]); | |||
var Guitar1_Tab_St1_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar1_Tab_St1_Voice_1.setStrict(true); | |||
Guitar1_Tab_St1_Voice_1.addTickables(Guitar1_Tab_St1_notes_1); | |||
var Guitar1_Tab_St1_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar1_Tab_St1_Voice_2.setStrict(true); | |||
Guitar1_Tab_St1_Voice_2.addTickables(Guitar1_Tab_St1_notes_2); | |||
var formatterGuitar1_Tab_St1 = new VF.Formatter().joinVoices([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2]); | |||
formatterGuitar1_Tab_St1.format([Guitar1_Tab_St1_Voice_1, Guitar1_Tab_St1_Voice_2], nStaveWidth - 40 - 10); | |||
Guitar1_Tab_St1_Voice_1.draw(ctx, Guitar1_Tab_St1_1); | |||
Guitar1_Tab_St1_Voice_2.draw(ctx, Guitar1_Tab_St1_1); | |||
Guitar1_Tab_St1_beam_1.setContext(ctx).draw(); | |||
Guitar1_Tab_St1_beam_2.setContext(ctx).draw(); | |||
shiftGuitar1tab_1st= addShift( | |||
Guitar1_Tab_St1_notes_1, | |||
[0, 1, 2, 3, 4, 5, 6, 7], | |||
[2, -1, 0, 2, 2, -1, 0, 1] | |||
); | |||
const Guitar1_Tab_St2 = new VF.Stave(Guitar1_Tab_St1.width + Guitar1_Tab_St1.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | const Guitar1_Tab_St2 = new VF.Stave(Guitar1_Tab_St1.width + Guitar1_Tab_St1.x, Guitar1_Tab_St1.y, nStaveWidth).setContext(ctx); | ||
682行目: | 752行目: | ||
Guitar1tab_2st.x = Guitar1_Tab_St2.x | Guitar1tab_2st.x = Guitar1_Tab_St2.x | ||
Guitar1tab_2st.y = Guitar1_Tab_St2.y | Guitar1tab_2st.y = Guitar1_Tab_St2.y | ||
const Guitar1_Tab_St2_notes_1 = [ | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["d/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["b/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["g/4"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["d/5"], duration: "8", stem_direction: -1 }), | |||
new VF.StaveNote({ keys: ["g/4"], duration: "4", stem_direction: -1 }), | |||
]; | |||
const Guitar1_Tab_St2_notes_2 = [ | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
new VF.GhostNote({ keys: ["f/4"], duration: "16"}), | |||
]; | |||
UniqueIds = getUniqueNoteheadIds(Guitar1_Tab_St2_notes_1, [0, 1, 2, 3, 4, 5, 6]); | |||
allUniqueIds = updateAllUniqueIds(UniqueIds); | |||
const Guitar1_Tab_St2_beam_1 = new VF.Beam([ | |||
Guitar1_Tab_St2_notes_1[0], Guitar1_Tab_St2_notes_1[1], Guitar1_Tab_St2_notes_1[2], Guitar1_Tab_St2_notes_1[3] | |||
]); | |||
const Guitar1_Tab_St2_beam_2 = new VF.Beam([ | |||
Guitar1_Tab_St2_notes_1[4], Guitar1_Tab_St2_notes_1[5] | |||
]); | |||
var Guitar1_Tab_St2_Voice_1 = new VF.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar1_Tab_St2_Voice_1.setStrict(true); | |||
Guitar1_Tab_St2_Voice_1.addTickables(Guitar1_Tab_St2_notes_1); | |||
var Guitar1_Tab_St2_Voice_2 = new VF.Voice({ num_beats: 4, beat_value: 4 }); | |||
Guitar1_Tab_St2_Voice_2.setStrict(true); | |||
Guitar1_Tab_St2_Voice_2.addTickables(Guitar1_Tab_St2_notes_2); | |||
var formatterGuitar1_Tab_St2 = new VF.Formatter().joinVoices([Guitar1_Tab_St2_Voice_1, Guitar1_Tab_St2_Voice_2]); | |||
formatterGuitar1_Tab_St2.format([Guitar1_Tab_St2_Voice_1, Guitar1_Tab_St2_Voice_2], nStaveWidth - 40 - 10); | |||
Guitar1_Tab_St2_Voice_1.draw(ctx, Guitar1_Tab_St2); | |||
Guitar1_Tab_St2_Voice_2.draw(ctx, Guitar1_Tab_St2); | |||
Guitar1_Tab_St2_beam_1.setContext(ctx).draw(); | |||
Guitar1_Tab_St2_beam_2.setContext(ctx).draw(); | |||
shiftGuitar1tab_2st= addShift( | |||
Guitar1_Tab_St2_notes_1, | |||
[0, 1, 2, 3, 3, 5, 5, 6, 6], | |||
[2, 0, 1, 1, 2, -1, 0, 1, 2] | |||
); | |||
var Guitar1Connector_St2_L = new VF.StaveConnector(Guitar1_St2, Guitar1_Tab_St2); | var Guitar1Connector_St2_L = new VF.StaveConnector(Guitar1_St2, Guitar1_Tab_St2); | ||
1,060行目: | 1,198行目: | ||
}; | }; | ||
insertTextToSVG(EGuitarTab_options); | insertTextToSVG(EGuitarTab_options); | ||
var Guitar1_st2_option = { | |||
textContent: ["\uFF89", "\uFF89", "\uFF89", "\uFF89"], // 必須文字列 | |||
strID: "Guitar1_st2", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: shiftGuitar1_2st, | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_st2_option); | |||
var Guitar1_st2_str_option = { | |||
textContent: ["┌"], // 必須文字列 | |||
strID: "Guitar1_st2_str", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [{x:shiftGuitar1_2st[0].x -25, y:shiftGuitar1_2st[0].y - 30}], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_st2_str_option); | |||
var Guitar1_tab_st2_str_option = { | |||
textContent: ["┌ Harm.───────┐"], // 必須文字列 | |||
strID: "Guitar1_tab_st2_str", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [{x:shiftGuitar1_2st[0].x - 30, y:shiftGuitar1_2st[0].y + 90}], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_tab_st2_str_option); | |||
var Guitar1_st2_str2_option = { | |||
textContent: ["va Harm.────┐"], // 必須文字列 | |||
strID: "Guitar1_st2_str2", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [{x:shiftGuitar1_2st[0].x, y:shiftGuitar1_2st[0].y - 30}], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_st2_str2_option); | |||
var Guitar1_st2_str3_option = { | |||
textContent: ["8"], // 必須文字列 | |||
strID: "Guitar1_st2_str3", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [{x:shiftGuitar1_2st[0].x - 10 , y:shiftGuitar1_2st[0].y - 35}], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_st2_str3_option); | |||
var Guitar1_tab_st1_option = { | |||
textContent: ["5", "0", "0", "5", "7", "0", "0", "0"], // 必須文字列 | |||
strID: "Guitar1_tab_st1", // 必須 | |||
Stave_x_Offset: 0, | |||
Stave_y_Offset: 0, | |||
fontSize: 50, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: shiftGuitar1tab_1st, | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_tab_st1_option); | |||
var Guitar1_tab_st2_option = { | |||
textContent: ["9", "7", "7", "7", "7", "7", "7", "7", "7"], // 必須文字列 | |||
strID: "Guitar1_tab_st2", // 必須 | |||
Stave_x_Offset: [0, 0, 0, -10, 0, -15, 0, -15, 0], | |||
Stave_y_Offset: 0, | |||
fontSize: 50, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: shiftGuitar1tab_2st, | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_tab_st2_option); | |||
var Guitar1_tab_st2_Harm_option = { | |||
textContent: ["\uFF9e", "\uFF9e", "\uFF9e", "\uFF9e"], // 必須文字列 | |||
strID: "Guitar1_tab_st2_Harm", // 必須 | |||
Stave_x_Offset: [0, 0, 0, -10, 0, -15, 0, -15, 0], | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [ | |||
{x:shiftGuitar1tab_2st[5].x - 28, y:shiftGuitar1tab_2st[5].y}, | |||
{x:shiftGuitar1tab_2st[6].x - 13, y:shiftGuitar1tab_2st[6].y}, | |||
{x:shiftGuitar1tab_2st[7].x - 28, y:shiftGuitar1tab_2st[7].y}, | |||
{x:shiftGuitar1tab_2st[8].x - 5, y:shiftGuitar1tab_2st[8].y}, | |||
], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_tab_st2_Harm_option); | |||
var Guitar1_tab_st2_Harmp_option = { | |||
textContent: ["\uFFa0", "\uFFa1", "\uFFa2", "\uFFa3"], // 必須文字列 | |||
strID: "Guitar1_tab_st2_Harmp", // 必須 | |||
Stave_x_Offset: [0, 0, 0, -10, 0, -15, 0, -15, 0], | |||
Stave_y_Offset: 0, | |||
fontSize: 40, | |||
fontFamily: "YonetMuFL, Arial", // オプション、デフォルトは"Bravura, Arial" | |||
shift_x: [ | |||
{x:shiftGuitar1tab_2st[5].x - 28 + 100, y:shiftGuitar1tab_2st[5].y}, | |||
{x:shiftGuitar1tab_2st[6].x - 13 + 100, y:shiftGuitar1tab_2st[6].y}, | |||
{x:shiftGuitar1tab_2st[7].x - 28 + 100, y:shiftGuitar1tab_2st[7].y}, | |||
{x:shiftGuitar1tab_2st[8].x - 5 + 100, y:shiftGuitar1tab_2st[8].y}, | |||
], | |||
IsOffset_x_Abs: true | |||
}; | |||
insertTextToSVG(Guitar1_tab_st2_Harmp_option); | |||
insertTiePathToSVG({x:shiftGuitar1tab_2st[3].x , y:shiftGuitar1tab_2st[3].y - 10}, {x:shiftGuitar1tab_2st[3].x + 45, y:shiftGuitar1tab_2st[3].y - 10}, -1); | |||
insertTiePathToSVG({x:shiftGuitar1tab_2st[3].x , y:shiftGuitar1tab_2st[3].y - 130}, {x:shiftGuitar1tab_2st[3].x + 45, y:shiftGuitar1tab_2st[3].y - 130}, -1); | |||
var EGuitar2Text_options = { | var EGuitar2Text_options = { |
2024年4月22日 (月) 00:04時点における最新版
VexFlow 使い方に戻る。
概要
Mobile Chrome ブラウザには使えないフォントのコードポイントがあるみたい。\u2540もダメだったし、\uFFA0もダメでした。なんで?全部調べるのは大変だ。Edgeブラウザはいけたよ。なんで?誰も知らない謎が増えた。誰か知ってる人いるのかな。全部調べてみようかな。0000~FFFF無理だと思うけど、0~65535まであるからね。いつまでかかんのっていう調査になるね。よっぽど暇なときになら調べてみてもいいかなと思ったけどね。都度、つかえるかどうか確認するしかねぇのかな。嫌だわ。わからないことって。巨大な権力をもつアプリケーションの謎。どうすんのコレ。って感じ。共通点は何。両方とも最後の桁が0ってだけ。2進数の世界からみても共通点はわからない。使えるEdgeがダメなのか。Chromeがダメなのか。どっちが正しいのかさえもわからない。Chromeでは使えるとこから見ても、Mobile Chromeだけの謎かもしれない。
タブ譜 ハーモニクス
VexFlow 使い方に戻る。