Author |
Topic |
jaaaaf
Pulcino
France
81 Posts |
Posted - 26/04/2015 : 10:21:59
|
I nearly finish sounds implementation for external device. I want to explain how it works here, it can be useful for devices who want to use it. I finally implement it by sending direct nmea sentences to external device, if device is configured for. To configure it on LK8000, simply go to device configuration, and put "Ext. sounds" to "ON". When it's ON, the file SOUND_TABLE.TXT in _Configuration is used to sent nmea sentences to external devices. I join a link here to a quick configuration I make for actual GoFly V4, I hope you will understand quickly how it works: https://dl.dropboxusercontent.com/u/66666938/LK8000/SOUND_TABLE.TXT Of course this configuration still need to be optimized for this device.
See it soon in next alpha version...
Note: As sounds are sent on device by com port and com port are disable in simulation mode, external sounds doesn't work in simulation mode. Note2: The original idea was to implement a device driver (see: http://www.postfrontal.com/forum/topic.asp?TOPIC_ID=7898), but finally it's more simple in that way :)
And thanks for Bruno for the help, and ideas to do it!
|
Jack, competition paragliding pilot _LK8000 on V2, V3, V4, ..._ |
|
parapenT1sta
Pterodattilo
Portugal
1864 Posts |
Posted - 26/04/2015 : 12:07:04
|
Regarding the first "Note", I was going crazy about it, thinking how I could test the sounds in SIM mode.
Thank you so much for all your hard work :) |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 26/04/2015 : 15:25:17
|
I guess we can use the "sound" feature also to send special commands not necessarily related to sound out. (Some devices with no sound , such Holux Funtrek for example, require using their own library to access sound.) Thanks !
|
Edited by - Coolwind on 26/04/2015 15:25:36 |
|
|
jaaaaf
Pulcino
France
81 Posts |
Posted - 26/04/2015 : 19:17:06
|
With this development, there are 3 ways to have sound : windows library, SDL library, and external nmea sentences. If a device use another library, I think the best is to match how is implemented SDL library and do the same :)
And an additional note for who want to test sounds by nmea on my actual git branch: In the SOUND_TABLE.TXT I give in my first post, I don't put many sounds, because sounds I get are very noisy, and I don't want to have very noisy sound each time I touch the screen! An easy way to test if sounds work is to make a task with a time gate and wait the sound for the task gate open. Or add many sounds in the SOUND_TABLE.TXT. But anyway, developments are not totally finished, and it's better to wait it's merge on Master branch. |
Jack, competition paragliding pilot _LK8000 on V2, V3, V4, ..._ |
Edited by - jaaaaf on 26/04/2015 19:24:14 |
|
|
sundancer
Pulcino
Czech Republic
40 Posts |
Posted - 26/04/2015 : 19:45:07
|
If I want to have custom SOUND TABLE.TXT do I have to make my own build? |
|
|
parapenT1sta
Pterodattilo
Portugal
1864 Posts |
Posted - 26/04/2015 : 19:47:28
|
quote: Originally posted by sundancer
If I want to have custom SOUND TABLE.TXT do I have to make my own build?
I thought the file was inside of KoboRoot.tgz but is not, if it was you could edit it from there. |
Edited by - parapenT1sta on 26/04/2015 19:50:43 |
|
|
jaaaaf
Pulcino
France
81 Posts |
Posted - 26/04/2015 : 20:09:11
|
At the beginning I put it as a system configuration file, but it was not a good idea because it's less accessible. This file will be in _Configuration directory, so everybody can modify it. And device dealer can give this configuration file with their device :) If you modify it, you just have to restart LK8000. |
Jack, competition paragliding pilot _LK8000 on V2, V3, V4, ..._ |
Edited by - jaaaaf on 26/04/2015 20:10:00 |
|
|
Jaros
Pulcino
USA
59 Posts |
Posted - 26/04/2015 : 20:21:25
|
quote: Originally posted by Coolwind
I guess we can use the "sound" feature also to send special commands not necessarily related to sound out.
Great job. Now I can add some servos to my paraglider's brakes, and ask LK8000 to center the thermal or fly to the next turnpoint. (of course we need some IMU fusion code from acc/gyro/baro sensors but this is will be next step)... Seems we are closer and closer to "autopilot" feature...
;)
Regards Jarek |
|
|
sundancer
Pulcino
Czech Republic
40 Posts |
Posted - 26/04/2015 : 20:42:15
|
Yeah! I forgot to crete the file to _configuration! Now it works like charm with my device!!!
Great job!!! Great job! Thank you very much... Beep beep!!! |
|
|
parapenT1sta
Pterodattilo
Portugal
1864 Posts |
|
jaaaaf
Pulcino
France
81 Posts |
Posted - 26/04/2015 : 21:08:15
|
For me configuration files in _Configuration directory are not build by compilation, but give directly in the release.
I remind you that this branch is not definitive code, side effects possible... |
Jack, competition paragliding pilot _LK8000 on V2, V3, V4, ..._ |
|
|
FlyingAl
Pulcino
11 Posts |
Posted - 03/05/2015 : 02:05:02
|
I posted this on Paragliding forum. http://www.paraglidingforum.com/viewtopic.php?p=458294#458294. Cross posted here for others to consider.
I have been thinking about altering the BlueFly v10 firmware to allow for custom sounds. Nothing is implemented yet, but if I find a spare day or so then I think I can get something working. It would be implemented like the command functions. Something like:
$BSD FFF DDD*
Where BSD is the sound command, FFF is the frequency in Hz, and DDD is the duration in ms. As soon as the command was received then the sound would start playing. There would be a buffer so multiple messages could be sent and concatenated after the first (and subsequent) sounds were played. If FFF was 0 then it would insert a silence of DDD ms.
I think this would work with the new LK8000 SOUND_TABLE.TXT function, but single tones might not be optimal. If I had more time I could implement a range of tunes with identifiers. Any ideas are welcome.
|
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 03/05/2015 : 03:35:26
|
What do you mean with range of tunes? Maybe I can help you - I used sound editing tools for all LK sounds so far - but I dont know what kind of sounds the bluefly can play. |
|
|
FlyingAl
Pulcino
11 Posts |
Posted - 03/05/2015 : 03:49:17
|
The current model of the BlueFly can only play simple tones at a particular frequency (between about 150Hz and about 4000 Hz) for a particular duration (up to about 10s in multiples of 10 ms). A series of tones could be added together to play a simple, short, tune. |
|
|
Coolwind
Moderator
Italy
8957 Posts |
Posted - 03/05/2015 : 04:18:31
|
It depends on what you want to play then. If you need the table of notes-hz is easy to find on internet.
|
|
|
FlyingAl
Pulcino
11 Posts |
Posted - 03/05/2015 : 04:35:33
|
Perhaps I should put the question another way. What do LK8000 users want alarms to sound like?
In the BlueFly I can implement alarms as a simple tone, or as complex as a series of tones. I can not play sound files - I have to encode it as raw tones. However, if there is a particular simple sound file you want me to emulate I think I can do that. I notice that some of the sounds for LK8000 are here: https://github.com/LK8000/LK8000/tree/beecb8b0306cc66a206419ad60b8a2fb56b58bb5/Common/Data/Sounds. But I do not know the codebase or application well enough to understand which of these might be used for alarms. |
|
|
Topic |
|