You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently discovered the little ZzFX sound generator by @KilledByAPixel, so I thought I'd try to write a KAPLAY plugin to add it... Unfortunately there is one thing that gets in the way of writing a well-behaved ZzFX plugin.
The plugin would add a function loadZzFX(name, ZzFX parameters) to KAPLAY, and then monkey-patch play() to check the ZzFX sound-name-to-parameters mapping as well and call zzfx() if the sound name is registered there, otherwise defer to KAPLAY's original function. This all can be done as-is, but a step up from that (and what would probably be expected) would be to patch ZzFX as well so that it inserts its audio into KAPLAY's masterNode so that ZzFX sounds respond to volume() and get record()'ed, but I can't do that because the only thing that is exposed on the context in terms of the audio system is the AudioContext, not the masterNode.
So I'm kind of asking for this specific handle to get exposed, but I'm also kind of asking a general question of "what is the reasoning for exposing vs. not exposing certain bits of KAPLAY's internals?"
The text was updated successfully, but these errors were encountered:
I recently discovered the little ZzFX sound generator by @KilledByAPixel, so I thought I'd try to write a KAPLAY plugin to add it... Unfortunately there is one thing that gets in the way of writing a well-behaved ZzFX plugin.
The plugin would add a function
loadZzFX(name, ZzFX parameters)
to KAPLAY, and then monkey-patchplay()
to check the ZzFX sound-name-to-parameters mapping as well and callzzfx()
if the sound name is registered there, otherwise defer to KAPLAY's original function. This all can be done as-is, but a step up from that (and what would probably be expected) would be to patch ZzFX as well so that it inserts its audio into KAPLAY'smasterNode
so that ZzFX sounds respond tovolume()
and getrecord()
'ed, but I can't do that because the only thing that is exposed on the context in terms of the audio system is the AudioContext, not the masterNode.So I'm kind of asking for this specific handle to get exposed, but I'm also kind of asking a general question of "what is the reasoning for exposing vs. not exposing certain bits of KAPLAY's internals?"
The text was updated successfully, but these errors were encountered: