Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20 mhz mode #146

Open
oyvindln opened this issue May 3, 2023 · 1 comment
Open

20 mhz mode #146

oyvindln opened this issue May 3, 2023 · 1 comment
Labels
Domesday Duplicator GUI Issue only affecting the GUI capture application enhancement

Comments

@oyvindln
Copy link
Contributor

oyvindln commented May 3, 2023

This would be very useful for formats that don't need the full sample rate to save disk space and reduce risk of sample drops due to slow writes.

Not sure if this could be sorted simply in teh capture app with simple 2:1 decimation or if it requires extra filtering to avoid aliasing

@simoninns simoninns added enhancement Domesday Duplicator GUI Issue only affecting the GUI capture application labels Aug 20, 2023
@wondras
Copy link

wondras commented Sep 9, 2023

Here is a quick Python script you can use to see if simple decimation is viable:

#!/usr/bin/env python3

import sys
import numpy as np

BUF_SIZE = 1024*1024*10

while True:
    in_buf = sys.stdin.buffer.read(BUF_SIZE)
    if len(in_buf) == 0:
        break
    in_array = np.copy(np.frombuffer(in_buf, dtype=np.int16))
    out_array = in_array[::2]
    sys.stdout.buffer.write(out_array.tobytes())

It uses 16-bit raw input and output, and drops every other pair of bytes.

Simple test to show functionality:

$ echo 'This is a test 1234567890' | python3 ./decimation_test.py
Th ia st23670

Pipeline to decimate an LDS file:

$ ld-lds-converter -u -i test.lds | python3 decimation_test.py | ld-lds-converter -p -o test_decimated.lds
$ ls -l
total 29312
-rwxr-xr-x@ 1 warren  staff       317 Sep  9 11:42 decimation_test.py
-rw-r--r--  1 warren  staff  10000000 Sep  9 11:58 test.lds
-rw-r--r--  1 warren  staff   5000000 Sep  9 11:58 test_decimated.lds

(10 MB decimated to 5 MB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domesday Duplicator GUI Issue only affecting the GUI capture application enhancement
Projects
None yet
Development

No branches or pull requests

3 participants