Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 30-08-2019, 06:55   #1
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
wav file requirements

Hi all,

I am a happy user of opencpn on rpi3b/rpi3b+, recently updated to opencpn 5.0.0 under raspbian buster. Everything up2date.

I use a daisy ais receiver and wanted to replace the standard alert sound (2bells.wav, in /usr/share/opencpn/sounds), that sounds as expected, by something more annoying ;-)

I downloaded some wav's but they either do not play or are distorted when played.

I am not an expert on formats of sound files.

REMARK: I read in the wiki (https://opencpn.org/wiki/dokuwiki/do...ms_work_on_rpi) that wav files to be played from opencpn should be mono 16 bit 22050Hz ... but aplay (command line tool for playing wav files) tells me the following about 2bells.wav:
Playing WAVE '/usr/share/opencpn/sounds/2bells.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono..... I guess the 22050 Hz in the faq is outdated!?!?

Using an online converter, I converted a wav of my choice to the same format as 2bells.wav, which was succesful according to aplay (identical wav properties); furthermore, aplaying my new wav sounds as expected; however it does not play at all in opencpn.....

QUESTION: is there more to wav files than mono/stereo, 8/16 bit and frequency?? Any help appreciated!

regards knoek van soest
knoekvansoest is offline   Reply With Quote
Old 30-08-2019, 07:56   #2
Registered User
 
Bill O's Avatar

Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
Re: wav file requirements

We tried those changes to the wav files (16 bit, mono 22050 Hz) and it didn't work when we wanted different warning noises in Watchdog. The one and two bells sounds were formatted this way, but there is a better way.

I believe the mpg123 driver is already formatted on the pi and you could use that or upload the mplayer driver [ sudo apt install mplayer ] Then when you configure a new alarm (i.e. anchor), click off the sound (box) and click on the command (box). In the command line, put in driver and file location. For example, mplayer /[full path name] . Need to set up each alarm this way.

We used the list of alarms embedded plotter (mp3) but you can create any for these. If you have plotter the location of the list of alarms is in the startup tab and you can browse the list of mp3 sound files under there (if you wanted an alarm when plotter started).

Took us awhile to get the right info on how to set this up correctly.


Bill O.
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 30-08-2019, 10:45   #3
Registered User

Join Date: Oct 2018
Location: Bremerton, WA
Boat: Island Packet 485, 52'
Posts: 81
Re: wav file requirements

There are two Linux tools that can help you out.

1. mediainfo - this package can provide detailed information about audio and video files. Run this one the original file and record what the file encoding parameters are.

2. audacity - this will allow you to reencode, or modify your wav file with a very nice graphical front end. There may be other command-line ways of doing this too with ffmpeg, but there is probably a steeper learning curve. Use this to create a new file from your existing file, with the parameters found on step 1.

Good luck,

Sean
disputin is offline   Reply With Quote
Old 06-09-2019, 05:20   #4
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: wav file requirements

Quote:
Originally Posted by Bill O View Post
We tried those changes to the wav files (16 bit, mono 22050 Hz) and it didn't work when we wanted different warning noises in Watchdog. The one and two bells sounds were formatted this way, but there is a better way.

I believe the mpg123 driver is already formatted on the pi and you could use that or upload the mplayer driver [ sudo apt install mplayer ] Then when you configure a new alarm (i.e. anchor), click off the sound (box) and click on the command (box). In the command line, put in driver and file location. For example, mplayer /[full path name] . Need to set up each alarm this way.

We used the list of alarms embedded plotter (mp3) but you can create any for these. If you have plotter the location of the list of alarms is in the startup tab and you can browse the list of mp3 sound files under there (if you wanted an alarm when plotter started).

Took us awhile to get the right info on how to set this up correctly.


Bill O.
hello Bill, thanks for thinking along; never noticed the option in watchdog to replace "sound" (wav file) by "command", this is a useful option for sure! Unfortunately, my question was related to ais alarms and not watchdog alarms, and unfortunately in ais alarms a similar option to define an alarm "command" does not exist. Perhaps a good idea to suggest to the developers to structure the ais alarm setup along similar lines as the watchdog alarms in a future version of opencpn!

regards knoek van soest
knoekvansoest is offline   Reply With Quote
Old 06-09-2019, 05:53   #5
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: wav file requirements

Quote:
Originally Posted by disputin View Post
There are two Linux tools that can help you out.

1. mediainfo - this package can provide detailed information about audio and video files. Run this one the original file and record what the file encoding parameters are.

2. audacity - this will allow you to reencode, or modify your wav file with a very nice graphical front end. There may be other command-line ways of doing this too with ffmpeg, but there is probably a steeper learning curve. Use this to create a new file from your existing file, with the parameters found on step 1.

Good luck,

Sean
Hello Sean,

thanks for your reply. As was in my original post, I was already aware of wav file properties of the original 1bells.wav and 2bells.wav. I have reconfirmed these properties using another tool (audioinfo, standard matlab command), just to be sure. So I am now 100% certain that the 1bells.wav and 2bells.wav that are part of rpi opencpn by default are uncompressed 1 channel, 16 bit, 44100 hz sample frequency (btw and as noted before, this is inconsistent with the wiki). And I am also 100% sure that all these properties are identical in my new wav file.

Just to be clear, this new wav file plays ok from any music/sound player outside of opencpn, both on pc and on rpi; and I can select it as ais alarm sound in opencpn (I stored it in the same folder where the ?bell.wav files are); however, in opencpn it does not play at all ....

Any other ideas on this??

regards knoek van soest
knoekvansoest is offline   Reply With Quote
Old 06-09-2019, 06:10   #6
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: wav file requirements

Not much help, but for audio file fiddling SOX is pretty good >>
SoX - Sound eXchange | HomePage
conachair is offline   Reply With Quote
Old 06-09-2019, 06:22   #7
Registered User
 
Bill O's Avatar

Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
Re: wav file requirements

Quote:
Originally Posted by knoekvansoest View Post
hello Bill, thanks for thinking along; never noticed the option in watchdog to replace "sound" (wav file) by "command", this is a useful option for sure! Unfortunately, my question was related to ais alarms and not watchdog alarms, and unfortunately in ais alarms a similar option to define an alarm "command" does not exist. Perhaps a good idea to suggest to the developers to structure the ais alarm setup along similar lines as the watchdog alarms in a future version of opencpn!

regards knoek van soest

Just went through the process of playing w/the watchdog sounds so I was assuming it was similar in the AIS sounds. OK, now I see exactly what you are saying w/the AIS targets and totally agree w/the addition of the command line here also. The 1 and 2 bell files just don't cut it.
I was only able to get garbled sounds when I changed over the wav files to the "proper format". This task was very frustrating for such a simple item and different sound files are needed. It is very difficult sometimes to hear the bell sounds when better alert sound files are available.


Bill O.
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 06-09-2019, 06:27   #8
Registered User
 
Bill O's Avatar

Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
Re: wav file requirements

Quote:
Originally Posted by conachair View Post
Not much help, but for audio file fiddling SOX is pretty good >>
SoX - Sound eXchange | HomePage

Do you know who is in charge of possibly adding a command to the AIS feature like in Watchdog. Sean D'Epagnier did an excellent job tweaking the Watchdog plugin and agree that a command line to insert other alert sounds should be added to the AIS targets to make it more useful.


Bill O.
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 07-09-2019, 03:03   #9
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 244
Re: wav file requirements

Hi,

I made the experience that since april/may the original os (rasbian Stretch) changed in that way that I can´t play sound in oc.
I use hdmi or the Audio jack to bring the sound out no usb-soundcard or something like this.

Last Weekend I investigated this once more. It seems that there´s an issue with the sounddrivers of the os (Stretch) for the pi in combination with opencpn.

With an older os-version (older than April/may) I can play the sound files.

I changed the sampling rates and other things but this had no effect. The prob is, imho, that there´s now an audio driver in the os of the pi witch is not supported by OC.

My threat with the Audio probs look here: http://www.cruisersforum.com/forums/...io-218897.html

In the moment I use the older OS for the pi without doing an update/upgrade

I´m not the pi-profi but in the moment I think there´s a prob with the alsa-mixer / player witch is not supported in OC.
It have something to do with changes in the kernel of the pi´s OS in April/may.
When doing a rpi-update I get sound probs.
Normally you can easy switch back after rpi-update to the previos Version and than all worked fine.
But when doing an update/upgrade the way of undoing a rpi-update doesn´t work and you´ll get sound probs.

If someone have sugestions how to get the right alsa-player back to work...tell it please.
Or is it possible to install an other soundplayer and tell oc to use this.

Regards

Andreas
Andreas29 is offline   Reply With Quote
Reply

Tags
men


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Convert "*.route" Route File into ".*wpt" File To Be Used in Maxsea V.10 doiroda Navigation 7 12-03-2020 06:00
Ripping audio CD's. MP3, FLAC and WAV. Boracay Fishing, Recreation & Fun 7 07-11-2012 20:37
3.0.0 : make package : bad file right after installing the deb file manuprenlair OpenCPN 1 12-06-2012 04:17
Entry Requirements for Many Countries and Islands Sonosailor Rules of the Road, Regulations & Red Tape 3 05-03-2004 11:30
Potential New Topic - Entry Requirements Sonosailor Forum Tech Support & Site Help 3 26-01-2004 13:11

Advertise Here


All times are GMT -7. The time now is 10:32.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.