Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BCU30 - Webでできるマルチメディア表現

BCU30 - Webでできるマルチメディア表現

LeonardoKen Orihara

March 11, 2017
Tweet

More Decks by LeonardoKen Orihara

Other Decks in Technology

Transcript

  1. const context = new window.AudioContext(); const sourceNode = context.createMediaElementSource(); const

    gainNode = context.createGain(); const biquadFilterNode = context.createBiquadFilter(); const analyserNode = context.createAnalyser(); TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF
  2. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF sourceNode.connect(

    gainNode ); gainNode.connect( biquadFilterNode );
  3. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF sourceNode.connect(

    gainNode ); gainNode.connect( biquadFilterNode ); biquadFilterNode.connect( analyserNode );
  4. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF sourceNode.connect(

    gainNode ); gainNode.connect( biquadFilterNode ); biquadFilterNode.connect( analyserNode ); analyserNode.connect( context.destination );
  5. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF sourceNode.connect(

    gainNode ); gainNode.connect( biquadFilterNode ); biquadFilterNode.connect( analyserNode ); analyserNode.connect( context.destination );
  6. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF ⾳量を調節

    GainNode.gain.value = 0.8; BiquadFilterNode.type = "lowpass”; BiquadFilterNode.frequency.value = 22050; エフェクト <audio>
  7. TPVSDF /PEF HBJO /PEF CJRVBE 'JMUFS /PEF BOBMZTFS /PEF ⾳量を調節

    GainNode.gain.value = 0.8; BiquadFilterNode.type = "lowpass”; BiquadFilterNode.frequency.value = 22050; エフェクト <audio>
  8. navigator.requestMIDIAccess({ sysex: true }).then( onMIDISuccess, onMIDIFailure ); const onMIDISuccess =

    ( midi ) => { midi.inputs.onmidimessage = onMIDIMessage; } const onMIDIMessage = ( event ) => { console.log( event.data ); } MIDIコントローラ キーボードとか MIDIメッセージ Web event.data
  9. const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(

    fov, aspect, near, far ); const light = new THREE.DirectionalLight( 0xffffff );