upsampling (universo LMS/Squeezelite/Squeezeplay)

Pagina 4 di 88
prima
1 2 3 4 5 6 7 8 9 10 11 12 13 14 54 ... ultimo
Visualizzazione dei risultati da 31 a 40 su 874
  1. #31
    tebibyte L'avatar di UnixMan
    Registrato
    Sep 2013
    Messaggi
    2,529
    configurazione

    Predefinito

    Originariamente inviato da marcoc1712
    Confermo, LMS usa SOX.
    ok, quindi verosimilmente c'è una chiamata a "pipe" (oppure ad "open") che lancia sox con gli opportuni parametri come filtro...

    pipe - perldoc.perl.org

    executing external commands | Perl HowTo

    gestirlo dovrebbe essere banale.

    Si può lasciare all'utente la possibilità di utilizzare/scegliere tutte le opzioni relative alla funzione "rate" di sox (cosa potente e versatile, ma che renderebbe la UI troppo complessa per i "non-techie", vanificandone lo scopo...) oppure più semplicemente preparare una lista di opzioni "preconfezionate" ragionevoli (ad es. le stesse utilizzate da libsoxr) ed infilarle in un menu a tendina.

    Da non dimenticare una opzione per applicare una attenuazione di qualche dB allo stream (funzione "gain" di sox) prima del resampling, per evitare il rischio di clipping.

    Originariamente inviato da marcoc1712
    Quindi SOX è di fatto un wrapper per libsoxr, o capisco male io?
    capisci male. :-)

    Sox è nato come programma monolitico. Solo in seguito le (alcune?) sue funzionalità sono state separate dalla UI (CLI), creando le librerie "libsox" e "libsox-fmt-*".

    La libreria "libsoxr" è nata ancora più tardi (solo di recente), con lo scopo di creare una alternativa alla "libsamplerate" che utilizzasse gli algoritmi di resamplig di sox anziché il "Secret Rabbit Code". In un certo senso si può considerare un "derivato" di sox; è basato sui suoi algoritmi (e presumibilmente su parte del suo codice) ma è sostanzialmente un progetto indipendente (anche se verosimilmente c'è uno scambio tra i due).

    Sox (e libsox) offrono un numero enorme di funzioni; come dichiarano loro stessi, sono praticamente il "coltellino svizzero" dell'audio. Ci puoi fare praticamente di tutto (o quasi).

    Al contrario "libsoxr" è una libreria altamente specializzata, che serve unicamente a fare resampling e nient'altro:

    The SoX Resampler library | SourceForge.net

    The SoX Resampler library / Code / [988f83] /README

    Libsoxr - Audacity Wiki

    The SoX Resampler library / Wiki / Home


    Originariamente inviato da marcoc1712
    Se è così, starei su SOX per massima compatibilità, cosa ne dite? Impone delle limitazioni?
    non è questione di compatibilità. Casomai, di funzionalità. Oltre al resampling, sox può fare molto altro.

    Se però ti interessa solo il resampling, libsoxr basta e avanza. Per giunta, forse va meglio. Se non altro dal punto di vista del "consumo di risorse": a parità di "operazione" richiesta, libsoxr "consuma" molta meno CPU di sox. Sebbene gli algoritmi siano gli stessi, probabilmente l'implementazione è stata ottimizzata meglio.

    A volte ho anche avuto l'impressione che (a parità di settings) libsoxr "suoni" meglio di sox, anche se non ci metterei la mano sul fuoco (ammesso e non concesso che sia vero, dato che uso un solo PC per tutto, potrebbe anche essere legato banalmente al minore uso della CPU con tutto ciò che ne consegue).

    Quindi, in definitiva IMHO converrebbe utilizzare libsoxr. Il problema è che, AFAIK, da Perl non si può fare. Non direttamente, almeno: prima bisognerebbe creare un "wrapper", cioè un "modulo" Perl (scritto in C) che usa libsoxr e ne rende disponibili le funzioni sotto forma di funzioni Perl. Probabilmente non sarebbe poi difficile farlo, ma personalmente non saprei da che parte cominciare (beh, da che parte cominciare magari sì... ma dovrei imparare tutto da zero, e non ho tempo).

    Originariamente inviato da marcoc1712
    NB:
    Squeezelite usa Libsox perchè non è scritto in perl ma in C. almeno così io capisco da qui, non ho scaricato i sorgenti
    yes Sir...

    https://code.google.com/p/squeezelite/source/browse/

    BTW: dai una occhiata qui:
    LMS 7.9 and DSD - Page 19

    (io non ho avuto tempo di leggere, ma vedo scritto libsoxr in un topic dove si parla di LMS...)
    Ultima modifica di UnixMan : 05-03-2015 a 20:10
    Ciao, Paolo.

    «Se tu hai una mela, e io ho una mela, e ce le scambiamo, allora tu ed io abbiamo sempre una mela per uno. Ma se tu hai un'idea, ed io ho un'idea, e ce le scambiamo, allora abbiamo entrambi due idee.»

  2. #32
    tebibyte L'avatar di UnixMan
    Registrato
    Sep 2013
    Messaggi
    2,529
    configurazione

    Predefinito

    Originariamente inviato da marcoc1712
    Cosa strana: Almeno in Win SOX pare arrivi solo a 192K, vi risulta?
    non ho idea se ci siano limitazioni nella versione win... I don't do windows, ever.

    Di sicuro su Linux non ce ne sono. Da linea di comando puoi "upsamplare" quanto vuoi...
    Ciao, Paolo.

    «Se tu hai una mela, e io ho una mela, e ce le scambiamo, allora tu ed io abbiamo sempre una mela per uno. Ma se tu hai un'idea, ed io ho un'idea, e ce le scambiamo, allora abbiamo entrambi due idee.»

  3. #33
    pebibyte L'avatar di marcoc1712
    Registrato
    Jan 2013
    Messaggi
    5,254
    configurazione

    Predefinito

    Originariamente inviato da DacPassion
    Strano, in Daphile partendo da file 16/44 mi fa accendere tranquillamente la spia dei 384, comunque avevo letto pareri contrastanti riguardo il fatto che squeezelight superasse o meno risoluzioni maggiori di 192, nella stessa pagina di daphile è dichiarato il supporto fino a 192
    Daphile = Linux ed è certo che Squeezelite su Linux arriva a 384 via USB (non SPDIF). Il problema è: è SOX che arriva a 384 in Linux e non in Win o qualcos'altro? Daphile dichiara 192 per essere 'conservativo'.


    Qui i soliti noti ne discutono:

    Community Squeeze OS R3 - Page 76

  4. #34
    pebibyte L'avatar di marcoc1712
    Registrato
    Jan 2013
    Messaggi
    5,254
    configurazione

    Predefinito

    Originariamente inviato da UnixMan
    non ho idea se ci siano limitazioni nella versione win... I don't do windows, ever.

    Di sicuro su Linux non ce ne sono. Da linea di comando puoi "upsamplare" quanto vuoi...
    Quanto vuoi vuol dire senza limiti, anche oltre i 384?

    Scusa l'ignoranza

  5. #35
    tebibyte L'avatar di UnixMan
    Registrato
    Sep 2013
    Messaggi
    2,529
    configurazione

    Predefinito

    Dalla man page di SOX:

    codice:
           rate [-q|-l|-m|-h|-v] [override-options] RATE[k]
                  Change  the  audio  sampling  rate (i.e. resample the audio) to any given RATE (even non-integer if this is supported by the
                  output file format) using a quality level defined as follows:
    
                                                             Quality   Band-   Rej dB   Typical Use
                                                                       width
                                                       -q     quick     n/a    ~=30 @   playback on
                                                                                Fs/4    ancient hardware
                                                       -l      low      80%     100     playback on old
                                                                                        hardware
                                                       -m    medium     95%     100     audio playback
                                                       -h     high      95%     125     16-bit mastering
                                                                                        (use with dither)
                                                       -v   very high   95%     175     24-bit mastering
    
                  where Band-width is the percentage of the audio frequency band that is preserved and Rej dB is the level of noise rejection.
                  Increasing levels of resampling quality come at the expense of increasing amounts of time to process the audio.  If no qual-
                  ity option is given, the quality level used is `high' (but see `Playing & Recording Audio' above regarding playback).
    
                  The  `quick' algorithm uses cubic interpolation; all others use band-limited interpolation.  By default, all algorithms have
                  a `linear' phase response; for `medium', `high' and `very high', the phase response is configurable (see below).
    
                  The rate effect is invoked automatically if SoX's -r option specifies a rate that is different to that of the input file(s).
                  Alternatively,  if  this effect is given explicitly, then SoX's -r option need not be given.  For example, the following two
                  commands are equivalent:
                     sox input.wav -r 48k output.wav bass -b 24
                     sox input.wav        output.wav bass -b 24 rate 48k
                  though the second command is more flexible as it allows rate options to be given, and allows the effects to be ordered arbi-
                  trarily.
    
                                                                      *        *        *
    
                  Warning: technically detailed discussion follows.
    
                  The  simple  quality  selection  described above provides settings that satisfy the needs of the vast majority of resampling
                  tasks.  Occasionally, however, it may be desirable to fine-tune the resampler's filter response; this can be achieved  using
                  override options, as detailed in the following table:
    
                                               -M/-I/-L     Phase response = minimum/intermediate/linear
                                               -s           Steep filter (band-width = 99%)
                                               -a           Allow aliasing/imaging above the pass-band
                                               -b 74-99.7   Any band-width %
                                               -p 0-100     Any phase response (0 = minimum, 25 = intermediate,
                                                            50 = linear, 100 = maximum)
    
                  N.B.  Override options cannot be used with the `quick' or `low' quality algorithms.
    
                  All resamplers use filters that can sometimes create `echo' (a.k.a.  `ringing') artefacts with  transient  signals  such  as
                  those  that  occur  with  `finger  snaps' or other highly percussive sounds.  Such artefacts are much more noticeable to the
                  human ear if they occur before the transient (`pre-echo') than if they occur after it (`post-echo').  Note that frequency of
                  any  such  artefacts  is related to the smaller of the original and new sampling rates but that if this is at least 44.1kHz,
                  then the artefacts will lie outside the range of human hearing.
    
                  A phase response setting may be used to control the distribution of any transient echo between `pre' and `post': with  mini-
                  mum  phase,  there  is  no pre-echo but the longest post-echo; with linear phase, pre and post echo are in equal amounts (in
                  signal terms, but not audibility terms); the intermediate phase setting attempts to find the best compromise by selecting  a
                  small length (and level) of pre-echo and a medium lengthed post-echo.
    
                  Minimum,  intermediate,  or linear phase response is selected using the -M, -I, or -L option; a custom phase response can be
                  created with the -p option.  Note that phase responses between `linear' and `maximum' (greater than 50) are rarely useful.
    
    
                  A resampler's band-width setting determines how much of the frequency content of the original signal  (w.r.t.  the  original
                  sample  rate  when  up-sampling, or the new sample rate when down-sampling) is preserved during conversion.  The term `pass-
                  band' is used to refer to all frequencies up to the band-width point (e.g. for 44.1kHz sampling rate, and a resampling band-
                  width  of  95%, the pass-band represents frequencies from 0Hz (D.C.) to circa 21kHz).  Increasing the resampler's band-width
                  results in a slower conversion and can increase transient echo artefacts (and vice versa).
    
                  The -s `steep filter' option changes resampling band-width from the default 95% (based on the 3dB point), to  99%.   The  -b
                  option allows the band-width to be set to any value in the range 74-99.7 %, but note that band-width values greater than 99%
                  are not recommended for normal use as they can cause excessive transient echo.
    
                  If the -a option is given, then aliasing/imaging above the pass-band is allowed.  For example, with 44.1kHz  sampling  rate,
                  and  a  resampling band-width of 95%, this means that frequency content above 21kHz can be distorted; however, since this is
                  above the pass-band (i.e.  above the highest frequency of interest/audibility), this may not be a problem.  The benefits  of
                  allowing  aliasing/imaging are reduced processing time, and reduced (by almost half) transient echo artefacts.  Note that if
                  this option is given, then the minimum band-width allowable with -b increases to 85%.
    
                  Examples:
                     sox input.wav -b 16 output.wav rate -s -a 44100 dither -s
                  default (high) quality resampling; overrides: steep filter, allow aliasing; to 44.1kHz sample rate; noise-shaped  dither  to
                  16-bit WAV file.
                     sox input.wav -b 24 output.aiff rate -v -I -b 90 48k
                  very high quality resampling; overrides: intermediate phase, band-width 90%; to 48k sample rate; store output to 24-bit AIFF
                  file.
    (vedi anche: sox(1) - Linux man page )
    Ciao, Paolo.

    «Se tu hai una mela, e io ho una mela, e ce le scambiamo, allora tu ed io abbiamo sempre una mela per uno. Ma se tu hai un'idea, ed io ho un'idea, e ce le scambiamo, allora abbiamo entrambi due idee.»

  6. #36
    tebibyte L'avatar di UnixMan
    Registrato
    Sep 2013
    Messaggi
    2,529
    configurazione

    Predefinito

    Originariamente inviato da marcoc1712
    Quanto vuoi vuol dire senza limiti, anche oltre i 384?
    sì.

    Poi ovviamente devi tenere conto degli eventuali limiti del formato di uscita... ma di per sé (ad es. se esci in "raw") sox non pone limiti.
    Ciao, Paolo.

    «Se tu hai una mela, e io ho una mela, e ce le scambiamo, allora tu ed io abbiamo sempre una mela per uno. Ma se tu hai un'idea, ed io ho un'idea, e ce le scambiamo, allora abbiamo entrambi due idee.»

  7. #37
    pebibyte L'avatar di marcoc1712
    Registrato
    Jan 2013
    Messaggi
    5,254
    configurazione

    Predefinito

    Ma in main page di SOX c'è scritto:

    SoX is often used to convert an audio file from one sampling rate to another rate (e.g. from DAT to CD rates). SoX's resampling algorithm is highly configurable; there are some notes on selecting options for resampling. The resampler is also available separately as the SoX Resampler library (libsoxr).

    Da cui capisco che libsoxr è il 'motore' di resampling di SOX, enucleato in una libreria, così da poter essere utilizata da programmi terzi. In effetti il loro consiglio è di usare libsox e non sox da programmi terzi, ma perl è una bestia strana.

    In merito al DSD, è un lugin attivo da qualche tempo, sempre con le dovute pinze dato che non padroneggio il tutto, credo permetta la riproduzione nativa ove supportata, il DOP quando la risoluzione supportata è almeno di 192K o il downsampling DA SERVER (qui entra in gioco sox/libsox, secondo me). Che linguaggio e quali librerie ha usato chi ha scritto il plug in, non so, me installo e vedo (anche la gui).

    EDIT:

    Il plugin lo ha scritto Triode ed ecco la spiegazione: ...This will allow you to enable DSD over Dop support if your player supports 192k playback or higher. The plugin will convert DSD to PCM if your dac does not support DoP - you can adjust the resampling parameters from the settings page. They are the same parameters used for resampling by squeezelite....

    [If you use squeezelite then you will probably prefer to use the native DSD support in squeezelite rather than this plugin]

    Ciao.
    Ultima modifica di marcoc1712 : 05-03-2015 a 19:03

  8. #38
    kibibyte L'avatar di lucadita
    Registrato
    Oct 2014
    Località
    Vercelli
    Età
    53
    Messaggi
    445
    configurazione

    Predefinito

    Scusate se non partecipo, ma sono in partenza e per 3 o 4 giorni sarò' senza collegamento a meno di miracoli. A lunedì.

  9. #39
    gibibyte L'avatar di DacPassion
    Registrato
    Jul 2014
    Messaggi
    1,250

    Predefinito

    Originariamente inviato da marcoc1712
    Il plugin lo ha scritto Triode ed ecco la spiegazione: ...This will allow you to enable DSD over Dop support if your player supports 192k playback or higher. The plugin will convert DSD to PCM if your dac does not support DoP - you can adjust the resampling parameters from the settings page. They are the same parameters used for resampling by squeezelite....

    [If you use squeezelite then you will probably prefer to use the native DSD support in squeezelite rather than this plugin]

    Ciao.
    Quindi potrebbe essere una base di partenza?

  10. #40
    pebibyte L'avatar di marcoc1712
    Registrato
    Jan 2013
    Messaggi
    5,254
    configurazione

    Predefinito

    Originariamente inviato da DacPassion
    Quindi potrebbe essere una base di partenza?
    No, temo piuttosto che potrebbe essere una complicazione. Bisogna verificare dove sono scritti e come sono trattati i parametri per la riproduzione DSD, sia nativa (in LMS) che DOP o mediante conversione (dal plugin).

Pagina 4 di 88
prima
1 2 3 4 5 6 7 8 9 10 11 12 13 14 54 ... ultimo

Informazioni Thread

Users Browsing this Thread

Ci sono attualmente 1 utenti che stanno visualizzando questa discussione. (0 utenti e 1 ospiti)

Regole d'invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
nexthardware.com - © 2002-2022