1This is main brand new feature added to IceGenerator, and it's called IceMetaL. 2Formerly it's a simple programming language that I've created, and it's used 3to customize META informations that appear on client software. 4 5 6===== IceMetaL LANGUAGE ===== 7 8Its constructs are very simple. They are two: 9 10- LOOP .. ENDLOOP: declares a loop like C/C++ do..while 11- PRINT: send a META string to client 12 13Let's make an example. 14 15 PRINT "Here I am before loop" 16 LOOP 3 17 PRINT "This is a loop" 18 ENDLOOP 19 PRINT "Here I am after loop" 20 21The META sequence that IceGenerator sends is: 22 23 Here I am before loop 24 This is a loop 25 This is a loop 26 This is a loop 27 This is a loop 28 Here I am after loop 29 30Really simple, I think. Let's explain every instruction. 31 32* PRINT ("string" | ID3_TAG) 33 34 PRINT is used to send a META to client. It requires a parameter that can be: 35 - a fixed string enclosed by double quotes 36 - an ID3 tag of the file that is in streaming. The ID3 tag allowed are: 37 38 ID3COMMENT 39 ID3ALBUM 40 ID3COMPOSER 41 ID3COPYRIGHT 42 ID3ENCODEDBY 43 ID3LYRICIST 44 ID3TITLE 45 ID3SUBTITLE 46 ID3LEADARTIST 47 ID3BAND 48 ID3CONDUCTOR 49 ID3PUBLISHER 50 ID3NETRADIOSTATION 51 ID3NETRADIOOWNER 52 ID3USERTEXT 53 ID3TERMSOFUSE 54 55 Examples: 56 57 PRINT "This is a test string" 58 59 Sends 'This is a test string' to client 60 61 PRINT ID3TITLE 62 63 Sends song's ID3 Title tag to client (if exists) 64 65 66 67* LOOP [number] 68 69 This instruction starts a loop. It can be followed by an integer positive 70 number that specifies how many times we have to loop again. Remember that 71 number specifies OTHER passed before the first pass, so if you specify 3, 72 for example, it will make the first pass and loop again 3 times. 73 If number is not specified, the loop is an infinite loop (that is, will 74 loop until song is played). 75 76* ENDLOOP 77 78 It closes a loop. 79 Loops can be nested (limit is 20 nested loops). 80 81 82Let's make a final example. 83 84LOOP 85 PRINT "This is a global test" 86 PRINT ID3LEADARTIST 87 LOOP 4 88 PRINT "This is an inner loop" 89 PRINT ID3TITLE 90 ENDLOOP 91ENDLOOP 92 93This sends this sequence: 94 95 "This is a global test" 96 Song's ID3 artist tag 97 "This is an inner loop" 98 Song's ID3 title tag 99 "This is an inner loop" 100 Song's ID3 title tag 101 "This is an inner loop" 102 Song's ID3 title tag 103 "This is an inner loop" 104 Song's ID3 title tag 105 "This is an inner loop" 106 Song's ID3 title tag 107 "This is a global test" 108 Song's ID3 artist tag 109 "This is an inner loop" 110 Song's ID3 title tag 111 112 and so on, until song is finished. 113 114 115 116===== IceMetaL MetaDataFile ===== 117 118MetaDataFile is a file that contain IceMetaL code for your song. It must have 119"mdf" extension. 120 121How it works? Let's make an example. 122 123Suppose that your songs are placed into /home/john/streams. 124 125Here you have two subdirs, "Madonna" and "Jackson". 126 127This is your directory layout: 128 129/home 130 /john 131 myglobalfile.mdf 132 /streams 133 Genesis - Invisible touch.mp3 134 REM - Shiny happy people.mp3 135 /Madonna 136 Like a virgin.mp3 137 Like a virgin.mdf 138 Borderline.mp3 139 /Jackson 140 default.mdf 141 Billy Jean.mp3 142 Smooth Criminal.mp3 143 Bad.mp3 144 Bad.mdf 145 146 147You have set MDFPATH variabile in icegenerator.conf to /home/john/myglobalfile.mdf 148 149When IceGenerator fetchs a songs, it looks for an .mdf file that have the same 150name of song. If exists, it uses it, otherwise it looks for a "default.mdf" file 151placed into the same dir of song. If a local .mdf file can't be found, it uses 152global .mdf specified with MDFPATH variable. If a global .mdf file isn't set, 153filename (without .mp3 or .ogg extension and path) will be sent. 154 155So these are .mdf file for our songs: 156 157 Genesis - Invisible touch.mp3 myglobalfile.mdf 158 REM - Shiny happy people.mp3 myglobalfile.mdf 159 Like a virgin.mp3 Like a virgin.mdf 160 Borderline.mp3 myglobalfile.mdf 161 Billy Jean.mp3 default.mdf 162 Smooth Criminal.mp3 default.mdf 163 Bad.mp3 Bad.mdf 164 165In this way, you can fine customize your META settings. 166