Chord 2qute and my DOP challenge

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Interesting. Are you really sure LMS stops and MPD skips? Because that really makes no sense...

If you were not so sure, we can prepare a few minutes of repeated sweep in dsf using latest sox in arch https://aur.archlinux.org/packages/sox-dsd-git/ . The 2qute output can be recorded with your internal soundcard in audacity where you can easily check afterwards whether the playback skipped or stopped.
 
Interesting. Are you really sure LMS stops and MPD skips? Because that really makes no sense...

If you were not so sure, we can prepare a few minutes of repeated sweep in dsf using latest sox in arch https://aur.archlinux.org/packages/sox-dsd-git/ . The 2qute output can be recorded with your internal soundcard in audacity where you can easily check afterwards whether the playback skipped or stopped.

I'm not sure. It's only 0.5sec once every hour, and As you say it make no sense.

Of these 5 runs I have skips in all of them :)

Lets try the test, what to do ??? I'm preparing the sox-dsd-git from AUR.
 
Last edited:
sox: SoX v14.4.2
Code:
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopt]]...

SPECIAL FILENAMES (infile, outfile):
-                        Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device     Use the default audio device (where available)
-n, --null               Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe           Alias for `-t sox -'

SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
[url=http://server/file]404 Not Found[/url]       Use the given URL as input file (where supported)

GLOBAL OPTIONS (gopts) (can be specified at any point before the first effect):
--buffer BYTES           Set the size of all processing buffers (default 8192)
--clobber                Don't prompt to overwrite output file (default)
--combine concatenate    Concatenate all input files (default for sox, rec)
--combine sequence       Sequence all input files (default for play)
-D, --no-dither          Don't dither automatically
--dft-min NUM            Minimum size (log2) for DFT processing (default 10)
--effects-file FILENAME  File containing effects and options
-G, --guard              Use temporary files to guard against clipping
-h, --help               Display version number and usage information
--help-effect NAME       Show usage of effect NAME, or NAME=all for all
--help-format NAME       Show info on format NAME, or NAME=all for all
--i, --info              Behave as soxi(1)
--input-buffer BYTES     Override the input buffer size (default: as --buffer)
--no-clobber             Prompt to overwrite output file
-m, --combine mix        Mix multiple input files (instead of concatenating)
--combine mix-power      Mix to equal power (instead of concatenating)
-M, --combine merge      Merge multiple input files (instead of concatenating)
--magic                  Use `magic' file-type detection
--multi-threaded         Enable parallel effects channels processing
--norm                   Guard (see --guard) & normalise
--play-rate-arg ARG      Default `rate' argument for auto-resample with `play'
--plot gnuplot|octave    Generate script to plot response of filter effect
-q, --no-show-progress   Run in quiet mode; opposite of -S
--replay-gain track|album|off  Default: off (sox, rec), track (play)
-R                       Use default random numbers (same on each run of SoX)
-S, --show-progress      Display progress while processing audio data
--single-threaded        Disable parallel effects channels processing
--temp DIRECTORY         Specify the directory to use for temporary files
-T, --combine multiply   Multiply samples of corresponding channels from all
                         input files (instead of concatenating)
--version                Display version number of SoX and exit
-V[LEVEL]                Increment or set verbosity level (default 2); levels:
                           1: failure messages
                           2: warnings
                           3: details of processing
                           4-6: increasing levels of debug messages
FORMAT OPTIONS (fopts):
Input file format options need only be supplied for files that are headerless.
Output files will have the same format as the input file where possible and not
overridden by any of various means including providing output format options.

-v|--volume FACTOR       Input file volume adjustment factor (real number)
--ignore-length          Ignore input file length given in header; read to EOF
-t|--type FILETYPE       File type of audio
-e|--encoding ENCODING   Set encoding (ENCODING may be one of signed-integer,
                         unsigned-integer, floating-point, mu-law, a-law,
                         ima-adpcm, ms-adpcm, gsm-full-rate)
-b|--bits BITS           Encoded sample size in bits
-N|--reverse-nibbles     Encoded nibble-order
-X|--reverse-bits        Encoded bit-order
--endian little|big|swap Encoded byte-order; swap means opposite to default
-L/-B/-x                 Short options for the above
-c|--channels CHANNELS   Number of channels of audio data; e.g. 2 = stereo
-r|--rate RATE           Sample rate of audio
-C|--compression FACTOR  Compression factor for output format
--add-comment TEXT       Append output file comment
--comment TEXT           Specify comment text for the output file
--comment-file FILENAME  File containing comment text for the output file
--no-glob                Don't `glob' wildcard match the following filename

AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dff dsf dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg opus paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl sln smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm wsd wv wve xa xi
PLAYLIST FORMATS: m3u pls
AUDIO DEVICE DRIVERS: alsa ao oss ossdsp pulseaudio

EFFECTS: allpass band bandpass bandreject bass bend biquad chorus channels compand contrast dcshift deemph delay dither divide+ dop downsample earwax echo echos equalizer fade fir firfit+ flanger gain highpass hilbert input# ladspa loudness lowpass mcompand noiseprof noisered norm oops output# overdrive pad phaser pitch rate remix repeat reverb reverse riaa sdm silence sinc spectrogram speed splice stat stats stretch swap synth tempo treble tremolo trim upsample vad vol
  * Deprecated effect    + Experimental effect    # LibSoX-only effect
