霜染枫丹 发表于 2026-7-5 21:08

黄梅戏 红荷绿柳 韩再芬+AI


<style>
    @import 'https://638183.freep.cn/638183/web/tz/tz.v4.css';

    .pa {
      --offsetX: 80px;
      --bg: url('https://ff.xiaoqiaodali.top:5401/i/2026/07/05/6a4a45dc8e7ea.gif') no-repeat center/cover;
      --ma-size: 6%;
      width: 1300px;
      height: 731px;
      position: relative;
      overflow: hidden;
    }

    .pa *, .pa *::before, .pa *::after {
      content: none !important;
    }

    #custom-lrc-container {
      position: absolute;
      top: -0px;
      left: -130px;   
      display: flex;
      justify-content: center;
      align-items: center;   
      width: 400px;      
      height: 400px;      
      z-index: 9999;
      pointer-events: none;
      overflow: visible;
    }

    .lrc-line {
      writing-mode: vertical-rl;   
      text-orientation: upright;   
      white-space: pre;
      font-size: 28px;
      font-weight: bold;
      text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
      opacity: 0;
      transform: scale(0.9) translateY(20px);
      animation: lrcFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
      position: relative;
      flex-shrink: 0;
    }

    @keyframes lrcFadeIn {
      to {
            opacity: 1;
            transform: scale(1) translateY(0);
            text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
      }
    }

    .char-color {
      display: inline-block;
      animation: charGlow 0.8s forwards;
    }

    @keyframes charGlow {
      to {
            text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
      }
    }
</style>

<div class="pa">
    <div id="custom-lrc-container"></div>
</div>

<script type="module">
    import TZ from 'https://638183.freep.cn/638183/web/tz/tz.v4.js';
    const tz = TZ.TZ('pa');

    tz.add('audio', '', '', { src: 'https://imgimg.qqdsw8.cn/view.php/cbefb81484ecad1f950cf68b6158a9f4.mp3' });
    tz.add('video', '', 'pd-vid', {src: 'http://cccimg.com/view.php/30d85f08f6e84acaa27e7201a2f69eba.mp4'}).style('opacity: 0.5;');
    tz.add('img', '', 'ma', { src: 'https://ff.xiaoqiaodali.top:5401/i/2026/04/01/69ccfd3824de7.png' }).style('bottom: 60px;').playmp3();

    tz.bgprog().style('bottom: 40px; color: #fefefe; width: 24=280px;');
    tz.fs().style('left: 20px; top: 40px;');

    const lrcString = `
这时候正是红荷映绿柳
多么想依君赏荷小茶楼
我拨琵琶君赞偶
千里传声托海鸥
千里传声托海鸥
这时候正是红荷映绿柳
多么想依君赏荷小茶楼
清风伴月花依旧
独舞琵琶慰离愁
我拨琵琶君赞偶
千里传声托海鸥
`;

    let lines = [];
    let currentActiveIndex = -1;

    function getRandomColor() {
      const colors = [
            '#ed1941', '#ed1941', '#ed1941', ' #ed1941', '#CC3299',
            '#4fc3f7', '#5f27cd', '#00d2d3', '#ff3838', '#7efff5'
      ];
      return colors;
    }

    function initCustomLrc(lrcText) {
      const container = document.getElementById('custom-lrc-container');
      container.innerHTML = '';
      lines = [];
      currentActiveIndex = -1;

      const lineRegex = /\[(\d{2}):(\d{2})\.(\d{2,3})\](.*)/;
      const rawLines = lrcText.split('\n');

      rawLines.forEach(text => {
            const match = text.match(lineRegex);
            if (match) {
                const minutes = parseInt(match);
                const seconds = parseInt(match);
                const milliseconds = parseInt(match);
                const time = minutes * 60 + seconds + milliseconds / 1000;
                const content = match.trim();
                if (content) lines.push({ time, content });
            }
      });

      const audio = document.querySelector('.pa audio');
      if (audio) {
            audio.addEventListener('timeupdate', () => {
                const currentTime = audio.currentTime;
                let activeIndex = -1;
                for (let i = 0; i < lines.length; i++) {
                  if (currentTime >= lines.time) activeIndex = i;
                  else break;
                }
                if (activeIndex !== -1 && activeIndex !== currentActiveIndex) {
                  currentActiveIndex = activeIndex;
                  renderSingleLine(container, lines.content);
                }
            });

            audio.addEventListener('ended', () => {
                container.innerHTML = '';
                currentActiveIndex = -1;
            });

            audio.addEventListener('seeked', () => {
               const currentTime = audio.currentTime;
               let activeIndex = -1;
               for (let i = 0; i < lines.length; i++) {
                  if (currentTime >= lines.time) activeIndex = i;
                  else break;
               }
               if (activeIndex !== -1 && activeIndex !== currentActiveIndex) {
                  currentActiveIndex = activeIndex;
                  renderSingleLine(container, lines.content);
               }
            });
      }
    }

    function renderSingleLine(container, text) {
      container.innerHTML = '';
      const div = document.createElement('div');
      div.className = 'lrc-line';

      let html = '';
      for (let char of text) {
            const color = getRandomColor();
            html += `<span class="char-color" style="color: ${color};">${char}</span>`;
      }

      div.innerHTML = html;
      container.appendChild(div);
    }

    setTimeout(() => {
      const audioEl = document.querySelector('.pa audio');
      if(audioEl) initCustomLrc(lrcString);
      else {
            const observer = new MutationObserver(() => {
                const aud = document.querySelector('.pa audio');
                if(aud) { initCustomLrc(lrcString); observer.disconnect(); }
            });
            observer.observe(document.querySelector('.pa'), { childList: true, subtree: true });
      }
    }, 500);
