Sound related functions - DPS2004/Doctor-s-Notepad GitHub Wiki

The functions on this page are available by loading the sound.lua extension. It is loaded by default.

level:cue(beat, cuetype, voice, volume, tick)

Plays the cue cuetype, with the voice voice and tick tick at beat beat.
voice can be any of the following: 'Nurse', 'NurseTired', 'IanExcited', 'IanCalm', 'IanSlow', 'NoneBottom', 'NoneTop'.
cuetype can be any of the following: 'SayReaDyGetSetGoNew', 'SayGetSetGo', 'SayReaDyGetSetOne', 'SayGetSetOne', 'SayReadyGetSetGo', 'JustSayReady', 'JustSayRea', 'JustSayAnd', 'JustSayStop', 'JustSayDy', 'JustSayGo', 'JustSayAndStop', 'JustSayGet', 'JustSaySet', 'Count1', 'Count2', 'Count3', 'Count4', 'Count5'.

Example:

level:cue(9, 'SayReaDyGetSetGoNew', 'IanExcited', 100, 1.5)

level:setbpm(beat, bpm)

Sets the bpm to bpm at beat beat.

Example:

level:setbpm(8, 120)

level:playsound(beat, sound, volume, pitch, pan, offset, soundtype)

Plays the sound sound with volume% volume, pitch% pitch, pan% panning, offset offset and type soundtype, at beat beat.
soundtype can be any of the following: 'CueSound', 'MusicSound', 'BeatSound', 'HitSound', 'OtherSound'.

Example:

level:playsound(7, 'sndShaker', 100, 50, 1, 0, 'CueSound')

level:setclapsounds(beat, rowtype, p1sound, p1volume, p1pitch, p1pan, p1offset, p2sound, p2volume, p2pitch, p2pan, p2offset, cpusound, cpuvolume, cpupitch, cpupan, cpuoffset, p1used, p2used, cpuused)

oh boy
If p1used is true, sets the clap sound of P1 to p1sound, with p1volume% volume, p1pitch% pitch, p1pan% panning, p1offset offset, at beat beat.
If p2used is true, sets the clap sound of P2 to p2sound, with p2volume% volume, p2pitch% pitch, p2pan% panning, p2offset offset, at beat beat.
If cpuused is true, sets the clap sound of CPU to cpusound, with cpuvolume% volume, cpupitch% pitch, cpupan% panning, cpuoffset offset, at beat beat.

Example:

level:setclapsounds(1, 'Classic', 'ClapHitP2', 70, 90, -10, 10, 'ClapHitCPU', 81, 79, 7, 5, 'ClapHit', 62, 84, 2, -50, true, false, true)
-- sets p1's clap sound to 'ClapHitP2', volume to 70%, pitch to 90%, panning to -10% and offset to 10
-- sets p2's clap sound to 'ClapHitCPU', volume to 81%, pitch to 79%, panning to 7% and offset to 5
-- sets cpu's clap sound to 'ClapHit', volume to 62%, pitch to 84%, panning to 2% and offset to -50
-- p1 and cpu are used, so set those to true, but p2 isn't, so set it to false

level:heartexplosioninterval(beat, intervaltype, interval)

Sets when the heart should explode to intervaltype and interval offset in beats, at beat beat.
intervaltype can be any of the following: 'OneBeatAfter' ('Fixed Interval' in-game), 'Instant' ('Instant' in-game), 'GatherNoCeil' ('Combine on Fixed Interval' in-game), 'GatherAndCeil' ('Combine on Downbeat' in-game).

Example:

level:heartexplosioninterval(18, 'GatherNoCeil', 2)

level:setgamesound(beat, soundtype, filename, volume, pitch, pan)

Sets the game sound soundtype to filename, with volume% volume, pitch% pitch, pan% panning at beat beat.

Example:

level:setgamesound(3, 'BigMistake', 'sndShaker', 100, 120, 1)

level:setbeatsound(beat, row, filename, volume, pitch, pan)

Sets the beat sound of the row at index row to filename, with volume% volume, pitch% pitch, pan% panning at beat beat.

Example:

level:setbeatsound(5, 0, 'Kick', 100, 98, 1)

level:setcountingsound(beat, row, voicesource, enabled, volume)

Enables or disables the counting sound of the row at index row according to enabled at beat beat.
voicesource can be any of the following: 'JyiCount', 'JyiCountFast', 'JyiCountTired', 'JyiCountVeryTired', 'JyiCountJapanese', 'IanCount', 'IanCountFast', 'IanCountCalm', 'IanCountSlow', 'IanCountSlower', 'BirdCount', 'OwlCount', 'WhistleCount', 'JyiCountLegacy'.

Example:

level:setcountingsound(16, 1, 'JyiCountTired', true, 100)
⚠️ **GitHub.com Fallback** ⚠️