Skip to content

Commit

Permalink
fix: use global defaults as fallback values
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoson committed Feb 28, 2023
1 parent 6c6c98a commit 8c8fcd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hydra-api/cc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getMidiId, resolveInput } from '../midiAccess'
import { scale, range, value } from '../transforms'
import { ChannelArg, IndexArg, InputArg } from '../types'

const getCcId = (index: IndexArg, channel: ChannelArg, input: InputArg) =>
const getCcId = (index: IndexArg, channel?: ChannelArg, input?: InputArg) =>
getMidiId(
index,
channel ?? state.defaults.channel,
Expand All @@ -30,8 +30,8 @@ export const _cc = (
*/
export const cc = (
index: IndexArg = '*',
channel: ChannelArg = '*',
input: InputArg = '*'
channel?: ChannelArg,
input?: InputArg
) => {
const ccId = getCcId(index, channel, input)
const fn = () => state.ccValues.get(ccId) ?? 0
Expand Down

0 comments on commit 8c8fcd7

Please sign in to comment.