EFFECT OPTIONS (effopts): effect dependent; see --help-effect
 
I do not know if that sox-dsf can play DoP, actually I doubt it. But the idea was using sox for generating our custom dsf file which could help with identifying whether squeezelite skips or pauses.

I think if you generate long dsf file with repeated sweep up and down and up and down, record chord output signal with internal soundcard into audacity, and scroll to the place where the fault is, you should be able to tell whether it is a skip or pause - just show spectrum of/listen to a short section before and after. Or cut out the delay/join the two parts and listen. If the frequency is continuous for the two sections, it is a pause, if there is a frequency skipped - it is clearly a skip.

We can generate the sweep first and then convert to dsf. Please first try converting any flac/wav to dsf using your compiled sox and play with mpd/squeezelite to test the dsf conversion actually works.

According to the patch author https://www.computeraudiophile.com/...ncoding-with-sox/?tab=comments#comment-456522 the command should be:

Code:
sox file.flac file.dsf rate -v 2822400 sdm -f hq


Generating the sweep:

Code:
sox -n -c 2 -r 44100 -b 24 sweep-up.flac synth 10 sine 100-15000
sox -n -c 2 -r 44100 -b 24 sweep-down.flac synth 10 sine 15000-100
This will join the two sweeps and do 29 repetitions - resulting in 600 secs of sweeping:

Code:
sox  sweep-up.flac sweep-down.flac sweep.flac repeat 29

You may want to make the sweep even longer (one hour).

Afterwards you can convert the long flac to dsf using the command tested above (will probably take some time).
 
Measuring the playback time would be much easier and more precise with sox too, compared to MPD/squeezelite.

I looked into your message to sox mailinglist- did you try something like this?

Code:
sox file.dsf -t alsa plughw:1 dop

Fantastic This was the real gold...

Code:
sudo sox file.dsf -r 176.4k -b 24 -t alsa plughw:1 dop

Thanks so much... This gives me DOP white light on the Chord 2QUTE.

hw_params is : format: S32_LE,channels: 2,rate: 176400 (176400/1),period_size: 1024,buffer_size: 8192
 
Great, that will help us. Now once the dop effect is confirmed to work, we do not need sox for DoP playback. We can store the "DoPed" samples to any wav and play with alsa test-player called aplay which offers the easiest configuration of all needed parameters - period size, buffer size, etc.

Try storing the samples to wav and play with aplay:

Code:
sox file.dsf -r 176.4k -b 24 dop.wav dop
aplay -v -D plughw:1 dop.wav

BTW why do you need sudo for playback? Is your user in group "audio"? Alsa udev rules are/should be configured so that every audio device created (including usb audio devices) is readable/writeable by the group audio.
 
Great, that will help us. Now once the dop effect is confirmed to work, we do not need sox for DoP playback. We can store the "DoPed" samples to any wav and play with alsa test-player called aplay which offers the easiest configuration of all needed parameters - period size, buffer size, etc.

Try storing the samples to wav and play with aplay:

Code:
sox file.dsf -r 176.4k -b 24 dop.wav dop
aplay -v -D plughw:1 dop.wav

BTW why do you need sudo for playback? Is your user in group "audio"? Alsa udev rules are/should be configured so that every audio device created (including usb audio devices) is readable/writeable by the group audio.

Only because as you write lack of proper setup.

I can still can provoke these fallout just by playing, but sox is more stable than MPD.
If sox has a parameter for have some data in a buffer , it properly would has as few fallout as squeezelite when using the -b parameter.
 
The only difference I could tell between MPD and squeezelite playback are the requested period/buffer sizes. MPD has them 10times larger (and even more than sox) which somehow results in more dropouts. That is why I think we will need adjusting these parameters fast and flexible for our diagnostics.

That is where aplay excells - it has command-line parameters for all of that, great logging, no overhead for precise time measurement. Unlike sox which has the period/buffer figures basically hardcoded in the source code https://github.com/chirlu/sox/blob/master/src/alsa.c#L141 . That is why I want to use aplay for both PCM as well as DSD-DoP.
 
The aplay -v -D plughw:1 dop.wav works fine... And It's fallout almost every time.

Code:
Playing WAVE 'testfile.wav' : Signed 24 bit Little Endian in 3bytes, Rate 176400 Hz, Stereo
Plug PCM: Linear conversion PCM (S32_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S24_3LE
  subformat    : STD
  channels     : 2
  rate         : 176400
  exact rate   : 176400 (176400/1)
  msbits       : 24
  buffer_size  : 88200
  period_size  : 22050
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 22050
  period_event : 0
  start_threshold  : 88200
  stop_threshold   : 88200
  silence_threshold: 0
  silence_size : 0
  boundary     : 6206523236469964800
Slave: Hardware PCM card 1 '2Qute' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 176400
  exact rate   : 176400 (176400/1)
  msbits       : 32
  buffer_size  : 88200
  period_size  : 22050
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 22050
  period_event : 0
  start_threshold  : 88200
  stop_threshold   : 88200
  silence_threshold: 0
  silence_size : 0
  boundary     : 6206523236469964800
  appl_ptr     : 0
  hw_ptr       : 0

Chord is in DOP mode with white light...
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.