/datum/text_to_music 
Datum that forms the core of Player Pianos and Text to Music components
Code from playable_piano.dm, with some unique additions
Base type /datum/text_to_music should not be used
Subtype /datum/text_to_music/player_piano is for Player Pianos
Subtype /datum/text_to_music/mech_comp is for Text to Music components
Vars | |
| compiled_notes | Holds our compiled filenames for the note. |
|---|---|
| curr_note | What note is the song on? |
| holder | The object this datum is attached to |
| holder_name | Name to use when displaying messages to the user |
| instrument_name | What's the name of the current instrument? Must be the same as the instrument name in instruments.dm. |
| is_busy | Stops people from messing about with it when its working. |
| is_looping | Is the piano looping? 0 is no, 1 is yes, 2 is never more looping. |
| is_stop_requested | Set to TRUE to stop a currently playing music player |
| is_stored | Same as is_busy, but for automatic linking. |
| linked_music_players | List that stores our linked pianos, including the main one. |
| note_accidentals | (s)harp, b(flat), (n)atural |
| note_delays | Delay is measured as a multiple of timing. |
| note_input | Where input is stored. |
| note_names | a, b, c, d, e, f, g, r |
| note_octaves | List of octaves as nums (0-8). |
| note_volumes | List of volumes as nums (20,30,40,50,60). |
| notes | After we break it up into chunks. |
| rest_on_notes_not_in_cache | If the note sound file for this instrument is not in the sound cache, treat it as a rest note |
| song_length | The number of notes in the song. |
| sounds_instrument_associative | List of all sound instrument paths. |
| timing | Values from MIN_TIMING to MAX_TIMING please. |
Procs | |
| make_ready | final checks to make sure stuff is right, gets notes into a compiled form for easy playsounding |
Var Details
compiled_notes 
Holds our compiled filenames for the note.
curr_note 
What note is the song on?
holder 
The object this datum is attached to
holder_name 
Name to use when displaying messages to the user
instrument_name 
What's the name of the current instrument? Must be the same as the instrument name in instruments.dm.
is_busy 
Stops people from messing about with it when its working.
is_looping 
Is the piano looping? 0 is no, 1 is yes, 2 is never more looping.
is_stop_requested 
Set to TRUE to stop a currently playing music player
is_stored 
Same as is_busy, but for automatic linking.
linked_music_players 
List that stores our linked pianos, including the main one.
note_accidentals 
(s)harp, b(flat), (n)atural
note_delays 
Delay is measured as a multiple of timing.
note_input 
Where input is stored.
note_names 
a, b, c, d, e, f, g, r
note_octaves 
List of octaves as nums (0-8).
note_volumes 
List of volumes as nums (20,30,40,50,60).
notes 
After we break it up into chunks.
rest_on_notes_not_in_cache 
If the note sound file for this instrument is not in the sound cache, treat it as a rest note
song_length 
The number of notes in the song.
sounds_instrument_associative 
List of all sound instrument paths.
timing 
Values from MIN_TIMING to MAX_TIMING please.
Proc Details
make_ready
final checks to make sure stuff is right, gets notes into a compiled form for easy playsounding