
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Hear your state changes. Debug faster.
zusound is a Zustand middleware that converts state changes into short Web Audio cues so you can hear update patterns while debugging.
npm install zusound
Supported Zustand versions: >=4 <6.
import { create } from 'zustand'
import { zusound } from 'zusound'
const useStore = create(
zusound((set) => ({
count: 0,
inc: () => set((state) => ({ count: state.count + 1 })),
}))
)
zusound(initializer, options?)The middleware signature matches standard Zustand middleware usage.
createZusound(options?)Create a configured, stateful instance that works in both middleware and subscriber mode:
import { create } from 'zustand'
import { createZusound } from 'zusound'
const useStore = create((set) => ({
count: 0,
inc: () => set((state) => ({ count: state.count + 1 })),
}))
const zs = createZusound({ enabled: true, volume: 0.5, debounceMs: 80 })
const unsubscribe = useStore.subscribe(zs)
// later
unsubscribe()
zs.cleanup()
Use a fresh createZusound(...) instance for each store.subscribe(...) attachment when
you want explicit lifecycle control.
ZusoundOptions| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true in dev-like envs, false otherwise | Enables/disables audio feedback |
volume | number | 0.3 | Global playback volume (0..1) |
debounceMs | number | 0 | Debounce state-change sound emission |
soundMapping | Record<string, Partial<SoundParams>> | undefined | Path-level overrides for timbre/frequency/waveform |
aesthetics | Partial<AestheticParams> | type-specific defaults | Base tuning for pleasantness/brightness/arousal/valence/simultaneity |
mapChangeToAesthetics | (change) => Partial<AestheticParams> | undefined | Per-change dynamic aesthetic override hook |
performanceMode | boolean | false | Uses static consonance ranking to reduce dissonance computation cost |
onError | (error, context) => void | undefined | Optional hook for non-fatal middleware/audio errors |
| Param | Range | Effect |
|---|---|---|
pleasantness | 0..1 | Consonance selection, supports fractional semitone interpolation |
brightness | 0..1 | Harmonic rolloff control for timbre brightness |
arousal | 0..1 | Envelope speed (attack/decay/release) |
valence | 0..1 | Envelope sustain character |
simultaneity | 0..1 | Dyad onset spread (1 = together, 0 = spread over ~80% duration) |
baseMidi | number | Base pitch center before interval mapping |
duration | number | Optional note duration override (seconds) |
import { create } from 'zustand'
import { zusound } from 'zusound'
const useStore = create(
zusound(
(set) => ({
count: 0,
status: 'idle',
inc: () => set((state) => ({ count: state.count + 1 })),
setStatus: (status: string) => set({ status }),
}),
{
enabled: true,
volume: 0.28,
debounceMs: 40,
performanceMode: false,
aesthetics: {
pleasantness: 0.75,
brightness: 0.65,
arousal: 0.55,
valence: 0.6,
simultaneity: 1,
baseMidi: 69,
},
mapChangeToAesthetics: (change) => {
if (change.operation === 'add') return { pleasantness: 0.9, valence: 0.8 }
if (change.operation === 'remove') return { pleasantness: 0.35, arousal: 0.7 }
return {}
},
}
)
)
enabled: true is explicitly set.enabled: true is set.AudioContext suspended until user interaction.performanceMode is recommended for low-power or high-frequency update scenarios.onError if you need telemetry for non-fatal audio/debugging failures.MIT © joe-byounghern-kim
FAQs
Hear bugs before you see them - audio debugging for Zustand
The npm package zusound receives a total of 9 weekly downloads. As such, zusound popularity was classified as not popular.
We found that zusound demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.