创作枯竭,不知该听哪首歌? 作为音乐人,我们都曾经历过这种创作瓶颈,对着乐器却毫无灵感。别担心,这款随机歌曲选择器或许能帮你重新点燃创作热情!
我创建了一个简单的网页(你甚至可以复制粘贴下面的代码到文本文件,保存为html文件,然后在浏览器中打开!),它会从A Day to Remember乐队的众多曲目中随机选择一首。告别在歌单中无尽地翻找,只需一键,即可获得新的创作挑战!
非常简单!网页上有一个按钮,点击后会触发一个JavaScript函数。该函数会随机从预设的A Day to Remember曲目列表中(从“Intro”到“Last Chance to Dance (Bad Friend)”)选择一首歌曲,然后在页面上显示歌曲标题。
作为A Day to Remember的忠实粉丝,我经常想学习或翻弹他们的歌曲。但他们庞大的曲目有时会让人不知所措。因此,我需要一个快速简便的方法来打破常规,挑战自己。我相信其他音乐人也会觉得它很有用!
代码(供感兴趣者参考):
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Random Song Picker</title>
<h1>Random A Day to Remember Song Picker</h1>
<button onclick="pickSong()">Pick a Song</button>
<p id="song"></p>
<script>
const songs = [
"Intro", "Heartless", "Your Way With Words Is Through Silence", "A Second Glance",
"If Looks Could Kill", "The Danger in Starting a Fire", "Show 'Em the Ropes",
"You Should've Killed Me When You Had the Chance", "Point of No Return", "Somewhere in Neverland",
"Came Back Haunted", "The Downfall of Us All", "My Life for Hire", "The Danger in Starting a Fire",
"A Shot in the Dark", "Start the Fire", "Mr. Highway's Thinking About the End", "Have Faith in Me",
"Welcome to the Family", "Homesick", "Runnin' for Cover", "The Last Song", "Sticks & Bricks",
"All I Want", "It's Complicated", "This Is the House That Doubt Built", "2nd Sucks",
"Better Off This Way", "City of Ocala", "Right Back at It Again", "Sometimes You're the Hammer, Sometimes You're the Nail",
"Dead & Buried", "The Document Speaks for Itself", "Rescue Me", "I Remember", "Violence (Enough Is Enough)",
"Life Lessons Learned the Hard Way", "Bad Vibrations", "Paranoia", "Naivety", "Bullfight",
"The Reaping", "Just Keep Breathing", "We Got This", "Same Book but Never the Same Page",
"Turn Off the Radio", "Brick Wall", "Mindreader", "Resentment", "Bloodsucker",
"Only Money", "Degenerates", "Last Chance to Dance (Bad Friend)"
];
function pickSong() {
const randomIndex = Math.floor(Math.random() * songs.length);
document.getElementById("song").innerText = "尝试演奏这首歌: " + songs[randomIndex];
}
</script>
还在等什么?快来试试这个随机歌曲选择器,开启你的音乐冒险之旅吧!欢迎在评论区分享你抽到的歌曲!祝你玩得开心!