gibber-cc / gibber

An audiovisual live coding environment for the browser
MIT License
909 stars 81 forks source link

"TypeError: graph.gen is not a function" when adding gen() as modulation on synth #79

Closed PSW5 closed 2 years ago

PSW5 commented 2 years ago

Love concept of Gibber and learning it. Wondering if there is difference between playground website and local liberary. Why gen() works online but not working locally. Does I miss something?

--------------------------- html ---------------------------
<!doctype html>
<html lang='en'>

<head>
  <script src='./dist/gibber.audio.js'></script>
  <!-- <script src='./dist/gibberish_worklet.js'></script> -->
  <style> body{ background:black; color:white } </style>
</head>

<body>
  <p>click to start</p>
</body>

<script>

  Gibber
    .init({ workletPath:'./dist/gibberish_worklet.js' })
    .then( ()=> {
      Clock.bpm = 120

        bass = Synth('acidBass2', { saturation:20, gain:.3 })

        bass.note.tidal( '0 0 0 0 4 6 0 ~ 0 ~ 7 -7 ~ 0 -7 0' )
        bass.decay.seq( [1/32, 1/16], 1/2 )
        bass.glide.seq( [1,1,100,100 ], 1/4 )
        bass.Q = gen( 0.5 + cycle(0.1) * 0.49 ) //  <---------------------------------------------------- here

    })
</script>

</html>