Soundmind is an absolute pitch testing game developed on DE1-SoC FPGA. Players are challenged to identify musical notes by ear, progressing through different difficulty levels to test and improve their absolute pitch ability.
- 🎵 Support for 5 musical notes (C, D, E, F, G) playback and recognition
- 🎮 Graphical user interface display
- 🎯 4 difficulty levels
- 📚 Practice mode for individual note training
- 🎨 Beautiful game interface and animation effects
- DE1-SoC FPGA development board
- PS/2 keyboard
- VGA monitor
- Audio output device
The game includes the following states:
-
Start Screen (
GAME_START)- Displays game title and start options
- Press spacebar to enter practice mode
-
Practice Mode (
GAME_STUDY)- Practice each note individually
- Press C, D, E, F, G keys to listen to corresponding notes
- Press Enter to access the settings screen
-
Settings Screen (
GAME_SETUP)- Select game difficulty (0-3)
- Use up/down arrow keys to adjust difficulty
- Press spacebar to start the game
-
Gameplay (
GAME_PLAYING)- System randomly plays notes
- Player must identify the notes correctly
- Use C, D, E, F, G keys to input notes
-
Success Screen (
GAME_SUCCESS)- Shows success message and score
- Press spacebar to return to start screen
-
Game Over Screen (
GAME_OVER)- Shows failure message
- Press spacebar to return to start screen
-
Level 0: Beginner level
- Longest pause time between notes
- Suitable for beginners
-
Level 1: Elementary level
- Moderate pause time between notes
- Suitable for players familiar with game mechanics
-
Level 2: Intermediate level
- Short pause time between notes
- Requires faster note identification
-
Level 3: Advanced level
- Minimal pause time between notes
- Requires rapid absolute pitch recognition
Soundmind/
├── state/ # Main source code
│ ├── display.c # Main program file
│ ├── *.h # Audio and image resource files
│ └── Makefile # Compilation configuration file
├── png/ # Image resources
├── music_file/ # Audio resources
└── old_version/ # Old version code
-
Ensure necessary development tools are installed:
- RISC-V cross-compilation toolchain for NIOS V
- GDB server and client
- DE1-SoC development environment with NIOS V support
-
Compile the project:
cd state make de1-soc -
Download the compiled program to DE1-SoC:
make gdb_server make client
- Spacebar: Start game/confirm selection
- Up/Down arrows: Adjust difficulty level
- C, D, E, F, G keys: Input corresponding notes
- Enter key: Access settings screen from practice mode
- Display control:
0xFF203020 - PS/2 keyboard:
0xFF200100 - Audio control:
0xFF203040 - Timer:
0xFF202000
- Resolution: 320x240
- Uses double buffering technique
- RGB565 color format
- Supports real-time playback of 5 notes
- Uses audio FIFO buffer
- Adjustable volume and playback speed
Issues and Pull Requests to improve the project are welcome.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.