GithubHelp home page GithubHelp logo

Comments (1)

surikov avatar surikov commented on June 10, 2024

Launch example https://playcode.io/1035150

Code

function playTremolo(){
  var selectedPreset=_tone_0010_SoundBlasterOld_sf2;
	var AudioContextFunc = window.AudioContext || window.webkitAudioContext;
	var audioContext = new AudioContextFunc();
	var player=new WebAudioFontPlayer();
  var pitch=12*4+7;
  var volume=0.75;
  var duration=1;
  var when=audioContext.currentTime + 0;
  var slides=[
    { delta: 0.5, when: 0.05 }
    ,{ delta: -0.5, when: 0.1 }
	  ,{ delta: 0.5, when: 0.15 }
	  ,{ delta: -0.5, when: 0.2 }
	  ,{ delta: 0.5, when: 0.25 }
	  ,{ delta: -0.5, when: 0.3 }
	  ,{ delta: 0.5, when: 0.35 }
	  ,{ delta: -0.5, when: 0.4 }
	  ,{ delta: 0.5, when: 0.45 }
	  ,{ delta: -0.5, when: 0.5 }
	  ,{ delta: 0.5, when: 0.55 }
	  ,{ delta: -0.5, when: 0.6 }
	  ,{ delta: 0.5, when: 0.65 }
	  ,{ delta: -0.5, when: 0.7 }
	  ,{ delta: 0.5, when: 0.75 }
	  ,{ delta: -0.5, when: 0.8 }
	  ,{ delta: 0.5, when: 0.85 }
	  ,{ delta: -0.5, when: 0.9 }
	  ,{ delta: 0.5, when: 0.95 }
    ];
  var audioBufferSourceNode = player.queueWaveTable(audioContext
    , audioContext.destination
    , selectedPreset
    , when
    , pitch
    , duration
    , volume
    , slides
    );
}

from webaudiofont.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.