Skip to content

Commit 33c52e6

Browse files
author
global_name
committed
Add Piano Visualizer article (Day 101)
1 parent 67eb3d4 commit 33c52e6

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
layout: post
3+
title: "Day 101: Piano Visualizer / 钢琴可视化工具"
4+
author: "iOSDevLog"
5+
date: 2026-04-16 20:00:00 +0800
6+
category: ["AI", "Open Source"]
7+
tags: ["piano", "visualizer", "synthesia", "midi", "pdf", "music"]
8+
---
9+
10+
# Piano Visualizer / 钢琴可视化工具
11+
12+
A Synthesia-like piano keyboard visualization software with MIDI playback, audio synthesis, PDF sheet music display, and manual keyboard input.
13+
14+
一个类似 Synthesia 的钢琴键盘可视化软件,支持 MIDI 播放、音频合成、PDF 乐谱显示和手动键盘输入。
15+
16+
## Screenshots
17+
18+
![AI_Piano](/assets/images/ai-piano/AI_Piano.png)
19+
20+
![AI_Piano_Fullscreen](/assets/images/ai-piano/AI_Piano_Fullscreen.png)
21+
22+
## Features / 功能特性
23+
24+
- 88-key piano keyboard visualization / 88键钢琴键盘可视化
25+
- MIDI file playback with real-time note highlighting / MIDI 文件播放与实时音符高亮
26+
- Falling notes visualization (like Synthesia) / 下落音符可视化(类似 Synthesia)
27+
- Audio synthesis with polyphonic sound output / 多音复音音频合成
28+
- PDF sheet music viewer / PDF 乐谱查看器
29+
- Manual keyboard input - play piano with your computer keyboard / 手动键盘输入 - 用电脑键盘弹钢琴
30+
- Keyboard labels showing which computer keys map to piano keys / 键盘标签显示电脑按键与钢琴键的映射
31+
- Fullscreen support / 全屏支持
32+
- Resizable window / 可调整窗口大小
33+
- Drag and drop MIDI/PDF files / 拖放 MIDI/PDF 文件
34+
- Help overlay (F1) / 帮助覆盖层(F1)
35+
- Synchronized playback / 同步播放
36+
37+
## Dependencies / 依赖项
38+
39+
```bash
40+
# Install dependencies (Ubuntu/Debian) / 安装依赖(Ubuntu/Debian)
41+
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev librtmidi-dev poppler-utils
42+
```
43+
44+
## Building / 编译
45+
46+
```bash
47+
mkdir build && cd build
48+
cmake ..
49+
make
50+
```
51+
52+
## Usage / 使用方法
53+
54+
```bash
55+
# Play MIDI with falling notes visualization / 播放 MIDI 并显示下落音符
56+
./piano_visualizer song.mid
57+
58+
# Play MIDI with PDF sheet music / 播放 MIDI 并显示 PDF 乐谱
59+
./piano_visualizer song.mid sheet.pdf
60+
61+
# View PDF only and play manually with keyboard / 仅查看 PDF 并用键盘手动演奏
62+
./piano_visualizer sheet.pdf
63+
```
64+
65+
## Controls / 控制键
66+
67+
### MIDI Playback (when MIDI file is loaded) / MIDI 播放(加载 MIDI 文件时)
68+
- **Space / 空格键**: Play/Pause MIDI / 播放/暂停 MIDI
69+
- **Backspace / 退格键**: Stop MIDI / 停止 MIDI
70+
71+
### Manual Piano Playing / 手动钢琴演奏
72+
You can play the piano manually using your computer keyboard:
73+
74+
您可以使用电脑键盘手动演奏钢琴:
75+
76+
**Lower octave (C3-C4) / 低八度(C3-C4):**
77+
- White keys / 白键: `Z X C V B N M`
78+
- Black keys / 黑键: `S D G H J`
79+
80+
**Middle octave (C4-C5) / 中八度(C4-C5):**
81+
- White keys / 白键: `Q W E R T Y U I`
82+
- Black keys / 黑键: `2 3 5 6 7`
83+
84+
## Source Code / 源代码
85+
86+
- GitHub: [https://github.com/iOSDevLog/AI_Piano](https://github.com/iOSDevLog/AI_Piano)
87+
88+
---
45.9 KB
Loading
19.7 KB
Loading

0 commit comments

Comments
 (0)