Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Lutz that is absolutely fantastic can you do that for all the alerts ?also I don't want to be too fusy but would it be possibe for you to use the old polite 2 sound
Ok I'm totally new to this and I'm reasonably sure that I'd totally mess it up if I tried to change the audible alerts ... so, has anyone got a version that keeps the original sounds except for one that's been replaced by a voice saying "Speed Camera" or "Gatso"? (Preferably "Speed Camera" as "Gatso" confuses the hell out of my wife)!
I've managed to change the file for the one downloadable here but it replaces sounds I use a lot (such as the Cow sound for Burger Kings etc) so I changed it back.
Also, it doesn't change Jane's directions does it?
If some kind soul has the above could they put in a link to it for us less-than-technically minded people (probably just me and the wife)?
Hi,
First let me say thanks, all seems to work really well. the volume I'm sure is about the same as it always was, the difference is more in the range of the sound. IE if the warnings could start with some sort of electronically sounding beep it would be more noticable.
The other thing I would ask is that instead using the last sound for a 'credits' slot could we not have some sort of buzz, boing, beep, etc that could be used for any other POI we want to be notified of?
having read through all the instructions for installing on the TTG though I would suggest writting a full set of install instructions afresh. the current instructions are gettng to be a bit of a mish-mash as they are slightly changed and tweaked.
On the whole though, great job, GPS has never been so much fun.
Feenix
How did cebit go ?Just wondering if you have managed to do anymore on the alerts you was doing for me
My polite 2 sound seems different to the one you have, mine seems to be more like a call button on an aircraft (I think !)If that makes sense
I have just downloaded the new voice prompts for the cameras but I have a question that I am sure will have a simple answer but won't come to me. Do I have to assign the right sound to each and every camera location in the memory? That would surely take weeks to do and could result in masses of errors.
I noticed from Dave Burrows' excellent and comprehensive report on TT5 from CeBit that TomTom are still not including a feature to customise the POI warning sounds... Bit of a disappointment
However, as a Palm user, I am looking forward to a free upgrade to 5 (maybe...) so I'm not really complaining
I was wondering how the news from CeBit has affected the discussion that Lutz mentioned before CeBit - i.e. the one about potentially making the modified version of VIFTOOL (just my description - hope it's not hopelessly inaccurate) available so that we can all change our POIs just as we can change the voice commands? I am a bit loathed to continually ask for slight modifications to the DATA.CHK file but I can see that I might want to experiment with several before I find the best option.
I use my Navigator in the car and on my motorcycle - in the latter case I would want a different warning as I don't always ride with the unit visible and rely solely on audio warnings - with all that wind noise, too many words in a warning detract from the message. In the car, I can always see the unit but the additional voice information is sometimes useful, though not so much in built-up areas, where I would rather just hear 'polite 2'.... The list goes on (and on) but you get the idea.
Looking forward to hearing the latest on this issue
TTT
Joined: 02/11/2002 22:41:59 Posts: 11878 Location: Massachusetts, USA
Posted: Thu Mar 24, 2005 5:39 pm Post subject:
We promised to give you an answer after CeBIT. Well, here it is...
Due to bandwidth constraints (called "real life") we decided to put the code up for grabs. Feel free to create your own POI warning sounds, but please refrain from trying to sell them. This code is public domain
You need some knowledge of VB to understand the code . The current implementation uses Excel, but you can certainly find other ways, too.
Here's the code:
Code:
Sub data_chk_reload()
Type CHKentry
offset As Long
sourceoffset As Long
length As Long
tag As Byte
packtype As Byte
blocks As Integer
ogglength As Long
End Type
Dim g As Long
Dim b As Byte
Dim bt As Byte
Dim Maxfiles
Maxfiles = 30
Dim entry() As CHKentry
'this folder holds the original data.chk file
folder = "C:\setup\iPAQ\Navigation\TomTom\Voices\"
'identifier of the data.chk version. complete file name is identifier.data.chk
fname = "2852"
'the OGG files need to be in the subfolder specified by cell C1
fnum = FreeFile
Open folder & fname & ".data.chk" For Binary Access Read As #fnum
flen = FileLen(folder & fname & ".data.chk")
g = get_long
Debug.Print fname; " Number of modules: "; g; " File size: "; flen
If (g <> 102) And (g <> 120) And (g <> 123) And (g <> 136) Then
a = MsgBox("Not a good DATA.CHK file. Please report your build version of the TomTom program to lutz@pocketgpsworld.com", vbOKCancel, "Error - wrong file version")
Close
Exit Sub
End If
'get offsets
If g = 102 Then Maxfiles = 12
ReDim entry(g + 1)
For i = 1 To g + 1
entry(i).offset = get_long
entry(i).sourceoffset = entry(i).offset
If i > 1 Then entry(i - 1).length = entry(i).offset - entry(i - 1).offset
Next
'confirm file size
If entry(g + 1).offset = flen Then
Debug.Print "File size confirmed"
Else
Debug.Print "File size mismatch! Reported:" & Hex(entry(g + 1).offset) & " Actual:" & flen
End If
'calculating new offsets etc
Debug.Print "Calculating new parameters"
i = 2
For f = g - Maxfiles To g
If (Cells(i, 3) > vbNullString) And (f < g) Then 'new file
Debug.Print "Verifying "; Cells(i, 3)
flen = FileLen(folder & Cells(1, 3) & "\" & Cells(i, 3))
entry(f).ogglength = flen
pad = 0
While flen Mod 4 <> 0
flen = flen + 1
pad = pad + 1
Wend
entry(f).blocks = (flen + 12) / 4
entry(f).length = flen + 16
End If
i = i + 1
Next
'recalculate header
Debug.Print "Recalculating header ";
For i = g - Maxfiles To g + 1
entry(i).offset = entry(i - 1).offset + entry(i - 1).length
Next
Debug.Print "- new File Size is "; entry(g + 1).offset
'write output file
Debug.Print "Writing CHK file "
On Error Resume Next
Kill folder & Cells(1, 3) & "\" & fname & "_new.data.chk"
On Error GoTo 0
fnum2 = FreeFile
Open folder & Cells(1, 3) & "\" & fname & "_new.data.chk" For Binary Access Write As #fnum2
'write header
'number of segments
put_long (g)
'offsets
For i = 1 To g + 1
put_long (entry(i).offset)
Next
'non-voice files
'position pointer
Get #fnum, entry(1).offset, b
h = entry(g - Maxfiles).offset - entry(1).offset
For i = 1 To h
Get #fnum, , b
Put #fnum2, , b
DoEvents
Next
'write sound files, either from source or from new OGG
Debug.Print "Writing CHK file - Sounds"
i = 2
For f = g - Maxfiles To g
If (Cells(i, 3) > vbNullString) And (f < g) Then 'read new file
Debug.Print "Including "; Cells(i, 3); " for "; Cells(i, 1)
'recreate header
b = 1
Put #fnum2, , b
b = 0
Put #fnum2, , b
b = entry(f).blocks \ 256
Put #fnum2, , b
b = entry(f).blocks And 255
Put #fnum2, , b
put_long (1)
put_long (8)
put_long (entry(f).ogglength)
fout = FreeFile
Open folder & Cells(1, 3) & "\" & Cells(i, 3) For Binary Access Read As #fout
For h = 1 To entry(f).ogglength
Get #fout, , b
Put #fnum2, , b
DoEvents
Next
'padding
b = 0
flen = entry(f).ogglength
While flen Mod 4 <> 0
Put #fnum2, , b
flen = flen + 1
Wend
Close (fout)
Else 'read from source
'position pointer
Get #fnum, entry(f).sourceoffset, b
For h = 1 To entry(f).length
Get #fnum, , b
Put #fnum2, , b
DoEvents
Next
End If
i = i + 1
Next
Close
Beep
Debug.Print "Done - real new file size is "; FileLen(folder & Cells(1, 3) & "\" & fname & "_new.data.chk")
End Sub
'required because of the little endian storage of long values
Function get_long() As Long
Dim b As Byte
l = 0
For h = 1 To 4
Get #fnum, , b
l = l * 256 + b
Next
get_long = l
End Function
Sub put_long(ByVal l As Long)
Dim b(4) As Byte
For h = 1 To 4
b(h) = l And 255
l = l \ 256
Next
For h = 4 To 1 Step -1
Put #fnum2, , b(h)
Next
End Sub
Der Thicko alert, right ive a ttgo with 4.42, bought a new 256 card. managed to load all camera's, which work no prob. down loaded voice warnings as per your instructions, struggling with this biz save 2582data etc to computer. Its in my documents.Using windows 98.
Ive tried dragging the voice file on to uk map folder like i did for camera's but it doesn't work. Is my computer too old or is that me. Or am i better sticking with the normal noise's than messing with something i obviously have no idea about
Joined: Dec 08, 2004 Posts: 10644 Location: Suffolk, UK
Posted: Fri Apr 01, 2005 6:36 am Post subject:
Stormin wrote:
Der Thicko alert, right ive a ttgo with 4.42, bought a new 256 card. managed to load all camera's, which work no prob. down loaded voice warnings as per your instructions, struggling with this biz save 2582data etc to computer. Its in my documents.Using windows 98.
Ive tried dragging the voice file on to uk map folder like i did for camera's but it doesn't work. Is my computer too old or is that me. Or am i better sticking with the normal noise's than messing with something i obviously have no idea about
The file 2582data.chk goes into the root folder not in the map folder. Then just rename original to data._hk and then the new one Data.chk. _________________ Richard
TT 910 V7.903: Europe Map v1045
TT Via 135 App 12.075: Europe Map v1145
I thought it might be useful for others to learn how I got this to work with Excel. Credit for the code lies with Lutz Bendlin, all I have done is get it to work (see ‘Credit where it is due’ below).
The following is very much a ‘first draft’ as I can see considerable room for improvement in the code itself and in the execution; when I have a bit more lifewidth, I’ll knock this into a nice executable, perhaps with an .ini file to hold the filenames of the sound files (unless someone else with a bit more time beats me to it!). For now though, this is a quick and dirty guide to getting Lutz’s code to work in Excel and a set of directions on how to apply it.
Disclaimer: These instructions were created for use with Office XP and I only have TomTom Navigator for Palm OS – They will probably work with other versions of Office and with Pocket PC/smart-phone platforms, but I have not tested them on anything else. I take no responsibility for your use or interpretation of my guide or directions on the use of the code – you do so entirely at your own risk.
1. First you need to record the sounds you want use for your POIs – These need to be in .ogg format and you should refer to the link above for more information on the sampling frequencies appropriate for your device. For the Palm, I recorded in 1600MHz Mono PCM WAV format and converted the files to .ogg format with oggenc from Vorbis: a free command-line utility. You might like to refer to my previous post on voice files for more information:
http://www.pocketgpsworld.com/modules.php?name=Forums&file=viewtopic&t=16637.
2. You can record 15 different POI warning sounds, but you should keep a note of what they are for, as they will still appear in your TomTom software as ‘Beep 1’, ‘Bell 1’ etc – the names seem to be hard-coded into the software (unless anyone knows different…?). Fortunately, you will make an Excel sheet as part of this process, so you will have a record of which sound files map to which warning name. I made-do with just 4 warnings for speed cameras and then made others for other POIs like petrol stations and cash-points etc. This is entirely up to you.
3. When you have made your sound files and converted then to .ogg format, save them in C:\tomtom\UKVoices in order to make sure that the code supplied will work without further modification – you can obviously fiddle with the paths later if you want to.
That’s the sound-file bit done, now onto the code:
4. Open a new Excel spreadsheet
5. Save the file (let’s call it TomTom POI Convertor.xls)
6. Go to Tools|Macro|Visual Basic Editor
7. In the VB editor, double-click ‘sheet 1(sheet 1)’ under the heading Microsoft Excel Objects
8. Paste in the whole of Lutz’s code (See the foot of this posting for a copy, pasted in for your convenience, but with my own small modification for the source folder location)
9. Cut the following two blocks of code from the top of the code in the ‘sheet 1(sheet 1)’ Objects:
Type CHKentry
offset As Long
sourceoffset As Long
length As Long
tag As Byte
packtype As Byte
blocks As Integer
ogglength As Long
End Type
And:
Dim entry() As CHKentry
10. Right-click on ‘Microsoft Excel Objects’ and select ‘Insert|Module’. This will create ‘Module 1’ under the heading ‘Modules’
11. Paste the two blocks of code from step 9 (above) into ‘Module 1’ under the heading ‘Modules’, which you can find in the tree to the left of the code window. Make sure that the code window for ‘Module 1’ shows the headings ‘(General)’ and ‘(Declarations)’ in the pull-downs before you paste in the code.
12. Now change the last line listed above (Dim entry() As CHKentry) to read:
Public entry() As CHKentry
13. Still the ‘Module 1’ add the following two lines at the top:
Public fnum
Public fnum2
14. We’re done with ‘Module 1’ now, so save what you have done so far and click back to ‘sheet 1(sheet 1)’ under the heading Microsoft Excel Objects.
15. Locate the line that reads:
Debug.Print "Done - real new file size is "; FileLen(folder & Cells(1, 3) & "\" & fname & "_new.data.chk")
16. Replace that line with this code:
MsgBox ("Done - real new file size is " & FileLen(folder & Cells(1, 3) & "\" & fname & "_new.data.chk"))
This will give you a friendly message box when the process is complete.
17. Save the code and switch windows to your spreadsheet.
Now you have to make a simple spreadsheet on Sheet 1 of your spreadsheet. This is no time to get fancy by changing the names of sheets or folders etc. Just leave everything as default to start with to guarantee that it will work.
18. Using the tabulated form that Lutz Bendlin posted (also pasted at the foot of this posting for your convenience), enter your filenames from cell C2 to C31. Being a Palm owner, I made no use of lines 17 onwards and I am not sure of the function of line 32. However, it works if you leave it there as listed and this is just a ‘quick and dirty’...
NOTE: All your sound files must have names that do not contain spaces (use underscores if it helps). You must also use only the filename and the extension – do not put the path as the code already expects to find the files in C:\TomTom\UKVoices.
19. Still looking at ‘Sheet 1’ of your spreadsheet, make sure you can see the ‘Control Toolbox’ toolbar (View|Toolbars|Control Toolbox).
20. Change to ‘Design Mode’ by clicking the button with a blue set-square on it.
21. Drag a command button to any convenient space on your sheet and make resize it to look neat.
22. If you like, you can change the Caption text on the button to ‘RUN’ or anything else you think it appropriate (Right-click, select ‘Properties’ and edit ‘Caption’).
23. Now, right-click on the command button and select ‘View Code’. This will return you to the VB editor and you will find that it has already made an entry for the new command button.
24. Between the lines:
Private Sub CommandButton1_Click()
and
End Sub,
Add the following:
data_chk_reload
25. Now save the VB code and close the VB editor
26. Return to the Excel sheet and exit Design Mode by clicking the button with a blue set-square on it again.
27. Save your spreadsheet.
Before you can use the tool to pack your new sounds into a new DATA.CHK file, you have just a few more steps to go:
28. Open Windows Explorer and copy theDATA.CHK from the \TomTom folder on your TomTom removable media card.
29. Paste this file into C:\TomTom and rename it to 2852.data.chk
30. You should now be ready to make a new file. Switch to your Excel sheet and click your command button (the one called RUN or whatever you decided to name it).
31. Now wait...(It can take a few minutes even on a fast PC). When the process is complete, you should hear a bleep and get a message box telling you that the process has finished.
32. The new DATA.CHK file will be in your C:\TomTom\UKVoices folder and it will be called 2852_new.data.chk.
33. Copy the new file to your removable media \TomTom folder, rename the old DATA.CHK to something like DATA._HK, so you don’t lose the original, and then rename 2852_new.data.chk to DATA.CHK.
34. Start TomTom Navigator and check that it works!
Enjoy!
TomTomTim
Credit where it is due:
My thanks to Alex Graf (author of Viftool) for providing me with help when changing spoken voice commands in TomTom Navigator – experience which was crucial to my understanding of what to do with the POI warning sounds.
Thanks also to Lutz Bendlin for sharing the code that this posting is all about. Without his work, we’d all be doing this from scratch.
Thanks also to Dave Francis, a good friend and skilled programmer, who gave precious time on a rare visit to the UK to help me figure out how to make this work.
For my part, I claim nothing except that I have spent a Sunday afternoon typing this up when I should have been doing other stuff. Please make sure you credit Lutz if you use his code and remember that he made it available to the public domain, so it would be wrong to try to make money from it or its use.
For reference
Here is all of Lutz Bendlin’s code and the outline for the spreadsheet you will need for step 18 (above) - First the code (with the source folder entry modified):
Quote:
Sub data_chk_reload()
Type CHKentry
offset As Long
sourceoffset As Long
length As Long
tag As Byte
packtype As Byte
blocks As Integer
ogglength As Long
End Type
Dim g As Long
Dim b As Byte
Dim bt As Byte
Dim Maxfiles
Maxfiles = 30
Dim entry() As CHKentry
'this folder holds the original data.chk file N.B. Following line modified by TomTomTim
folder = "C:\TomTom\"
'identifier of the data.chk version. complete file name is identifier.data.chk
fname = "2852"
'the OGG files need to be in the subfolder specified by cell C1
fnum = FreeFile
Open folder & fname & ".data.chk" For Binary Access Read As #fnum
flen = FileLen(folder & fname & ".data.chk")
g = get_long
Debug.Print fname; " Number of modules: "; g; " File size: "; flen
If (g <> 102) And (g <> 120) And (g <> 123) And (g <> 136) Then
a = MsgBox("Not a good DATA.CHK file. Please report your build version of the TomTom program to lutz@pocketgpsworld.com", vbOKCancel, "Error - wrong file version")
Close
Exit Sub
End If
'get offsets
If g = 102 Then Maxfiles = 12
ReDim entry(g + 1)
For i = 1 To g + 1
entry(i).offset = get_long
entry(i).sourceoffset = entry(i).offset
If i > 1 Then entry(i - 1).length = entry(i).offset - entry(i - 1).offset
Next
'confirm file size
If entry(g + 1).offset = flen Then
Debug.Print "File size confirmed"
Else
Debug.Print "File size mismatch! Reported:" & Hex(entry(g + 1).offset) & " Actual:" & flen
End If
'calculating new offsets etc
Debug.Print "Calculating new parameters"
i = 2
For f = g - Maxfiles To g
If (Cells(i, 3) > vbNullString) And (f < g) Then 'new file
Debug.Print "Verifying "; Cells(i, 3)
flen = FileLen(folder & Cells(1, 3) & "\" & Cells(i, 3))
entry(f).ogglength = flen
pad = 0
While flen Mod 4 <> 0
flen = flen + 1
pad = pad + 1
Wend
entry(f).blocks = (flen + 12) / 4
entry(f).length = flen + 16
End If
i = i + 1
Next
'recalculate header
Debug.Print "Recalculating header ";
For i = g - Maxfiles To g + 1
entry(i).offset = entry(i - 1).offset + entry(i - 1).length
Next
Debug.Print "- new File Size is "; entry(g + 1).offset
'write output file
Debug.Print "Writing CHK file "
On Error Resume Next
Kill folder & Cells(1, 3) & "\" & fname & "_new.data.chk"
On Error GoTo 0
fnum2 = FreeFile
Open folder & Cells(1, 3) & "\" & fname & "_new.data.chk" For Binary Access Write As #fnum2
'write header
'number of segments
put_long (g)
'offsets
For i = 1 To g + 1
put_long (entry(i).offset)
Next
'non-voice files
'position pointer
Get #fnum, entry(1).offset, b
h = entry(g - Maxfiles).offset - entry(1).offset
For i = 1 To h
Get #fnum, , b
Put #fnum2, , b
DoEvents
Next
'write sound files, either from source or from new OGG
Debug.Print "Writing CHK file - Sounds"
i = 2
For f = g - Maxfiles To g
If (Cells(i, 3) > vbNullString) And (f < g) Then 'read new file
Debug.Print "Including "; Cells(i, 3); " for "; Cells(i, 1)
'recreate header
b = 1
Put #fnum2, , b
b = 0
Put #fnum2, , b
b = entry(f).blocks \ 256
Put #fnum2, , b
b = entry(f).blocks And 255
Put #fnum2, , b
put_long (1)
put_long (8)
put_long (entry(f).ogglength)
fout = FreeFile
Open folder & Cells(1, 3) & "\" & Cells(i, 3) For Binary Access Read As #fout
For h = 1 To entry(f).ogglength
Get #fout, , b
Put #fnum2, , b
DoEvents
Next
'padding
b = 0
flen = entry(f).ogglength
While flen Mod 4 <> 0
Put #fnum2, , b
flen = flen + 1
Wend
Close (fout)
Else 'read from source
'position pointer
Get #fnum, entry(f).sourceoffset, b
For h = 1 To entry(f).length
Get #fnum, , b
Put #fnum2, , b
DoEvents
Next
End If
i = i + 1
Next
Close
Beep
Debug.Print "Done - real new file size is "; FileLen(folder & Cells(1, 3) & "\" & fname & "_new.data.chk")
End Sub
'required because of the little endian storage of long values
Function get_long() As Long
Dim b As Byte
l = 0
For h = 1 To 4
Get #fnum, , b
l = l * 256 + b
Next
get_long = l
End Function
Sub put_long(ByVal l As Long)
Dim b(4) As Byte
For h = 1 To 4
b(h) = l And 255
l = l \ 256
Next
For h = 4 To 1 Step -1
Put #fnum2, , b(h)
Next
End Sub
Posted: Today Post subject: Pocket GPS Advertising
We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
Have you considered making a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!