Transaction

d05e09863cbffeb6e6cfbcff03994d2ada3d35db736b8babfe70eced02ef111c
Timestamp (utc)
2024-07-06 08:18:04
Fee Paid
0.00001083 BSV
(
9.93289923 BSV
-
9.932888400000001 BSV
)
Fee Rate
49.99 sat/KB
Version
1
Confirmations
81,228
Size Stats
21,643 B

2 Outputs

Total Output:
9.932888400000001 BSV
  • v©müK-mWvõ".Ká2n™=dðˆ¬cordQ text/htmlM’S<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ドラムマシン</title> <style> body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #1a1a1a; color: #fff; } .drum-machine { background-color: #2c2c2c; border-radius: 10px; padding: 20px; box-shadow: 0 0 10px rgba(0,0,0,0.5); display: grid; grid-template-areas: "display display display display" "pads pads pads pads"; gap: 20px; } .display { grid-area: display; background-color: #000; padding: 40px; border-radius: 10px; text-align: center; font-size: 24px; color: #fff; box-shadow: 0 0 5px rgba(0,0,0,0.5); position: relative; } .visualizer { width: 100%; height: 100px; display: flex; align-items: flex-end; overflow: hidden; } .bar { flex: 1; height: 100%; background-color: #4ecdc4; margin: 0 1px; } .pads { grid-area: pads; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; justify-items: center; } .pad { width: 100px; height: 100px; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; transition: background-color 0.1s, transform 0.1s; } .pad:active { transform: scale(0.95); } #kick { background-color: #ff6b6b; } #snare { background-color: #4ecdc4; } #hihat { background-color: #feca57; } #cymbals { background-color: #54a0ff; } #kick2 { background-color: #ff7675; } #snare2 { background-color: #55efc4; } #clap { background-color: #ff9f43; } #cowbell { background-color: #ffda79; } #effect1 { background-color: #6c5ce7; } #effect2 { background-color: #fdcb6e; } #effect3 { background-color: #00cec9; } #effect4 { background-color: #d63031; } </style> </head> <body> <div class="drum-machine"> <div class="display"> <div class="visualizer" id="visualizer"> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> <div class="bar"></div> </div> </div> <div class="pads"> <button id="kick" class="pad">Kick</button> <button id="snare" class="pad">Snare</button> <button id="hihat" class="pad">Hi-Hat</button> <button id="cymbals" class="pad">Cymbals</button> <button id="kick2" class="pad">Kick 2</button> <button id="snare2" class="pad">Snare 2</button> <button id="clap" class="pad">Clap</button> <button id="cowbell" class="pad">Cowbell</button> <button id="effect1" class="pad">Effect 1</button> <button id="effect2" class="pad">Effect 2</button> <button id="effect3" class="pad">Effect 3</button> <button id="effect4" class="pad">Effect 4</button> </div> </div> <script> // AudioContextの作成 const audioContext = new (window.AudioContext || window.webkitAudioContext)(); const analyser = audioContext.createAnalyser(); analyser.fftSize = 256; const bufferLength = analyser.frequencyBinCount; const dataArray = new Uint8Array(bufferLength); // ビジュアライザーのバー要素を取得 const bars = Array.from(document.querySelectorAll('.bar')); function updateVisualizer() { analyser.getByteFrequencyData(dataArray); bars.forEach((bar, index) => { const value = dataArray[index] / 256; bar.style.height = `${value * 100}%`; bar.style.backgroundColor = `rgb(${value * 255}, 100, 150)`; }); requestAnimationFrame(updateVisualizer); } updateVisualizer(); // キックドラムの音を生成する関数 function createKick() { const oscillator = audioContext.createOscillator(); const gain = audioContext.createGain(); oscillator.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); oscillator.frequency.setValueAtTime(150, audioContext.currentTime); oscillator.frequency.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); oscillator.start(audioContext.currentTime); oscillator.stop(audioContext.currentTime + 0.5); } // スネアドラムの音を生成する関数 function createSnare() { const noise = audioContext.createBufferSource(); const noiseFilter = audioContext.createBiquadFilter(); const noiseEnvelope = audioContext.createGain(); const osc = audioContext.createOscillator(); const oscEnvelope = audioContext.createGain(); const bufferSize = audioContext.sampleRate * 2; const buffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate); const data = buffer.getChannelData(0); for (let i = 0; i < bufferSize; i++) { data[i] = Math.random() * 2 - 1; } noise.buffer = buffer; noiseFilter.type = 'highpass'; noiseFilter.frequency.value = 1000; noise.connect(noiseFilter); noiseFilter.connect(noiseEnvelope); noiseEnvelope.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'triangle'; osc.frequency.value = 100; osc.connect(oscEnvelope); oscEnvelope.connect(analyser); analyser.connect(audioContext.destination); noiseEnvelope.gain.setValueAtTime(1, audioContext.currentTime); noiseEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.2); oscEnvelope.gain.setValueAtTime(0.7, audioContext.currentTime); oscEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.1); osc.start(audioContext.currentTime); noise.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.2); noise.stop(audioContext.currentTime + 0.2); } // ハイハットの音を生成する関数 function createHihat() { const fundamental = 40; const ratios = [2, 3, 4.16, 5.43, 6.79, 8.21]; const bandpass = audioContext.createBiquadFilter(); bandpass.type = 'bandpass'; bandpass.frequency.value = 10000; const highpass = audioContext.createBiquadFilter(); highpass.type = 'highpass'; highpass.frequency.value = 7000; const fundamental_osc = audioContext.createOscillator(); fundamental_osc.frequency.value = fundamental; const gain = audioContext.createGain(); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.05); fundamental_osc.connect(bandpass); bandpass.connect(highpass); highpass.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); const time = audioContext.currentTime; fundamental_osc.start(time); fundamental_osc.stop(time + 0.05); ratios.forEach(ratio => { const osc = audioContext.createOscillator(); osc.type = 'square'; osc.frequency.value = fundamental * ratio; osc.connect(bandpass); osc.start(time); osc.stop(time + 0.05); }); } // シンバルの音を生成する関数 function createCymbals() { const noise = audioContext.createBufferSource(); const noiseBuffer = audioContext.createBuffer(1, audioContext.sampleRate * 0.5, audioContext.sampleRate); const output = noiseBuffer.getChannelData(0); for (let i = 0; i < noiseBuffer.length; i++) { output[i] = Math.random() * 2 - 1; } noise.buffer = noiseBuffer; const noiseEnvelope = audioContext.createGain(); noiseEnvelope.gain.setValueAtTime(1, audioContext.currentTime); noiseEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); noise.connect(noiseEnvelope); noiseEnvelope.connect(analyser); analyser.connect(audioContext.destination); noise.start(audioContext.currentTime); noise.stop(audioContext.currentTime + 0.5); } // クラップの音を生成する関数 function createClap() { const noise = audioContext.createBufferSource(); const noiseBuffer = audioContext.createBuffer(1, audioContext.sampleRate * 0.2, audioContext.sampleRate); const output = noiseBuffer.getChannelData(0); for (let i = 0; i < noiseBuffer.length; i++) { output[i] = Math.random() * 2 - 1; } noise.buffer = noiseBuffer; const noiseFilter = audioContext.createBiquadFilter(); noiseFilter.type = 'bandpass'; noiseFilter.frequency.setValueAtTime(1000, audioContext.currentTime); const noiseEnvelope = audioContext.createGain(); noiseEnvelope.gain.setValueAtTime(1, audioContext.currentTime); noiseEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.2); noise.connect(noiseFilter); noiseFilter.connect(noiseEnvelope); noiseEnvelope.connect(analyser); analyser.connect(audioContext.destination); noise.start(audioContext.currentTime); noise.stop(audioContext.currentTime + 0.2); } // カウベルの音を生成する関数 function createCowbell() { const osc = audioContext.createOscillator(); const gain = audioContext.createGain(); osc.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'square'; osc.frequency.setValueAtTime(800, audioContext.currentTime); osc.frequency.exponentialRampToValueAtTime(400, audioContext.currentTime + 0.1); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.1); osc.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.1); } // 2つ目のキックの音を生成する関数 function createKick2() { const oscillator = audioContext.createOscillator(); const gain = audioContext.createGain(); oscillator.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); oscillator.frequency.setValueAtTime(200, audioContext.currentTime); oscillator.frequency.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); oscillator.start(audioContext.currentTime); oscillator.stop(audioContext.currentTime + 0.5); } // 2つ目のスネアの音を生成する関数 function createSnare2() { const noise = audioContext.createBufferSource(); const noiseFilter = audioContext.createBiquadFilter(); const noiseEnvelope = audioContext.createGain(); const osc = audioContext.createOscillator(); const oscEnvelope = audioContext.createGain(); const bufferSize = audioContext.sampleRate * 2; const buffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate); const data = buffer.getChannelData(0); for (let i = 0; i < bufferSize; i++) { data[i] = Math.random() * 2 - 1; } noise.buffer = buffer; noiseFilter.type = 'highpass'; noiseFilter.frequency.value = 1200; noise.connect(noiseFilter); noiseFilter.connect(noiseEnvelope); noiseEnvelope.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'triangle'; osc.frequency.value = 200; osc.connect(oscEnvelope); oscEnvelope.connect(analyser); analyser.connect(audioContext.destination); noiseEnvelope.gain.setValueAtTime(1, audioContext.currentTime); noiseEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.2); oscEnvelope.gain.setValueAtTime(0.7, audioContext.currentTime); oscEnvelope.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.1); osc.start(audioContext.currentTime); noise.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.2); noise.stop(audioContext.currentTime + 0.2); } // 新しい効果音を生成する関数 function createEffect1() { const osc = audioContext.createOscillator(); const gain = audioContext.createGain(); osc.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'sawtooth'; osc.frequency.setValueAtTime(300, audioContext.currentTime); osc.frequency.exponentialRampToValueAtTime(50, audioContext.currentTime + 1); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 1); osc.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 1); } function createEffect2() { const osc = audioContext.createOscillator(); const gain = audioContext.createGain(); osc.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'triangle'; osc.frequency.setValueAtTime(800, audioContext.currentTime); osc.frequency.exponentialRampToValueAtTime(100, audioContext.currentTime + 0.5); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); osc.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.5); } function createEffect3() { const osc = audioContext.createOscillator(); const gain = audioContext.createGain(); osc.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'sine'; osc.frequency.setValueAtTime(500, audioContext.currentTime); osc.frequency.exponentialRampToValueAtTime(100, audioContext.currentTime + 0.5); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.5); osc.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.5); } function createEffect4() { const osc = audioContext.createOscillator(); const gain = audioContext.createGain(); osc.connect(gain); gain.connect(analyser); analyser.connect(audioContext.destination); osc.type = 'square'; osc.frequency.setValueAtTime(400, audioContext.currentTime); osc.frequency.exponentialRampToValueAtTime(50, audioContext.currentTime + 0.7); gain.gain.setValueAtTime(1, audioContext.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.7); osc.start(audioContext.currentTime); osc.stop(audioContext.currentTime + 0.7); } // ドラムパッドをトリガーする関数 function triggerDrum(type) { switch(type) { case 'kick': createKick(); break; case 'snare': createSnare(); break; case 'hihat': createHihat(); break; case 'cymbals': createCymbals(); break; case 'kick2': createKick2(); break; case 'snare2': createSnare2(); break; case 'clap': createClap(); break; case 'cowbell': createCowbell(); break; case 'effect1': createEffect1(); break; case 'effect2': createEffect2(); break; case 'effect3': createEffect3(); break; case 'effect4': createEffect4(); break; } } // イベントリスナーの設定 document.getElementById('kick').addEventListener('click', () => triggerDrum('kick')); document.getElementById('snare').addEventListener('click', () => triggerDrum('snare')); document.getElementById('hihat').addEventListener('click', () => triggerDrum('hihat')); document.getElementById('cymbals').addEventListener('click', () => triggerDrum('cymbals')); document.getElementById('kick2').addEventListener('click', () => triggerDrum('kick2')); document.getElementById('snare2').addEventListener('click', () => triggerDrum('snare2')); document.getElementById('clap').addEventListener('click', () => triggerDrum('clap')); document.getElementById('cowbell').addEventListener('click', () => triggerDrum('cowbell')); document.getElementById('effect1').addEventListener('click', () => triggerDrum('effect1')); document.getElementById('effect2').addEventListener('click', () => triggerDrum('effect2')); document.getElementById('effect3').addEventListener('click', () => triggerDrum('effect3')); document.getElementById('effect4').addEventListener('click', () => triggerDrum('effect4')); // キーボードイベントの設定 document.addEventListener('keydown', (event) => { switch(event.key) { case 'a': triggerDrum('kick'); break; case 's': triggerDrum('snare'); break; case 'd': triggerDrum('hihat'); break; case 'f': triggerDrum('cymbals'); break; case 'g': triggerDrum('kick2'); break; case 'h': triggerDrum('snare2'); break; case 'j': triggerDrum('clap'); break; case 'k': triggerDrum('cowbell'); break; case '1': triggerDrum('effect1'); break; case '2': triggerDrum('effect2'); break; case '3': triggerDrum('effect3'); break; case '4': triggerDrum('effect4'); break; } }); </script> </body> </html> h
    https://whatsonchain.com/tx/d05e09863cbffeb6e6cfbcff03994d2ada3d35db736b8babfe70eced02ef111c