More actions
Music Sequencer | |
---|---|
General | |
Author | Knifa |
Type | Music |
Version | 0.1 |
License | Mixed |
Last Updated | 2006/01/14 |
Links | |
Download | |
Website | |
Source | |
This is a basic music sequencer (a bit like MIDI) written in Lua.
It has support for multiple tracks (or instruments) too, changing BPM and the likes.
User guide
If you're going to make a song on it, it's very simple, you should be able to figure out what to do by reading the songs that come with it. Remember that they are processed in HALF-BEATS and not a single one.
Writing songs
The songs are just Lua files. They're written like this:
Song = { }; <-- Needed, don't change Song.Score = { }; <-- Needed, don't change Song.Score[1] = { 0, 0, 0, 0, V_C1, 0, 0, 0, 0, 0, V_C1, 0, < 0, 0, 0, 0, V_C1, 0, 0, 0, 0, 0, V_C1, 0, <-- This is the first instrument score, V_D1 is a D note, 0 is a rest. 0, 0, 0, 0, V_C1, 0, 0, 0, 0, 0, V_C1, 0, <-- They are processed as half notes, that is why the rests are doubled. 0, 0, 0, 0, V_C1, 0, 0, 0, 0, 0, V_C1, 0, < } Song.Score[2] = { 0, 0, 0, 0, V_G1, 0, 0, 0, 0, 0, V_G1, 0, < 0, 0, 0, 0, V_F1, 0, 0, 0, 0, 0, V_F1, 0, <-- This is the second instrument score, it's the same as above with 0, 0, 0, 0, V_E1, 0, 0, 0, 0, 0, V_E1, 0, <-- diffrent notes. Having it this way lets you play chords and stuff. 0, 0, 0, 0, V_D1, 0, 0, 0, 0, 0, V_D1, 0, < } Song.iBPM = 180; <-- Beats per minute of the song. (Fast songs are awesome ;P) Song.iLength = 12*4; <-- Length of the song (How many notes you have)
You can have (almost) unlimited amount of scores, just add one onto the Score array number.
Take a look at the other songs too, that'll help.
Samples
You can add custom samples by doing this at the top of your song file:
V_MYSAMPLE = AddSample( "sample.wav" );
Then you can add it to your scores by using V_MYSAMPLE as the note.
The default samples are:
V_DRUM1 V_HIHAT1 V_C1 V_C1_SHARP V_D1 V_D1_SHARP V_E1 V_F1 V_F1_SHARP V_G1 V_G1_SHARP V_A1 V_A1_SHARP V_B1 V_SNARE1
Screenshots
Credits
The samples are made by modcase.
External links
- PSP Lua - http://psplua.com (archived)