</script>

霜染枫丹 发表于 2026-7-5 21:08

韩再芬演唱:
这时候正是红荷映绿柳
多么想依君赏荷小茶楼
我拨琵琶君赞偶
千里传声托海鸥
千里传声托海鸥


AI演唱
这时候正是红荷映绿柳
多么想依君赏荷小茶楼
清风伴月花依旧
独舞琵琶慰离愁
我拨琵琶君赞偶
千里传声托海鸥

霜染枫丹 发表于 2026-7-5 21:09


这首戏歌是黄梅戏《潘张玉良》的选段,著名黄梅戏演员韩再芬演唱。网上流传的AI演唱版本是男女声对唱,歌词略作了修改。具体演唱是谁原创找不到信息。我把着2段歌曲合成在一起,有兴趣的老师听听,您更喜欢那一段?

红影 发表于 2026-7-5 22:12

霜染枫丹 发表于 2026-7-5 21:09


肯定更喜欢女生版啊,AI创造的少了黄梅戏的味道呢。
这个有趣,有人声还有AI演唱,非常奇特的组合方式呢{:4_187:}

红影 发表于 2026-7-5 22:13

AI真是什么都能做呢,这制作真漂亮,欣赏枫丹好帖{:4_187:}

霜染枫丹 发表于 2026-7-5 22:24

红影 发表于 2026-7-5 22:12
肯定更喜欢女生版啊,AI创造的少了黄梅戏的味道呢。
这个有趣,有人声还有AI演唱,非常奇特的组合方式呢 ...

红影晚上好~~我也是喜欢听韩再芬的演唱,总觉得ai整个听下来太“圆润“了。呵呵,我找不到合适的词形容。{:4_204:}{:4_190:}

霜染枫丹 发表于 2026-7-5 22:27

红影 发表于 2026-7-5 22:13
AI真是什么都能做呢,这制作真漂亮,欣赏枫丹好帖

AI现在出图能力确实很强了,没有的素材我这样瞎玩的能做出来合适的,先出图片,再根据图片提出要求,生成视频。{:4_204:}{:4_190:}

红影 发表于 2026-7-7 21:12

霜染枫丹 发表于 2026-7-5 22:24
红影晚上好~~我也是喜欢听韩再芬的演唱,总觉得ai整个听下来太“圆润“了。呵呵,我找不到合适的词形容。 ...

我也是纯凭感觉说的,也许以后AI会唱得更好。

雨季工作室 发表于 2026-7-10 08:51

欣赏枫丹老师精彩作品!

梦江南 发表于 2026-7-10 10:30

AI唱黄梅戏也好听,有韩再芬的味道。欣赏漂亮的音画制作。祝夏安!{:4_199:}
页: [1]
查看完整版本: 黄梅戏 红荷绿柳 韩再芬+AI