@@ -85,10 +85,10 @@ Deckdle._playSFX = (action, arg = null) => {
8585 Deckdle . config . synthSFX . setMasterVol ( Deckdle . settings . soundSFXLevel )
8686 Deckdle . config . synthSFX . setProgram ( 0 , 1 )
8787
88- let note = arg ? 42 + arg : 42
89-
9088 switch ( action ) {
91- case 'click_stock' :
89+ case 'click_stock' : {
90+ let note = arg ? 42 + arg : 42
91+
9292 Deckdle . config . synthSFX . send ( [ 0x90 , note , 100 ] )
9393 setTimeout ( ( ) => {
9494 Deckdle . config . synthSFX . send ( [ 0x90 , note - 2 , 100 ] )
@@ -102,21 +102,25 @@ Deckdle._playSFX = (action, arg = null) => {
102102 Deckdle . config . synthSFX . send ( [ 0x80 , note - 4 , 0 ] )
103103 } , 300 )
104104 break
105+ }
106+
107+ case 'click_tableau_valid' : {
108+ let note = arg ? 60 + arg : 60
105109
106- case 'click_tableau_valid' :
107- Deckdle . config . synthSFX . send ( [ 0x90 , 60 , 100 ] )
110+ Deckdle . config . synthSFX . send ( [ 0x90 , note , 100 ] )
108111 setTimeout ( ( ) => {
109- Deckdle . config . synthSFX . send ( [ 0x90 , 62 , 100 ] )
112+ Deckdle . config . synthSFX . send ( [ 0x90 , note + 2 , 100 ] )
110113 } , 40 )
111114 setTimeout ( ( ) => {
112- Deckdle . config . synthSFX . send ( [ 0x90 , 65 , 100 ] )
113- } , 70 )
115+ Deckdle . config . synthSFX . send ( [ 0x90 , note + 5 , 100 ] )
116+ } , 55 )
114117 setTimeout ( ( ) => {
115- Deckdle . config . synthSFX . send ( [ 0x80 , 60 , 0 ] )
116- Deckdle . config . synthSFX . send ( [ 0x80 , 62 , 0 ] )
117- Deckdle . config . synthSFX . send ( [ 0x80 , 65 , 0 ] )
118+ Deckdle . config . synthSFX . send ( [ 0x80 , note , 0 ] )
119+ Deckdle . config . synthSFX . send ( [ 0x80 , note + 2 , 0 ] )
120+ Deckdle . config . synthSFX . send ( [ 0x80 , note + 5 , 0 ] )
118121 } , 300 )
119122 break
123+ }
120124
121125 case 'click_tableau_invalid' :
122126 Deckdle . config . synthSFX . send ( [ 0x90 , 59 , 100 ] )
0 commit comments