bpmmerge.cpp File Reference

#include <stdlib.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <qdialog.h>
#include <ctype.h>
#include "index.h"
#include "unistd.h"
#include "common.h"
#include "memory.h"
#include "scripts.h"
#include "version.h"
#include "player-config.h"
#include "histogram-property.h"
#include "smallhistogram-type.h"
#include "signals.h"
Include dependency graph for bpmmerge.cpp:

Defines

#define BUFSIZE   32*1024
#define COLLAPSE   4

Typedefs

typedef signed char compressed

Functions

void options_failure (const char *err)
void openlog ()
void log_entry (unsigned8 position, const char *type, const char *text, const char *text2=NULL)
void closeLog ()
void cut_at (signed8 position, char *target)
char * split_raw (int nr, signed8 lastpos)
void split_raw ()
void process_options (int argc, char *argv[])
void normalize_file ()
bool createFiles (char *a, char *b)
void readTail (signed8 measures)
void readHead (signed8 percent, signed8 measures)
void copySong (signed8 percent)
void stretchHead (signed8 headmeasures)
void collapseBuffers ()
void collapseStretchedBuffer ()
signed8 phaseFit (int period, compressed *buffer, int length)
signed8 rescanTempo (signed8 hi, signed8 lo, compressed *buffer, int length)
void rescanTempo ()
unsigned4 findMatchWithVolumeAccounting ()
unsigned4 findMatchWithoutVolumeAccounting ()
unsigned4 findMatch ()
stereo_sample2 mix (stereo_sample2 a, stereo_sample2 b, signed8 vol, signed8 tot)
void volumefade (signed8 pos)
void tempocopy (unsigned4 target_period)
void tempofade (int time)
void closeFiles ()
int main (int argc, char *argv[])

Variables

PlayerConfigconfig

Define Documentation

#define BUFSIZE   32*1024

Referenced by normalize_file().

#define COLLAPSE   4

Typedef Documentation

typedef signed char compressed

Function Documentation

void closeFiles (  ) 

References fclose(), and getRawFilename().

Referenced by main().

void closeLog (  ) 

References fclose().

Referenced by main().

void collapseBuffers (  ) 

References bpmdj_allocate, and COLLAPSE.

Referenced by main().

void collapseStretchedBuffer (  ) 

References bpmdj_allocate, and COLLAPSE.

Referenced by main().

void copySong ( signed8  percent  ) 
bool createFiles ( char *  a,
char *  b 
)
void cut_at ( signed8  position,
char *  target 
)
unsigned4 findMatch (  ) 
unsigned4 findMatchWithoutVolumeAccounting (  ) 

References COLLAPSE.

Referenced by findMatch().

unsigned4 findMatchWithVolumeAccounting (  ) 

References COLLAPSE, and y.

Referenced by findMatch().

void log_entry ( unsigned8  position,
const char *  type,
const char *  text,
const char *  text2 = NULL 
)

Referenced by copySong(), tempofade(), and volumefade().

int main ( int  argc,
char *  argv[] 
)

Two separate behaviors are offered by this program

  • the first is to merge 2 songs together
  • the second is to split one large song in separate pieces

References assert(), closeFiles(), closeLog(), collapseBuffers(), collapseStretchedBuffer(), copySong(), createFiles(), findMatch(), openlog(), process_options(), readHead(), readTail(), rescanTempo(), split_raw(), stretchHead(), tempofade(), and volumefade().

stereo_sample2 mix ( stereo_sample2  a,
stereo_sample2  b,
signed8  vol,
signed8  tot 
)

References stereo_sample2::left, and stereo_sample2::right.

Referenced by volumefade().

void normalize_file (  ) 
void openlog (  ) 

References assert().

Referenced by main().

void options_failure ( const char *  err  ) 

References VERSION.

Referenced by process_options().

signed8 phaseFit ( int  period,
compressed buffer,
int  length 
)

References assert().

Referenced by rescanTempo().

void process_options ( int  argc,
char *  argv[] 
)

Referenced by main().

void readHead ( signed8  percent,
signed8  measures 
)

References bpmdj_allocate, fsize(), and readsamples().

Referenced by main().

void readTail ( signed8  measures  ) 

References bpmdj_allocate, fsize(), and readsamples().

Referenced by main().

void rescanTempo (  ) 

References rescanTempo(), and T.

signed8 rescanTempo ( signed8  hi,
signed8  lo,
compressed buffer,
int  length 
)

References minimum(), and phaseFit().

Referenced by main(), and rescanTempo().

void split_raw (  ) 

References split_raw().

char* split_raw ( int  nr,
signed8  lastpos 
)

References assert(), cut_at(), RAW_EXT, sprintf(), and T.

Referenced by main(), and split_raw().

void stretchHead ( signed8  headmeasures  ) 

References bpmdj_allocate, and i.

Referenced by main().

void tempocopy ( unsigned4  target_period  ) 
void tempofade ( int  time  ) 

References assert(), log_entry(), and tempocopy().

Referenced by main().

void volumefade ( signed8  pos  ) 

References assert(), log_entry(), mix(), start(), writesamples(), and x.

Referenced by main().


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2