PlaneShift
Development => PlaneShift Mods => Topic started by: Sajut on October 01, 2013, 12:32:04 am
-
I wrote a little script to create music for planeshift without starting the client. And also without clicking around in the editor ;)
Its hopfully an fast an easy way to bring new music to planeshift.
The "translator" is written in PHP so you need a working php installation. If you like i can build an online converter.
short syntax overview:
comment line = !
note = [b/#]<pitch><octave>-<duration>[.]
chord = ([b/#]<pitch><octave> [b/#]<pitch><octave> ...)-<duration>[.]
pause = p<duration>
repeat start = RS
repeat end = R<repertitions>
Duration is "1" for whole note, "2" for half note, "4" for quarter note, "8" for eighth note, "16" for sixteenth note.
the file structure
1. line -> Title
2. line -> <tonality> <beat> <BPM>
3. line -> measure 1.
4. line -> measure 2.
... line -> measure ...
99. line -> measure 99.
Download (including a detailed description and two examples): http://files.sajut.de/pstune.zip.
One of the examples:
! !=Comment
!Title
rocky road
!tonality, beat, tempo
2 9/8 120
!begin
rs d5-8 f5-8 d5-8 c5-4 h4-8 a4-4 a4-8
e4-4 a4-8 a4-4 a4-8 h4-8 c5-8 d5-8
e5-8 f5-8 e5-8 d5-4 h4-8 a4-4 c5-8
h4-4 a4-8 g4-4 a4-8 h4-8 c5-8 d5-8 r1
!
rs e5-4 a5-8 a5-4 f5-8 g5-4 h5-8
e5-4 a5-8 a5-4 a4-8 h4-8 c5-8 d5-8
e5-4 a5-8 a5-4 f5-8 f5-4 e5-8
d5-4 h4-8 g4-4 a4-8 h4-8 c5-8 d5-8
!
e5-4 a5-8 a5-4 f5-8 g5-4 d5-8
e5-4 a5-8 a5-4 a4-8 h4-8 c5-8 d5-8
e5-8 f5-8 g5-8 f5-8 g5-8 a5-8 g5-8 f5-8 e5-8
d5-4 h4-8 g4-4 a4-8 h4-8 c5-8 d5-8
!
e5-8 c5-8 a4-8 e5-8 c5-8 a4-8 a4-4 a5-8
e5-8 c5-8 a4-8 e5-8 c5-8 g4-8 h4-8 c5-8 d5-8
e5-8 c5-8 a4-8 e5-8 c5-8 a4-8 a5-4 c5-8
e5-4 h4-8 g4-4 a4-8 h4-8 c5-8 d5-8
!
e5-8 c5-8 a4-8 e5-8 c5-8 a4-8 a4-4 a5-8
e5-8 c5-8 a4-8 e5-8 c5-8 g4-8 h4-8 c5-8 d5-8
e5-8 f5-8 g5-8 f5-8 g5-8 a5-8 g5-8 f5-8 e5-8
e5-4 h4-8 g4-4 a4-8 h4-8 c5-8 d5-8 r1
and the generated xml file.
http://files.sajut.de/rocky_road.xml
P.S.: The code is ready to use but might have some bugs. Please report them :)
-
If you can, better rewrite it in some standalone language (Ruby, Python etc.), to make the script more accessible.
-
I can try it with c, but it would take some time....
-
It may not be hard to write a little HTML form user interface around it, for someone with access to a web server...
-
It may not be hard to write a little HTML form user interface around it, for someone with access to a web server...
http://pstune.sajut.de/index.php should do the job ;)
-
Nice job Sajut ;)
A little news from the development team: Lucubro (our awesome music man :D ) is back again and is partly rewriting the music plugin, in the the future fixes the engine will be more compatible with the standard music XML format.
-
Eonwind: That's great! Standards are here exactly to avoid making convertors :)