4 votes

ZzFX - Zuper Zmall Zound Zynth

4 comments

  1. [4]
    KilledByAPixel
    (edited )
    Link
    Howdy, this is a major update for a project I've been working on for a while. The idea is to make a simpler and in some ways better bfxr alternative that can be used to generate sounds in real...

    Howdy, this is a major update for a project I've been working on for a while. The idea is to make a simpler and in some ways better bfxr alternative that can be used to generate sounds in real time rather then playing wave files.

    This new version has over twice as many parameters, presets, improved compatibility, better UI, and so much more. Also the code has a very small footprint so it is suitable for code golfing competitions like js13k.

    There are nearly 20 games using it already, here is the best game not by me...

    https://js13kgames.com/entries/the-wandering-wraith

    And here's what I think is my best game using it...

    https://www.newgrounds.com/portal/view/747570

    Actual ZzFXMicro JavaScript Code - All you need to play ZzFX sounds!

    zzfxV=.3;zzfx=(I=1,J=.05,g=220,e=.1,f=.1,l=.1,m=0,K=1,r=0,z=0,t=0,u=0,n=0,A=0,B=0,C=0,v=0,h=0,c=2*Math.PI,b=44100,w=L=>L*2*Math.random()-L,M=r*=500*c/b**2,D=g*=(1+w(J))*c/b,E,p=[],F=0,G=0,d=0,k=1,H=0,a,x,y,q=zzfxX.createBufferSource())=>{e=50+e*b|0;f=f*b|0;l=l*b|0;h=h*b/1e3|0;z*=500*c/b**3;E=e+f+l;B*=c/b;t*=c/b;u=u*b|0;n=n*b|0;for(C*=c;d<E;p[d++]=a)a=F*g*Math.cos(G*B+C),a=m?1<m?2<m?3<m?Math.sign(Math.cos((a%c)**3)):Math.max(Math.min(Math.tan(a),1),-1):1-(2*a/c%2+2)%2:1-4*Math.abs(Math.round(a/c)-a/c):Math.cos(a),a=Math.sign(a)*Math.abs(a)**K,x=d<e?d/e:d<e+f?1:1-(d-e-f)/l,a*=x*I*zzfxV,a=v?(a/v*9|0)*v/9:a,a=h?a/2+(h>d?0:(d<e+f?1:x)*p[d-h]/2):a,F+=1+w(A),G+=1+w(A),g+=r+=z,k&&++k>u&&(D+=t,g+=t,k=0),n&&++H>n&&(g=D,r=M,H=1,k=k||1);y=zzfxX.createBuffer(1,p.length,b);y.getChannelData(0).set(p);q.buffer=y;q.connect(zzfxX.destination);q.start()};zzfxX=new AudioContext

    1 vote
    1. [3]
      cfabbro
      Link Parent
      Newgrounds... now there is a name I haven't seen in a long time. TBH I didn't even know they were still operating, but it's good to know that they are! Awesome game BTW. I remember playing the...

      And here's what I think is my best game using it...

      https://www.newgrounds.com/portal/view/747570

      Newgrounds... now there is a name I haven't seen in a long time. TBH I didn't even know they were still operating, but it's good to know that they are! Awesome game BTW. I remember playing the last one you created and submitted here, but I enjoyed this one a lot more, and can actually see myself going back to it. Oh yeah, and the synth is pretty neat too. ;)

      1 vote
      1. [2]
        KilledByAPixel
        Link Parent
        Thanks! I have had really good results with that game on Newgrounds, they have a pretty good community.

        Thanks! I have had really good results with that game on Newgrounds, they have a pretty good community.

        1 vote
        1. cfabbro
          Link Parent
          Yeah, Newgrounds used to be my jam back in the day. I just haven't been back there in probably over a decade, and so I figured that like most sites of that age it would be long gone by now. It...

          Yeah, Newgrounds used to be my jam back in the day. I just haven't been back there in probably over a decade, and so I figured that like most sites of that age it would be long gone by now. It makes me immensely happy to learn it's still around though, since a bunch of my favorite animators, video game makers, and content creators got their start on there. :)

          1 vote