ampsig scheme preferences..
how to tweak every single visual characteristic of your ampsig
This page is ordered roughly as follows..
Images to follow!
for n00bs..
The ampsig scheme file is a simple plain text php include.Values are usually either strings (words inside 'quotes'), integers (numbers, i.e "0", without the quotes) or boolean values. booleans can be entered as "true" or "false" (no quotes, NEVER quotes when quoting!). true can be entered as "1", false as "0" (again, no quotes), but using words for booleans is usually a lot smarter in the long run.
Later values override earlier values.
It is okay to comment out values you don't want.
If anything critical is missing ampsig will use its default value for that preference.
In most cases, the default and/or suggested values are noted along with the preference, though it's always a good idea to make a backup before you start messing around with your preferences, and after every successful batch of changes.
An even better idea.. make a copy of an existing scheme and give it a new name, then you can hack away without fear of messing up any existing schemes..
Have fun!
text fields..
These preferences determine what text will go on each individual row.At the top of your sig is field 1, working down to as many rows as you've managed to squeeze in. The default is four fields (rows), There's no maximum.
You can switch individual rows on and off (just comment them out), and even have blank lines (use an empty '' value), re-arrange them, do pretty much whatever you like..
$fields[1]['id'] ='playing';
$fields[2]['id'] = 'status';
$fields[3]['id'] = 'title';
$fields[4]['id'] = 'album';
// $fields[4]['id'] = 'uptime';
note: the "uptime" entry has been commented out, and un-commenting it would over-ride the earlier entry (there would be no need to comment out the 'album' line in that case). This is a fairly regular setup.
gotcha: the main field titles array is $fields, plural. Later on, you can override individual fields by specifying attributes like
$field[0]['align'] = 'center'; singular. Watch out for that and don't mix them up. The plural version
is only used up here for the main field titles.Here are all the values that ampsig understands and can make use of..
playing
will be 'now playing..', or 'last played..', depending on what you set those strings to be (later)
status
an arbitrary message, maybe bitrate info, a string. (will be enclosed in [])
title
'title', usually, "artist - song name" from the ID3 tag (or filename, if there's no ID3)
AMIP can output this as %name", both AMIP and macsig users can create it themselves
from a whole host of available variables (say that when your drunk!)
artist
the name of the artist, you can send this separately, if you want it on a separate line
album
the name of the album, or containing folder if album ID3 tag is missing
last
the previously played track
counter
how many times your ampsig has been viewed
uptime
on Windows, you need uTu (the uptime add-on - included in the distro) installed and
working for this to happen. macsig/signux users, this is already built-in.
custom
just another field you can use for whatever you like.. "&custom=any old text here" I use this
to let folk know about what film is doing it for me this week.
custom2
"&custom2=some more text I want you to see"
custom3
and again. we could add even more, I guess.
status row affixes..
Usually row 2 (though you can put it wherever you like), the "status" row is special in that it will have characters appended to each end, normally square brackets "[status text]", but you can use other characters, or no characters, it's up to you..
$status_affixes = array('[',']');
As I mentioned above, the "now playing.." text can also be changed to any text you desire, like this..
$playing_string = ' now playing..';
$stopped_string = ' last played.';
note: you may need to add a space at the start/end to center certain ttf fonts or lop-sided strings like the ones used above.
output quality..
truecolor
If you have GD2 installed on your web server, you can work with and more importantly, output, beautiful true colour images.Older servers (with old GD) can't do this, but it does look better.makes for finer rendering of truetype fonts, especially when skewed. but remember, truecolor images are bigger. your call..
trick: if you are merging truecolor images, disable this for some "interesting" effects!
$truecolor = false;
image quality
This is specified as integer (number) which represents a quality percentage (%), 100% being the highest quality image output. This setting is mainly for outputting jpeg images, PNG's, being lossless, are always at 100%, and the PNG built-in compression will always be "maximum".Don't forget, more quality = bigger images.
$q = 75;
output format..
Choose from 'png', 'jpg', or 'gif'What you set here very much depends on whether or not you are outputting truecolor images. if you are using truecolor, you might want to choose 'jpg', for smaller images (probably around the 10-30Kb mark). If the highest quality image reproduction is what you are after, chose 'png', always.
If you are not using truecolor, or need transparency in your sig, set this to either 'png' or 'gif'.
$output_format = 'png';
8 bit colour reduction (256 colours)..
If you output a gif, it is always "low color", that is, 256 colours. If you output a jpeg, it is always "true color", thousands or millions of colours. However, if you output a png, you have a choice..Reducing the colors (to 256, an 8 bit image) will reduce your filesize to around a third of the truecolor version, but it will look like a gif! (and will be slightly smaller in size)
If quality is what matters, output a png and do not reduce. If size/bandwidth is what matters most, output a png and DO reduce. If you can handle some loss of quality, and don't require transparency, consider jpeg output. If you want 8-bit small filesize, AND high quality, consider using greyscale.
$reduce = false;
interlace
Interlacing causes the image to appear in the browser progressively, in layers.First a blocky layer, you can make out what it is, but that's all, then another layer with more detail, you can see the image fine now, and lastly, the highest quality, fine resoltion layer is filled in and the image is complete.
This looks very nice but unlike jpegs, interlacing png's will increase the size, generally creating files around 20% - 30% bigger than regular non-interlaced images. The choice is yours.
If you disable interlacing (false), the image appears top-to-bottom. Most servers are so fast that few people would actually notice any difference; the image is just there.
$interlace = false;
transparent png's..
If you want images with rounded edges or interesting shapes, ampsig can do it. As well as this edge transparency, ampsig can reproduce areas of semi-transparency, where the background will will show clean through. Check out my "iMac Girl" scheme, the mac screen allows the background to show through very slightly.This effect can be subtle (yet highly effective) or alternatively, you can just leave big empty spaces and have the text and progress bar float over the top of them. As always, experimentation is the key.
to use: simply set the transparency levels in your source image and save it as a png with alpha channel.

..iMac Girl, all messed-up trick: The easiest method is to create and store your original image in many layers. Photoshop, ImageReady, The Gimp, Paint Shop Pro, etc, have native image formats which allow you to save multi-layered images. Always keep your originals in this format, only saving the "flat" png image for use in your sig, and then undo back to the point before you reduced it down in size (of course you'll want to work with an original image at least two times larger than the one you will actually save for use in your sig. This make the work easier, and preserves fidelity)
Take the Imac Girl example again. This is a very simple image consisting of three layers. At the very back the Mac screen (I cut it out, you'll see why in a second). On top of that is the frame of the screen, and at the very top, the iMac girl herself.

..an extreme exampleOnce you have an image in layers like this, it's a trivial job to alter the transparency of each individual layer, in our case the screen itself is set to around 75% transparent..
In the future, I'll put together a guide outlining this process more fully, with a few tricks along the way, no doubt.
note: when reducing to 8 bit, making greyscale, etc, ampsig will assume the top-left pixel to be of the color you wish to be transparent (8 bit images can only have one single transparent color, not a "range" like a truecolor image), ensure that this is so in your original png if you plan to utilize either of these manipulations.
important: to use alpha transparency, disable the built-in image layer with these two settings..
$color_layer = false;
$do_frame = false;
note: you can still use the old-school single-color transparency method, and specify that colour, but that system is depricated, and using proper alpha channel transparency is recommended every time.
greyscale..
Make your sig look like an old photo! Highly effective with certain sigs, daft with others. This will give you a very high quality 8 bit image.
$greyscale = false;
greyscal colour balance
When using greyscale, you can shift the "grey" into any hue you desire..You can use any value from -255 to 255. if you stick within these limits the colours will loop right round the colour spectrum and produce predictable results, but you are free to go outside these limits and explorer php's unusual ability to mix colours outside the the visible spectrum! have fun!
red at 20, green at say, 5, would give you a nice "sepia" tone.
$r_balance = 0;
$g_balance = 0;
$b_balance = 0;
background..
size
How big would you like your ampsig to be? Here you can simply specify your sig's width and height.
$img_width = 321;
$img_height = 83;
If you are using a background image, it will be cropped at these values. If you comment these out, the size will be determined by the external background image. If you comment these out and don't set an external image, they will default to..
$img_width = 350;
$img_height = 80;
built-in color layer
The ampsig image is built up in layers. At the very back is the background, which can either be a generated random colour layer, or else an external image. You can also use both, in which case the built-in colour layer will be used to "overlay" the external image. This ability to overlay a colour onto your external image enables you to "tame" very contrasty images (making overlaid text much more readable), alter their color spectrum altogether, soften them, lots of pleasing effects.
$color_layer = true;
The random-coloured layer will be generated automatically. The range of colours used, and just how random they are, is up to you..
note: all colour preferences are entered using their HEX values, just like in HTML. The leading '#' is optional. For a nice page with lots of colours and their HTML values, go here..
http://www.mistupid.com/computers/htmlcolor.htm
or grab a cute wee tool (not mine), here.. http://corz.org/public/stuff/colorcalc.zip
trick: lots of quality text editors offer the ability to choose colours from a color-picker and have their HEX values pasted right back into your scheme file, check that out!
gotcha: to completely disable ampsig's internal colors (for whatever reason) you need to also set..
$do_frame = false;
target colour
Represents the lightest possible generated color for the color_layer.
$target_color = '#f0ff32';
colour variation
This represents the total colour deviation, and so determines the range of possible colours. The default is 15, a small range. 0 = static (no change), 255 = include all possible colours.
$variation = 15;
notes..
A target_color of #f0ff32 with a variation of 15 produces a nice wee range of yellow/green colours which I quite like. If you widen the range, you make things more random (eg. 100 instead of 15). If you alter the colour target, you shift the spectrum used, effectively you can mix any color range you like..
If you wanted to have ALL possible colours (*ouch*) use this..
$target_color = '#ffffff';
$variation = 255;
If you wanted a fixed all-white background (for instance, to merge with an image containing white areas that you wish to make make transparent) use this..
$target_color = '#ffffff';
$variation = 0;
trick: fixed white image layers are useful in lots of situations, particularly for taming very contrasty images. play with the layer's transparency values and watch the effect!
external background image..
Because input image quality is of prime importance, png's are the only accepted input format. If you simply *must* use a jpeg, convert it to png first! There are loads of free image viewers that will do this for you.Comment out this line (or use an empty value) to disable external image loading..
$image_file = 'img/spidey.png';
merge images
You can get some really nice effects by merging the external and internal image layers. check out the screenshots page for a few examples. This also allows you to merge *parts* of bigger images into your ampsig.
$merge_images = true;
If you enable the built-in color layer, the progress bar will be laid on top of that, so when you merge with the external image, the progress bar will merge with it.
If you disable the built-in $color_layer, the progress bar will be laid directly onto the external image. In that case, the transparency of the progress bar can be individually set (see below).
merge position
At what position in your external image do you wish to begin the overlay? This is most useful when you have a large image that you only want to use a part of. The included "olines" scheme is a good example, another is "stars", both using the parts of the larger image most suited to the sig.Setting X and Y to 0,0 would be the normal top-left position.
If you set this larger than the source image, it will fill with black, even when you aren't merging!
$merge_x = 0;
$merge_y = 0;
merge nudge
You may wish to shift the external image for some reason, for instance, if you have a wide frame ($border), but want the image to begin inside the border. This will also shift the external image when not merging.
$mx_nudge = 0;
$my_nudge = 0;
pre-merge
We can pre-merge ampsig, before the progress bar goes on, this makes colours more vivid (saturated) especially when working with strong overlays. this setting is only useful if you are merging images in the first place, otherwise it does nothing.
$pre_merge = true;
transparency level
How transparent will the colour layer be? This number represents a percentage of transparency, from 0% (you won't see the color layer, only the background image, if one is set) to 100% (you won't see the background image at all, only the color layer)The color_layer goes on top of the external image, so the bigger the number, the more your external image will show through.
$transparency = 80;
note: if truecolor is disabled, you will need higher transparency values when merging.
trick: values over 100 will produce very strange results!
frame..
ampsig draws a border around itself, which is very neat.The width of that border is set here (small is better, but bigger can be interesting too)..
$border = 1;
trick: if you're using an external image, and it has a "frame", set its width here so that the funky progress bar can hug its inside.
frame colour
The default is to use the colour exactly opposite to the background colour.This colour is also used for the vertical line at the end of the progress bar (ie. background colours work very well, white) to use some other colour, uncomment this line and enter a hex color value..
$frame_color = '#000000';
draw the frame
Although you may want to define the border's size (above) so that the progress bar can hug inside it automatically, you can choose to leave it undrawn, in which case the background image will show right through. can be very useful and highly effective.
$do_frame = true;
font and text settings..
You can fine-tune the text that goes on you ampsig with the following settings..font size..
This setting is the GD built-in font. You can use any value from 1 (tiny) up to 5 (huge). This setting has no effect if you enable Truetype fonts.
$font_size = 2;
main text color..
If you comment out this line, ampsig will use the colour opposite to the background color, enabling you to setup some really wacky random backgrounds and always have readable text.
$text_color = '#000000';
use Truetype fonts?
$ttf = false;
Your web (host's) server needs to support this. And one server's rendering of a particular font can vary wildly from another, so if you do use Truetype fonts, switching web hosts would probably mean some scheme tweaking.
font face
If you specify a full path starting with either '/' or 'C:\', etc, php will add '.ttf' to the supplied name and search along the GD font "PATH". So for all this to work, the font must be available on the webserver, or else living in the same folder as amp.php.This setting is only effective if
$ttf = true; (above)
$font_face = 'fonts/profont';
note: you must use the font's filename, ie. Lucida Console is 'lucon'.
If the above doesn't work, try something like this (my old GD1.6 web host needed this)..
$font_face = realpath('edg.ttf');
If it's still not happening for you, try setting the ttf environment variable for GD..
putenv('GDFONTPATH=' . realpath('.'));
note: if you are using one of the server's system fonts (ie. NOT living next to amp.php) you should keep the above line commented out.
gotcha: DO NOT USE UPPERCASE FILE EXTENSIONS OR SPACES IN THE FONT'S FILE NAME!
truetype font size
$ttf_size = '9';
note: for GD1 use pixel size, for GD2 use point size.
bold text
This is a pseudo-bolding effect you can add to non-bold fonts. You can set higher levels of pseudo-bolding, by using a number instead of true/false, but it will quickly become unreadable.true equates to $bold = 1 ;
$bold = false;
antialiasing
You can disable antialiasing if you need to, but it's best to leave it enabled. If you didn't know, antialiasing is what makes the edges of screen fonts smooth, not jaggedy..
$antialiasing = true;
text alignment
Choose from 'left', 'center', or 'right'.
$align = 'left';
note: you can override individual lines' alignment later on.
field emphasis
This is just a fancy way of saying "make the line bigger or smaller than the normal size"Some content is best suited to large text, other to small.
'now playing..' titles are generally big, 'uptime' is small, it's your call.
0 = no emphasis (uses specified text size) 1,2,3, etc is bigger, -1,-2,-3, etc is smaller.
For the built-in GD font, use mostly zero (0)
note: it's okay to leave unused fields (like 5 and 6) uncommented
$field[1]['em'] = 1; // 2 (ttf)
$field[2]['em'] = 0; // -1 (ttf) <- guidelines!
$field[3]['em'] = 0; // 0 (ttf)
$field[4]['em'] = 0; // -2 (ttf)
$field[5]['em'] = 0; // etc..
$field[6]['em'] = 0;
note: if you use
$auto_shrink (below), you can set your
main title quite big and have $auto_shrink always pick the best font size. not too big, though, or titles like "U2 - War" could knock everything for six!but then, who listens to U2 these days? heh (jk Bono m8!)
text positioning..
leading
These are thin strips of lead that we place between the rows of text in the printing press, well, that's where the names come from, anyway. The principle is the same, though, increase the leading to vertically space out the text..
$leading = 1;
note: the default is 1, but every font has its own requirements. Some will need 10, others 3. for built-in GD font, 1 is a good starting point. If you need guidance, check out the bundles schemes.
nudge
You can nudge text left ( eg. -3 ), or right ( eg. 3 ) The default is 0.
$nudge = 0;
push
Push all the text down away from the top of the sig ( eg. 5 ) or up closer to the top of the sig ( eg. -5 ).
$push = 7;
skew
If you are very brave, you can make this not zero. (NO! Don't mess with this!) Skewing is still experimental, only works for Truetype fonts, and will require major tweaking to leading and other position preferences, but if you gotta have skewed text, here it is!
$skew = 0;
trick: a tiny skew of 1 or 2 is quite interesting over the right background.
trim adjust
Long text fields will be trimmed automatically to fit the size of your background image. This setting enables you to trim them more (1,2,3, etc) or less (-1,-2,-3, etc)..
$trim_adjust = 0;
auto_shrink
Or if you prefer, you can have the text automatically shrink down so that it ALL fits comfortably within the given space. ampsig will keep trying smaller and smaller sizes until it can fit the entire title into the image.
$auto_shrink = true;
gotcha: if you have Exceeding Long Song Titles, this will cause the text to shrink down to a minute size, which while still readable, you need darn good eyesight do it! you may want to consider editing your ID3 tags in this case!
field push
You can push the individual lines up or down with this.Positive numbers ( eg. 2 ) push the field down, negative numbers ( eg. -2 ) pull the field upwards.
$field[2]['fp'] = -1;
$field[3]['fp'] = 0;
//$field[4]['fp'] = 0;
//$field[5]['fp'] = 0;
//$field[6]['fp'] = 0;
per-field alignment
You can override the default alignment on a per-line basis.This is a handy feature, but don't overdo it!
//$field[0]['align'] = 'center';
//$field[1]['align'] = 'center';
//$field[2]['align'] = 'center';
//$field[3]['align'] = 'right';
//$field[4]['align'] = 'center';
//$field[5]['align'] = 'center';
progress bar..
This IS the coolest thing since sliced silicon!ampsig's dynamic progress bar tells the viewer exactly how far into the track you are in real-time!
As your song plays its bar graph scrolls along displaying the current percentage ot track played. If you pause, the progress bar will pause. If you stop, it will stop, too. If you pause, jump to 66% and then play, it will also jump to 66%. We like it. So getting it looking just right is very important..
do the progress bar? (YES!)
$do_bargraph = true;
progress bar thickness
It's horizontal, like "horizon" ;o)Rather cleverly, the progress bar will hug the bottom of your sig, just inside your borders like a good little bar-graph, no matter how thick you make them.
Enter any number (14 is good)..
$thickness = 14;
Or else use
'fill' to fill the entire background..
$thickness = 'fill';
progress bar squeeze
If you are using a non-symmetrically framed external background image you might want to squeeze the progress bar in ( eg. 1 ) or out ( eg. -1 ) The default is 0, no squeezing.
$squeeze = 0;
progress bar x/y nudge
maybe you have a strange off-centred frame and need to nudge the whole progress bar left ( eg. -2 ) or right ( eg. 2 ), no problem..
$xnudge = 0;
Same story for up ( eg. -2 ) and down ( eg. 2 )..
$ynudge = 0;
progress bar text
You'll probably want some text in your progress bar..
$do_btxt = true;
bargraph text color
If you comment out this line, ampsig will assign the progress bar text the same color as the main text, unless you specify transparent text (below).The default is green, like an old-school digital read-out..
$btxt_color = '#339966';
transparent progress bar text
This setting overrides $btxt_color (above)
$btxt_trans = true;
progress bar text size
We use the built-in GD font for this, regardless, so really, 1 or maybe 2 is best..
$btxt_size = 1;
progress bar text vertical align
Choose from 'top', 'middle', or 'bottom'. If you have a thin progress bar, you'll likely want the text to appear vertically centered ('middle'). If your progress bar is wide, or fills the entire sig, you'll probably want the text to hug the top or bottom of your sig..
$btxt_valign = 'middle';
note: the default, in case you misspell it, is 'middle' ;o)
do browser info?
Currently ampsig can shows "your ip is.. 154.213.14.124" or whatever it is right inside the progress bar. This text scrolls along behind the track percentage reading.
$do_browser_info = true;
You can also choose which text you would like to use for the IP message. You might prefer "you are tuning in from.. ", or something.
$ip_string = 'your ip is.. ';
And while we're at it, you can alter the text for the track percentage, too. Even have no text. This scrolls along right behind the % indicator. By default, it's empty, but you might prefer
'track: ' or something like that..
$percent_string = '';
bar-graph colour
As you will doubtless have noticed, ampsig's progress bar is capable of some pretty funky visual trickery. This is all down to it's use of user-defined gradient mathematics. Don't let that put you off, to get you started ampsig comes with a whole bag of preset gradient themes for you to chose from..use built-in themes?
$use_themes = true;
The built-in gradient themes are neat, the result of much experimentation and tweaking, check them out. Simply uncomment whatever theme takes your fancy..
$theme = 'regular feiry progress with cheese';
//$theme = 'gentle fire';
//$theme = 'interesting feiry'; // (watch out for thick borders!)
//$theme = 'basic grey grad';
//$theme = 'gentle grey grad';
//$theme = 'the torrenteer';
//$theme = 'swarm member x';
//$theme = 'ouch!';
//$theme = 'mr. green';
//$theme = 'mrs. green';
//$theme = 'toffee mint';
//$theme = 'green meanie';
//$theme = 'deep sky fader';
//$theme = 'blue duo';
//$theme = 'multicoloured';
//$theme = 'its gonna break';
//$theme = 'stripees';
//$theme = 'white into red';
//$theme = 'black into white';
note: the first in the list is the default 'feiry', and is the "catch-all" theme for misspelled entries.
or..
bar-graph colour calculations..
The second, and far more interesting method of colouring your progress bar, is by specifying the mathematical calculations yourself. This is easier than it sounds, and highly interesting results are very possible. PCheese managed a fairly lifelike "Aqua" progress bar for his iPod gradient theme without too much trouble.If you come up with something better, let us know!
Here's how it works. "$i" will increment from some low number (say 2) to a high one (say 348, basically the image width, minus any frames, etc) so you can use whatever whacky mathematics you want based on that scale of numbers, and resulting in logical color values.
As the bar is drawn, $i will increase, and your new colour will be created, all the way up to the current length of the bar. TADA!
$calc_red = '255-(($i/2)/255)/$lf';
$calc_green = '255-($i/2)/$lf';
$calc_blue = '($i/2)-255/$lf';
trick (sorta): if you really wanted to, you could use static values, I guess :/
progress bar length factor
If you are using a looong sig (say > 300 pixels wide) you may wish to increase this setting, which will cause the gradient colours to loop less frequently. Got that?Decimal fractions are okay, eg.
$lf = 1.13159; or whatever. The default is 1.
$lf = 1;
note: sometimes this can have unexpected results! test test test!
progress bar termination
Here you can set how wide you'd like the termination bar to be. That's the wee vertical line at the end of the progress bar itself. The default is 1.
$termination = 1;
trick: if you set $termination to 0, it disappears.
progress termination bar colour
The termination bar will normally assume the same color as the frame, but you can override that here if you wish (uncomment and enter a HEX color value)..//$term_color = '#ff0000';
progress bar frame
This setting tells ampsig to draw a frame around the progress bar. This was a request!Set to true or false, or use a number for any desired thickness.
If you set it to
0 or
false, it disappear entirely (the default)..
$bar_frame = false;
progress bar transparency level
Here you can set the level of transparency for the progress bar.Normally we leave this set at
0 and let it merge fully
with the $color_layer and then whatever values
you set for the $color_layer's transparency will set both.
But you may wish further control of this parameter or, if you have completely disabled the internal color
layer ($color_layer and $do_frame) you will probably want to set a new transparency level here,
so the progress bar can retain its cool translucency..
$bar_trans = 0;
You can set any value from 0 (completely opaque, the default) to 100 (completely transparent, invisible).
*phew* you made it!
That's it! Every single ampsig setting!I think...








