working prototype for soprano recorder

This commit is contained in:
2026-05-13 09:52:27 +02:00
parent d1bc05c208
commit 258fa7ac41

View File

@ -336,34 +336,34 @@ MuseScore {
formatString: "$1\n$2\n$3\n\n$4\n$5\n$6\n$+\n\n$note" formatString: "$1\n$2\n$3\n\n$4\n$5\n$6\n$+\n\n$note"
}, },
{ {
"name": "C Whistle [C4-C6] (Prefer half-holing)", "name": "Soprano Recorder",
"fingeringDict": { "fingeringDict": {
"C4": "2222220", "C4": "222222220",
"C#4": "2222210", "C#4": "222222210",
"D4": "2222200", "D4": "222222200",
"D#4": "2222100", "D#4": "222222100",
"E4": "2222000", "E4": "222222000",
"F4": "2220000", "F4": "222200000",
"F#4": "2210000", "F#4": "222100000",
"G4": "2200000", "G4": "222000000",
"G#4": "2100000", "G#4": "221000000",
"A4": "2000000", "A4": "220000000",
"A#4": "1000000", "A#4": "210000000",
"B4": "0000000", "B4": "200000000",
"C5": "0222221", "C5": "000222221",
"C#5": "2222211", "C#5": "002222211",
"D5": "2222201", "D5": "002222201",
"D#5": "2222101", "D#5": "002222101",
"E5": "2222001", "E5": "002222001",
"F5": "2220001", "F5": "002220001",
"F#5": "2210001", "F#5": "002210001",
"G5": "2200001", "G5": "002200001",
"G#5": "2100001", "G#5": "002100001",
"A5": "2000001", "A5": "002000001",
"A#5": "1000001", "A#5": "001000001",
"B5": "0000001" "B5": "000000001",
}, },
formatString: "$1\n$2\n$3\n\n$4\n$5\n$6\n$+\n\n$note" formatString: "$note\n\n$1\n-\n$2\n$3\n$4\n-\n$5\n$6\n$7\n$8\n$+"
}, },
{ {
name: "High D Whistle [D5-D7] (Prefer half-holing)", name: "High D Whistle [D5-D7] (Prefer half-holing)",
@ -702,7 +702,9 @@ MuseScore {
for (var i = 0; i < holeCount; i++) { for (var i = 0; i < holeCount; i++) {
if (binaryString[i] !== "0" && if (binaryString[i] !== "0" &&
binaryString[i] !== "1" && binaryString[i] !== "1" &&
binaryString[i] !== "2") binaryString[i] !== "1" &&
binaryString[i] !== "2" &&
binaryString[i] !== "3")
return "Invalid Fingering Pattern Value. Must be one of 0,1,2" return "Invalid Fingering Pattern Value. Must be one of 0,1,2"
} }
@ -734,10 +736,14 @@ MuseScore {
var symbol var symbol
if (binaryString[i] === "2") if (binaryString[i] === "2")
symbol = String.fromCharCode(0x25CF) // Closed hole - custom font symbol = String.fromCharCode(0x25CF) // Closed hole - custom font
else if (binaryString[i] === "1") else if (binaryString[i] === "1")
symbol = String.fromCharCode(0x25D0) // Half hole - custom font symbol = String.fromCharCode(0x25D0) // Half hole - custom font
else else if (binaryString[i] == "3")
symbol = String.fromCharCode(0x25CB) // Open Hole - custom font symbol = String.fromCharCode(0x25D2) // Bottom half hole
else if (binaryString[i] == "4")
symbol = String.fromCharCode(0x29B6) // Open Hold with line
else
symbol = String.fromCharCode(0x25CB) // Open Hole - custom font
var token = "$" + (i+1) var token = "$" + (i+1)
while (output.indexOf(token) !== -1) { while (output.indexOf(token) !== -1) {
@ -777,18 +783,18 @@ MuseScore {
function getColor(noteName) { function getColor(noteName) {
const note = noteName.slice(0, -1) const note = noteName.slice(0, -1)
const colorMap = { const colorMap = {
C: "red", C: "#ed1c24",
"C#": "crimson", "C#": "#f37021",
D: "orange", D: "#f8931e",
"D#": "gold", "D#": "#ffc20e",
E: "yellow", E: "#fff200",
F: "green", F: "#bed630",
"F#": "lime", "F#": "#72bf44",
G: "blue", G: "#00a29d",
"G#": "indigo", "G#": "#007dc5",
A: "purple", A: "#49479d",
"A#": "violet", "A#": "#8d5ca6",
B: "pink", B: "#c9277d",
} }
return colorMap[note] || "gray" return colorMap[note] || "gray"
} }
@ -801,8 +807,6 @@ MuseScore {
text.offsetY = userOffsetY text.offsetY = userOffsetY
text.lineSpacing = userLineSpacing text.lineSpacing = userLineSpacing
//var family = "WhistleSymbols"
//text.defaultFont = family
text.fontFamily = getFontStack() text.fontFamily = getFontStack()
if (userJustification === 0) if (userJustification === 0)