Skip to content

Commit 0241c12

Browse files
combo pitch now goes up as combo count goes up
1 parent e9eea30 commit 0241c12

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

assets/js/app/lib/audio.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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])

assets/js/app/lib/classes/cards/tableau.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ Deckdle._onTableauClick = (card, colId, rowId) => {
468468

469469
if (card.classList.contains('available')) {
470470
if (Deckdle._tableauCardIsValid(card.dataset)) {
471-
Deckdle._playSFX('click_tableau_valid')
471+
Deckdle._playSFX('click_tableau_valid', Deckdle.comboCurrent)
472472

473473
Deckdle._removeCardFromTableau(card)
474474

assets/js/app/lib/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Deckdle._clearLocalStorage = (showModal = true) => {
156156
}
157157

158158
Deckdle._debugCombo = () => {
159-
Deckdle._playSFX('click_tableau_valid')
159+
Deckdle._playSFX('click_tableau_valid', Deckdle.comboCurrent)
160160
Deckdle._increaseCombo()
161161
}
162162

0 commit comments

Comments
 (0)