Ищу песню из которой эта мелодия.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sound</title>
<style>
button {margin: 33px; padding: 21px; border:3px solid black; border-radius: 50%; cursor:pointer;}
</style>
</head>
<body text="black" bgcolor=#bed>
<center>
<button onclick="melody2026()">play</button>
<script>
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
function playTone(duration, x) {
const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
oscillator.type = 'sine'; // Тип звука
oscillator.frequency.value =
[554.36,
587.33,
659.26,
587.33,
554.36,
587.33,
698.46,
698.46,
587.33,
587.33,
440,
440,
349.23,
349.23,
329.63,
293.66][x]; // Частота Гц
gainNode.gain.setValueAtTime(0.1, audioCtx.currentTime);
oscillator.start();
oscillator.stop(audioCtx.currentTime + duration / 1000);
}
function melody2026(){
const unit = 200; // Базовая единица времени (мс)
let delay = 0;
for(let i=0; i<16; i++){
setTimeout(() => playTone(unit,i), delay);
delay += unit * 2; // Дополнительная пауза между буквами
}
}
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sound</title>
<style>
button {margin: 33px; padding: 21px; border:3px solid black; border-radius: 50%; cursor:pointer;}
</style>
</head>
<body text="black" bgcolor=#bed>
<center>
<button onclick="melody2026()">play</button>
<script>
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
function playTone(duration, x) {
const oscillator = audioCtx.createOscillator();
const gainNode = audioCtx.createGain();
oscillator.connect(gainNode);
gainNode.connect(audioCtx.destination);
oscillator.type = 'sine'; // Тип звука
oscillator.frequency.value =
[554.36,
587.33,
659.26,
587.33,
554.36,
587.33,
698.46,
698.46,
587.33,
587.33,
440,
440,
349.23,
349.23,
329.63,
293.66][x]; // Частота Гц
gainNode.gain.setValueAtTime(0.1, audioCtx.currentTime);
oscillator.start();
oscillator.stop(audioCtx.currentTime + duration / 1000);
}
function melody2026(){
const unit = 200; // Базовая единица времени (мс)
let delay = 0;
for(let i=0; i<16; i++){
setTimeout(() => playTone(unit,i), delay);
delay += unit * 2; // Дополнительная пауза между буквами
}
}
</script>
</body>
</html>
Мы платим до 300 руб за каждую тысячу уникальных поисковых переходов на Ваш вопрос или ответ Подробнее
| 4 ОТВЕТА |
