Skip to content

Commit ad98af2

Browse files
Updated Keyboard demo to have more realistic keyboard-layout.
1 parent a142c9f commit ad98af2

File tree

1 file changed

+2
-2
lines changed
  • samples/KristofferStrube.Blazor.WebAudio.WasmExample/Pages

1 file changed

+2
-2
lines changed

samples/KristofferStrube.Blazor.WebAudio.WasmExample/Pages/Keyboard.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
@onmouseout="End"
4949
@ontouchstart="e => Start(keys[k].Octave, keys[k].Pitch, e)"
5050
@ontouchend="End"
51-
x="@(keys.GetRange(0, i).Count(k => k.Color == "white")*100-35)"
51+
x="@(keys.GetRange(0, i).Count(k => k.Color == "white")*100-30 - (keys[k].Pitch is 2 or 7 ? 10 : 0) + (keys[k].Pitch is 4 or 11 ? 10 : 0))"
5252
y="0"
53-
width="70"
53+
width="60"
5454
height="400"
5555
fill="black"
5656
stroke="black"

0 commit comments

Comments
 (0)