Decimal points - can you control them


#1

Hi, one of the MP3 tags I work with is BPM - by default this often has 2 digits after the decimal point but this causes me problems
can MP3tag allow you to control decimal points, just as you can when dealing with numerical fields in Excel - so you can have 0,1 or 2?
much appreciated if someone can tell me
thanks


Divide a positive or negative decimal value
#2

Use the Mp3tag scripting functions to manipulate the BPM string value.

See also ...
/t/7887/1
/t/7075/1
/t/6066/1
/t/7295/1

Begin Action Group MyMusic#19 Round BPM to integer

Action #1
Actiontype 5: Format value
Field ______: BPM_MIXMEISTER
Formatstring: $if2(%BPM_MIXMEISTER%,%BPM%)

Action #2
Actiontype 5: Format value
Field ______: BPM_ROUNDBY
Formatstring: 1

Action #3
Actiontype 5: Format value
Field ______: BPM
Formatstring: $div($mul($mul(%BPM_ROUNDBY%,100),$ifgreater($sub($div($mul($left($replace(%BPM%,.,)00,$add($len($div(%BPM%,1)),2)),10),$mul(%BPM_ROUNDBY%,100)),$mul($div($left($replace(%BPM%,.,)00,$add($len($div(%BPM%,1)),2)),$mul(%BPM_ROUNDBY%,100)),10)),4,$add($div($left($replace(%BPM%,.,)00,$add($len($div(%BPM%,1)),2)),$mul(%BPM_ROUNDBY%,100)),1),$div($left($replace(%BPM%,.,)00,$add($len($div(%BPM%,1)),2)),$mul(%BPM_ROUNDBY%,100)))),100)

Action #4
Actiontype 9: Remove fields
Fields to remove (semicolon separated): BPM_ROUNDBY

End Action Group MyMusic#19 Round BPM to integer (4 Actions)

Begin Action Group Test_2011#20111129.BPM.Runden.NK0

Action #1
Actiontype 5: Format value
Field ______: BPM
Formatstring: $replace(%BPM_MIXMEISTER%,'.',%DUMMY%)

Action #2
Actiontype 5: Format value
Field ______: BPM
Formatstring: $div(%BPM%,10)

Action #3
Actiontype 5: Format value
Field ______: BPM
Formatstring: $ifgreater($mod(%BPM%,10),4,$add($div(%BPM%,10),1),$div(%BPM%,10))

Action #4
Actiontype 5: Format value
Field ______: BPM
Formatstring: $if($eql(%BPM%,'0'),%DUMMY%,%BPM%)

End Action Group Test_2011#20111129.BPM.Runden.NK0 (4 Actions)

Begin Action Group Test_2011#20111129.BPM.Runden.NK1

Action #1
Actiontype 5: Format value
Field ______: BPM
Formatstring: $replace(%BPM_MIXMEISTER%,'.',%DUMMY%)

Action #2
Actiontype 5: Format value
Field ______: BPM
Formatstring: $ifgreater($mod(%BPM%,10),4,$add($div(%BPM%,10),1),$div(%BPM%,10))

Action #3
Actiontype 5: Format value
Field ______: BPM
Formatstring: $div(%BPM%,10)'.'$mod(%BPM%,10)

Action #4
Actiontype 5: Format value
Field ______: BPM
Formatstring: $if($eql(%BPM%,'0.0'),%DUMMY%,%BPM%)

End Action Group Test_2011#20111129.BPM.Runden.NK1 (4 Actions)

If you only want to change the displayed value in the list view, without changing the BPM tag-field, then apply the fitting scripting function to the field 'Value' in the specific column dialog.

DD.20120610.1034.CEST