Sonolus Wiki

08. SFX

In this chapter, we will add SFX to note hit segment.

Declaring

As before, declare the effect clip to be used:

export const effect = defineEffect({
    clips: {
        perfect: EffectClipName.Perfect,
    },
})
export const effect = defineEffect({
    clips: {
        perfect: EffectClipName.Perfect,
    },
})

Hit Segment

Let's add the SFX to hit segment:

export const noteHit = {
    enter() {
        effect.clips.perfect.play(0)
    },
}
export const noteHit = {
    enter() {
        effect.clips.perfect.play(0)
    },
}