Deejaysystem professional tools Homepage
Forum Home Forum Home > Deejaysystem international > English-speaking forum
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Register Register  Login Login

Gain Control - another problem

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
PattayaPete View Drop Down
Newbie
Newbie


Joined: 24-Feb-2008
Online Status: Offline
Posts: 6
  Quote PattayaPete Quote  Post ReplyReply bullet Topic: Gain Control - another problem
    Posted: 21-May-2008 at 08:37
I really like deejaysystems video version and it does just about everything I want.  However a major annoyance is the gain control system.

I use it in full auto mode to play videos in a bar non-stop.  It is important that they all play at the same volume as there is no DJ to adjust the volume.

The gain control works great and smooths out volume fluctuations except that it seems to set a different volume for videos that have a PCM audio track.

With all my videos with DTS, AC3, MP3 tracks the volume is set by the auto gain to about -3db.  That is perfect.  However if the video has a PCM audio file the volume is set to 0db.  Three db is a big difference and it is very unsettling to have these volume changes between track.  I tried to lower the volume of the PCM track by 3db by editing it in my audio editor but deejaysystem compensates by turning it up further until I still get 0db on playback.

I desperately need a quick fix for this.  Whatever is causing this can I'm sure be fixed in the next version but I need it fixed now.  Is it possible to edit the database where the volume levels are stored so I can drop the 3db off my pcm tracks.  I tried to edit the database with a SQLite browser but it does not recognise the format of the db files.

Please help me!


Back to Top
PattayaPete View Drop Down
Newbie
Newbie


Joined: 24-Feb-2008
Online Status: Offline
Posts: 6
  Quote PattayaPete Quote  Post ReplyReply bullet Posted: 21-May-2008 at 08:57
While I think of it, another question about the gain control.  On my system the gain is varied from the middle of the scale to +6db.  It never goes down from the middle of the scale towards 0 db.  Not really a problem for me but I'm just curios why this is.
Back to Top
PattayaPete View Drop Down
Newbie
Newbie


Joined: 24-Feb-2008
Online Status: Offline
Posts: 6
  Quote PattayaPete Quote  Post ReplyReply bullet Posted: 26-May-2008 at 06:22
Edy, where are you.  Do you have an answer to this one??
Back to Top
Edy View Drop Down
Development Team
Development Team
Avatar

Joined: 05-Aug-2004
Location: Spain
Online Status: Offline
Posts: 961
  Quote Edy Quote  Post ReplyReply bullet Posted: 28-May-2008 at 06:46
If you've installed K-Lite Codec Pack Deejaysystem Edition in Performance mode then the audio normalizer is enabled by default. You can change the settings of the normalizer here:

Start > All Programs > K-Lite Codec Pack > Configuration > ffdshow > Audio Decoder Configuration

You may try finding a good combination for all your tracks by changing the Normalizer settings here. Maybe the fix is as simple as disabling it and let Deejaysystem's auto-gain to do the work alone.

Regards,

Edited by Edy - 28-May-2008 at 06:46
Edy / Deejaysystem Team
www.deejaysystem.com
Back to Top
PattayaPete View Drop Down
Newbie
Newbie


Joined: 24-Feb-2008
Online Status: Offline
Posts: 6
  Quote PattayaPete Quote  Post ReplyReply bullet Posted: 06-Jun-2008 at 05:40
Edy
I have played with those settings and have a fairly good mix now.  I managed to get the PCM audio stuff to behave but I still have a problem with DTS tracks.  Obviously getting the perfect balance is difficult.
 
If I could edit the database setting which controls where the AGC is set I'd be a happy man and all future issues could easily be dealt with.  I read somewhere on this site that you want to implement this as a feature in the future.  That would be great.
 
For now though it must be possible to edit this setting at a low level.  Can you give some detail about where it is in the db records for each song and what format it is stored in.  For example if I want to lower the setting for Song X by 3db, what field would i need to change on how would the data change.
 
This info would make deejaysytems a perfect product IMHO.
 
Cheers
 
Pete
Back to Top
Edy View Drop Down
Development Team
Development Team
Avatar

