2
$\begingroup$

I accidentally didn't program my ST300 properly to record just 5 min files, and ended up with 1 hr files at 288 kHz so they are very large. I'd like to split them into smaller files so they are a bit more manageable for analysis. Is there any way within the SoundTrap software or in Pamguard to split the raw .sud files?

I can read in and rewrite the .wav files in MATLAB but just thought I'd check if there was a more 'preferred' way. There are only 3 files so the method doesn't need to be particularly fast.

$\endgroup$

2 Answers 2

2
$\begingroup$

If you want to read SUD files and write split-up WAV files, then this could be achieved in PAMGuard.

The idea here would be to use PAMGuard's "Sound acquisition" module to read the SUD files, and PAMGuard's "Sound recorder" module to write wav files. The sound recorder allows you to specify the shorter of the maximum duration and file size.

Detailed steps:

  • Add a Sound Acquisition module.
    • Set Data Source Type to 'Audio file folder or multiple files'
    • Browse to select the single .sud file or folder of .sud files you want to process
      *Note, if there are .wav files in the same folder as the .sud files you want to read, the .sud files will not appear! If .wav's were created with SoundTrap Host, move the .sud files to their own folder and try to look for them again
  • Add a Sound Recording module
    • Under Settings > Files and Folders modify the output folder (if you want) and set the file length or size that you want
    • On the Control tab change PAMGuard Startup Options to 'Start Recording' and hit 'Ok'
  • Press the red record button at the top!
  • I don't know if this matters or not, but after it was done, I changed the PAMGuard Startup Options to 'Remain idle' before saving my configuration and exiting. I didn't want to accidentally open this preferences file in the future and start to overwrite/rewrite these files (but this may not matter...just unclear on how that option works)

Sound recorder and data flow for simple PAMGuard sud->split wav

$\endgroup$
3
  • $\begingroup$ I guess, that is a better method, $\endgroup$
    – WMXZ
    Commented Oct 21 at 18:42
  • $\begingroup$ This looks promising - I'll give this a try! $\endgroup$
    – selene
    Commented Oct 22 at 4:49
  • $\begingroup$ This worked and was relatively straightforward! I had never used the sound recorder module in Pamguard so had to work out a few additional details and I added those to the answer in case they will help anyone else. There were two small 'issues' - the newly written files are in UTC (github.com/PAMGuard/PAMGuard/issues/113) while my original files are in local time and it's not possible to output the file name exactly as default .sud/SoundTrapHost unpacked .wav file name. Not deal breakers just an FYI. $\endgroup$
    – selene
    Commented Nov 19 at 16:08
1
$\begingroup$

Maybe https://github.com/Sound-Net/sudunarchiver is the way to go. I have not looked into the code but Jamie may chime in and tell you more. As I have not done Java programming for about 30 Years, I may not of great help adapting this SW.

$\endgroup$
1
  • $\begingroup$ Thanks WMXZ this seems potentially useful but also maybe beyond my skill set. I'm going to give the other answer a try and will report back. $\endgroup$
    – selene
    Commented Oct 22 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.