Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars committed Jan 7, 2012
0 parents commit 5c117e4
Show file tree
Hide file tree
Showing 16 changed files with 3,076 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
@@ -0,0 +1,16 @@
PKGS=glib-2.0 gtk+-x11-2.0 libglade-2.0 alsa
CFLAGS=`pkg-config --cflags $(PKGS)` -g -O2 -Wall -W -Wno-unused-parameter
LDFLAGS=-g -O2
LDLIBS=`pkg-config --libs $(PKGS)` -lcrypto -lpopt -lm

all: dump_vos pmg

clean:
-rm -f dump_vos pmg *.o

dump_vos: dump_vos.c

pmg: pmg.c

%.out: %.vos dump_vos
./dump_vos $*.vos > $*.out
58 changes: 58 additions & 0 deletions README
@@ -0,0 +1,58 @@
Ĭ�ϵļ�λ��zxcv,./���ո�Ϊ��ͣ����Ҫ�޸ģ����Դ�����е�
on_main_area_key()����������ÿ��������Ӧ��GDK_xxx��������
/usr/include/gtk-2.0/gdk/gdkkeysyms.h�в鵽��

����: make���������������Makefile��PKGS��ļ�����װ��û��(ע��-devel
��rpmҲҪװ)��

����: ������timidity (�������²��������壬������ĩβ):
TIMIDITY_PCM_NAME=hw timidity -iA -Os -EFresamp=1 -EFreverb=1 -B2,8 -q0/0 -m2000
������ʾOpen sequencer port��ȷ�϶˿ں���128:0��128:1��
Ȼ��ִ��./pmg xxxx.vos�Ϳ������ˣ�

����vos�ļ���֮�⣬���ɼ����������в���(���./pmg --help):

-p CLIENT:PORT
ָ��MIDI�˿ںţ�Ҳ����timidity����ʱ��Open sequencer port���г���һϵ
�ж˿ں�(�����κ�һ��������)��Ĭ��Ϊ128:0��

-s SPEED
ָ������������ٶ�(��ֵԽ���ʾ�����ٶ�Խ��)��

-d TIME
ָ��dt0������ʾ�ж����ϸ�̶ȣ���ֵԽС���ж�Խ�ϸ�

-T TP
�����ӵ�tempo����TP(������vostempo)��

-o FNAME.pev
��������̼�¼��FNAME.pev�У��Ժ����-i FNAME.pev�طţ�
���δָ����ѡ���������ʱ����ʾAutosave file name��������̻��¼
������ļ��У�

-i FNAME.pev
�ط���ǰ��¼�ĵ�����̣�

-f
ͨ����-i���ã��������¼���÷֣�

-A
�Զ����࣮

��: ./pmg -s 1.5 -o contra-1.pev /dos/d/Vos1/Album/GameNAni/Contra.vos

ע������:
1����������ʱ���ڵ�ǰĿ¼��Ѱ��pmg.glade�ļ�(pmg.c�е�glade_fname)��
2������������ٶȲ�����Tempo���ı䣮
3����������ֵ�ȦΪ��ɫ��ʾ��׼�ˣ���ɫ��ʾ����̫�磬��ɫ��ʾ����̫����
4��Rate��ʾ���2����֮��ƽ��ÿ��ĵ÷֣�
5���Ʒֹ���: ������׼�˵�1�֣����������Ÿ���1�֡��м�ÿ���1�֣�������
��(������dt0��)��1�֣�ÿ��סһ���ٿ�1�֣��������Ʒ֣�
6������ͣʱ����������������������ȥ���Ƚ��������Ժ������ģ�
7����-f������ĵ÷��������ֱ�Ӽ�����ĵ÷ֻ���һЩС�ij��룬������Ϊ
*.pev�ļ�������¼��ʱ��ֻ׼ȷ��1ms��

����timidity�����������

����TIMIDITY_PCM_NAME=hw��ʾ��ʹ���������������������Խ�����ʱ��������
������Ϸ��ͬʱ������������ʹ��������
93 changes: 93 additions & 0 deletions README.en
@@ -0,0 +1,93 @@
Introduction
============

PMGMusic (or PMG in short) is a GNU/Linux clone of the well-known
music games VOS/CANMusic originally produced by Hanseulsoft. In these
games, notes in a song are represented by falling bricks on the
screen, with each note (do/re/mi/fa/so/la/ti) mapped to one key on the
keyboard. The player is expected to press the corresponding key at the
instant a note reaches a line on the screen, at which time the note
will be played. All these notes, together with the background music,
will form a complete song. The player is scored according to the
accuracy of the keypresses. The songs are stored in MIDI-based *.vos
files, and thousands of official and unofficial songs can be found
online, ranging from beginners' songs to difficult ones requiring 25+
keypresses per second.

The original VOS and CANMusic are closed-source Windows-only
applications, and this GPL program provides a way to play the game
under GNU/Linux. Note that only the "game engine" is included; the
songs (*.vos) files are to be obtained elsewhere, e.g. from an
existing VOS/CANMusic installation. Some annoyances (in the author's
opinion) in the original games have been fixed, and some convenient
features have been added.

Current features
================

* Supports almost all *.vos files from VOS and CANMusic
* Single-player only, and is fully playable
* Basic graphics and sound (ALSA-compatible hardware or software
synthesizer required, e.g. timidity)
* A brand-new scoring algorithm
* Recording and replaying demos
* Automatic mode, for songs too hard to play yourself
* Sound-only mode, if you just want to leisurely listen to the music
* Speed of falling notes and song tempo adjustable on the command line
* Optionally, the tempo can be adaptively adjusted according to how well
you are playing

Download
========

PMGMusic is currently only available as source code via Subversion. I
hope I'll find time to package it in the future. In the meantime, the
code in Subversion will probably work.

System Requirements
===================

This game is tested mainly on a 2.4GHz Pentium 4 with integrated
graphics and sound. On slower machines and/or those with poor video
drivers, you may need to turn down pmg's frame rate (see the "fps"
setting in the source code) and/or reduce the quality settings of your
software synthesizer (e.g. timidity).

Only GNU/Linux systems are supported for now due to the ALSA
dependency. You need basic development tools (e.g. binutils,gcc,make)
and development packages for gtk-2.0, libglade-2.0, alsa, openssl, and
popt. In addition, you need an ALSA-compatible hardware or software
MIDI synthesizer, e.g. TiMidity++ (timidity). A good patchset for the
synthesizer, e.g. eawpats, may provide improved sound quality.

Finally, you must have the *.vos files, obtained e.g. from an existing
installation of VOS or CANMusic.

Installation
============

Make sure that you have all the dependencies installed, then simply
type "make" to compile it. No additional installation process is
needed for now.

The default key setting is "zxcv,./" for do,re,mi,fa,so,la,ti,
respectively. To change it, modify the on_main_area_key() function in
pmg.c, and recompile.

Usage
=====

First start timidity if you are using it as the software
synthesizer. The crucial option is "-iA", which makes it accept MIDI
events from ALSA. The other switches are intended for reducing delay
and CPU usage:

TIMIDITY_PCM_NAME=hw timidity -iA -Os -EFresamp=1 -EFreverb=1 -B2,8 -q0/0 -m2000

Now enter the project directory and run pmg:

./pmg /path/to/my/vos/files/foo.vos

If timidity's sequencer port is not 128:0, please specify it using the
-p option. You can see a full list of command-line options by running
"./pmg --help".

0 comments on commit 5c117e4

Please sign in to comment.