Joined: 05-Aug-2004
Location: Spain
Online Status: Offline
Posts: 961
  Quote Edy Quote  Post ReplyReply bullet Posted: 21-Jun-2008 at 05:55
Hello,

The database is just a file with consecutive records (array) of 1Kb each. Here is the structure of each record:

struct SDB_SSongRecord
       {
       SDB_SIndexRecord Idx;                // Estructura índice

       CHAR    szFileName[SDB_MAXPATH];     // Nombre del fichero (sólo nombre + extensión)
       CHAR    szLastPath[SDB_MAXPATH];     // Última localización conocida del fichero
       CHAR    szDiskLabel[SDB_MAXLABEL];   // Última localización: etiqueta del disco

       CHAR    szArtist[SDB_MAXCAPTION];    // Artista
       CHAR    szTitle[SDB_MAXCAPTION];     // Título
       CHAR    szComment[SDB_MAXCOMMENT];   // Comentario

       DWORD   dwRuntimeFlags;              // Flags utilizados runtime (ej. filtered etc). Se reinicia a 0 al leer de la BD.

       DWORD   dwFileSize;                  // Tamaño del fichero
       DWORD   dwDuration;                  // Duración (ms)
       DWORD   dwTimesPlayed;               // Veces que se ha reproducido
       DWORD   dwLastPlayedTime;            // Fecha de última reproducción
       DWORD   dwLastWriteTime;             // Fecha de escritura en la base de datos

       DWORD   dwCuePositionsCount;         // Número de posiciones CUE
       DWORD   adwCuePositions[10];         // Posiciones CUE

       DWORD   dwPeakMethodId;              // Método usado para determinar el nivel de pico (mayor = mejor)
       DWORD   dwMaxPeakLevel;              // Nivel de pico de la canción (unidades DS, 10000 = 0dB)
       float   fPeakReliability;            // Fiabilidad del nivel (0 - 1)

       float   fAverageBPM;                 // Promedio de BPM

       // --- Hasta aquí son 956 bytes

       BYTE    Reserved[68];

       // --- Hasta aquí son 1024 bytes
       };


The SDB_SIndexRecord struct is as follows (64 bytes):

struct SDB_SIndexRecord
       {
       DWORD   dwSignature;                 // Firma de comienzo de registro
       DWORD   dwDBIndex;                   // Indice de registro en la BD (único)
       DWORD64 dwHash;                      // HASH del nombre del fichero (asumimos único)
       DWORD64 dwFileNameStringCode;        // Nombre de fichero codificado

       DWORD64 dwArtistStringCode;          // Artista codificado (si hay, si no cero)
       DWORD64 dwTitleStringCode;           // Título codificado (si hay, si no cero)
       DWORD64 dwCommentStringCode;         // Comentario codificado (si hay, si no cero)

       DWORD64 dwCategoryID;                // RESERVADO (uso futuro) - debe ser cero
       DWORD   dwYear;                      // Año (si hay, si no cero)
       DWORD   dwReserved;

       // --- Hasta aquí son 64 bytes
       };


The limits are:

#define SDB_MAXPATH           260
#define SDB_MAXCAPTION        64
#define SDB_MAXLABEL          32
#define SDB_MAXCOMMENT        128


You need to touch the fields dwMaxPeakLevel and fPeakReliability. As the auto-gain level is originally designed for amplification only, then dwMaxPeakLevel is the maximum peak volume reached in the song file. If it's too low, Deejaysystem would try to raise the volume in order to keep it at 0dB.

fPeakReliability means how "reliable" is the value. As the max peak level is calculated as the song is played, then the more song is played the more reliable the value is. For your purpose, it's enough to keep this value to 1.

For converting between a dwMaxPeakLevel value and decibels you can use the following macros:

#define DB2LEVEL(dB)       ((pow(10.0, (dB)/20.0))*10000)
#define LEVEL2DB(level)    (20.0*log10((level)/10000.0))


So if you want Deejaysystem to lower the volume of a certain song, you should set the peak level for that song at a level > 0 dB. Example for lowering 3 dB in a song:

dwMaxPeakLevel = DB2LEVEL(3);
fPeakReliability = 1.0;


Hope all this to be useful to you.
Regards,
Edy / Deejaysystem Team
www.deejaysystem.com
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down