ucscode/php-svg-piano 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ucscode/php-svg-piano

最新稳定版本:2.0.0

Composer 安装命令:

composer require ucscode/php-svg-piano

包简介

A PHP library for generating SVG representations of a piano keyboard with customizable styles and note highlights.

README 文档

README

PhpSvgPiano is a PHP library for generating SVG representations of a piano keyboard with customizable styles and note highlights.

PhpSvgPiano was inspired by the Svguitar library and brings a similar SVG-based approach to piano visualization.

Features

  • Generate a scalable SVG piano keyboard
  • Highlight pressed keys
  • Customize key colors and text styles
  • Define octave range and accidental preferences
  • Object-oriented and easy to extend

Installation

Install via Composer:

composer require ucscode/php-svg-piano

Usage

Basic Example

use Ucscode\PhpSvgPiano\Piano;

$piano = new Piano("C4 E4 G4");

echo $piano->render();

This will generate an SVG with C4, E4, and G4 pressed.

CEG Chord

Documentation

The documentation covers basic information from installation and usage to advanced configuration and customization options.

For detailed information, visit the documentation page.

Contributing

Contributions are welcome. Feel free to:

  • Report issues
  • Submit feature requests
  • Fork and improve the library

License

This project is licensed under the MIT License. See the LICENSE file for details.

Inspiration

PhpSvgPiano was inspired by the Svguitar library, which provides an SVG-based approach for rendering guitar chord diagrams. This project extends the concept to the piano, offering a flexible and object-oriented solution for generating customizable SVG piano keyboards.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-23