LMMS
Loading...
Searching...
No Matches
woodyopl.cpp File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "woodyopl.h"

Macros

#define CHANVAL_OUT

Typedefs

typedef void(* optype_fptr) (op_type *)

Functions

void operator_advance (op_type *op_pt, Bit32s vib)
void operator_advance_drums (op_type *op_pt1, Bit32s vib1, op_type *op_pt2, Bit32s vib2, op_type *op_pt3, Bit32s vib3)
void operator_output (op_type *op_pt, Bit32s modulator, Bit32s trem)
void operator_off (op_type *)
void operator_sustain (op_type *op_pt)
void operator_release (op_type *op_pt)
void operator_decay (op_type *op_pt)
void operator_attack (op_type *op_pt)
void disable_operator (op_type *op_pt, Bit32u act_type)
static void OPL_INLINE clipit16 (Bit32s ival, Bit16s *outval)
static void OPL_INLINE clipit8 (Bit32s ival, Bit8s *outval)

Variables

static fltype recipsamp
static Bit16s wavtable [WAVEPREC *3]
static Bit32s vib_table [VIBTAB_SIZE]
static Bit32s trem_table [TREMTAB_SIZE *2]
static Bit32s vibval_const [BLOCKBUF_SIZE]
static Bit32s tremval_const [BLOCKBUF_SIZE]
static Bit32s vibval_var1 [BLOCKBUF_SIZE]
static Bit32s vibval_var2 [BLOCKBUF_SIZE]
static Bit32svibval1
static Bit32svibval2
static Bit32svibval3
static Bit32svibval4
static Bit32stremval1
static Bit32stremval2
static Bit32stremval3
static Bit32stremval4
static const fltype kslmul [4]
static const fltype frqmul_tab [16]
static fltype frqmul [16]
static Bit8u kslev [8][16]
static const Bit8u modulatorbase [9]
static const Bit8u regbase2modop [44]
static const Bit8u regbase2op [44]
static Bit32u waveform [8]
static Bit32u wavemask [8]
static Bit32u wavestart [8]
static fltype attackconst [4]
static fltype decrelconst [4]
optype_fptr opfuncs [6]

Macro Definition Documentation

◆ CHANVAL_OUT

#define CHANVAL_OUT
Value:
if (adlibreg[0x105]&1) { \
outbufl[i] += chanval*cptr[0].left_pan; \
outbufr[i] += chanval*cptr[0].right_pan; \
} else { \
outbufl[i] += chanval; \
}
static unsigned char adlibreg[256]
Definition adlibemu.c:93
register unsigned i
Definition inflate.c:1575

Typedef Documentation

◆ optype_fptr

typedef void(* optype_fptr) (op_type *)

Function Documentation

◆ clipit16()

void OPL_INLINE clipit16 ( Bit32s ival,
Bit16s * outval )
static

◆ clipit8()

void OPL_INLINE clipit8 ( Bit32s ival,
Bit8s * outval )
static

◆ disable_operator()

void disable_operator ( op_type * op_pt,
Bit32u act_type )

◆ operator_advance()

void operator_advance ( op_type * op_pt,
Bit32s vib )

◆ operator_advance_drums()

void operator_advance_drums ( op_type * op_pt1,
Bit32s vib1,
op_type * op_pt2,
Bit32s vib2,
op_type * op_pt3,
Bit32s vib3 )

◆ operator_attack()

void operator_attack ( op_type * op_pt)

◆ operator_decay()

void operator_decay ( op_type * op_pt)

◆ operator_off()

void operator_off ( op_type * )

◆ operator_output()

void operator_output ( op_type * op_pt,
Bit32s modulator,
Bit32s trem )

◆ operator_release()

void operator_release ( op_type * op_pt)

◆ operator_sustain()

void operator_sustain ( op_type * op_pt)

Variable Documentation

◆ attackconst

fltype attackconst[4]
static
Initial value:
= {
(fltype)(1/2.82624),
(fltype)(1/2.25280),
(fltype)(1/1.88416),
(fltype)(1/1.59744)
}
#define fltype
Definition woodyopl.h:36

◆ decrelconst

fltype decrelconst[4]
static
Initial value:
= {
(fltype)(1/39.28064),
(fltype)(1/31.41608),
(fltype)(1/26.17344),
(fltype)(1/22.44608)
}

◆ frqmul

fltype frqmul[16]
static

◆ frqmul_tab

const fltype frqmul_tab[16]
static
Initial value:
= {
0.5,1,2,3,4,5,6,7,8,9,10,10,12,12,15,15
}

◆ kslev

Bit8u kslev[8][16]
static

◆ kslmul

const fltype kslmul[4]
static
Initial value:
= {
0.0, 0.5, 0.25, 1.0
}

◆ modulatorbase

const Bit8u modulatorbase[9]
static
Initial value:
= {
0,1,2,
8,9,10,
16,17,18
}

◆ opfuncs

optype_fptr opfuncs[6]
Initial value:
= {
}
void operator_decay(op_type *op_pt)
Definition woodyopl.cpp:254
void operator_sustain(op_type *op_pt)
Definition woodyopl.cpp:219
void operator_attack(op_type *op_pt)
Definition woodyopl.cpp:283
void operator_off(op_type *)
Definition woodyopl.cpp:214
void operator_release(op_type *op_pt)
Definition woodyopl.cpp:228

◆ recipsamp

fltype recipsamp
static

◆ regbase2modop

const Bit8u regbase2modop[44]
static
Initial value:
= {
0,1,2,0,1,2,0,0,3,4,5,3,4,5,0,0,6,7,8,6,7,8,
18,19,20,18,19,20,0,0,21,22,23,21,22,23,0,0,24,25,26,24,25,26
}

◆ regbase2op

const Bit8u regbase2op[44]
static
Initial value:
= {
0,1,2,9,10,11,0,0,3,4,5,12,13,14,0,0,6,7,8,15,16,17,
18,19,20,27,28,29,0,0,21,22,23,30,31,32,0,0,24,25,26,33,34,35
}

◆ trem_table

Bit32s trem_table[TREMTAB_SIZE *2]
static

◆ tremval1

Bit32s* tremval1
static

◆ tremval2

Bit32s * tremval2
static

◆ tremval3

Bit32s * tremval3
static

◆ tremval4

Bit32s * tremval4
static

◆ tremval_const

Bit32s tremval_const[BLOCKBUF_SIZE]
static

◆ vib_table

Bit32s vib_table[VIBTAB_SIZE]
static

◆ vibval1

Bit32s* vibval1
static

◆ vibval2

Bit32s * vibval2
static

◆ vibval3

Bit32s * vibval3
static

◆ vibval4

Bit32s * vibval4
static

◆ vibval_const

Bit32s vibval_const[BLOCKBUF_SIZE]
static

◆ vibval_var1

Bit32s vibval_var1[BLOCKBUF_SIZE]
static

◆ vibval_var2

Bit32s vibval_var2[BLOCKBUF_SIZE]
static

◆ waveform

Bit32u waveform[8]
static
Initial value:
= {
(WAVEPREC*3)>>2,
0,
0,
(WAVEPREC*5)>>2,
}
#define WAVEPREC
Definition woodyopl.h:76

◆ wavemask

Bit32u wavemask[8]
static
Initial value:
= {
(WAVEPREC>>1)-1,
(WAVEPREC>>1)-1,
((WAVEPREC*3)>>2)-1,
}

◆ wavestart

Bit32u wavestart[8]
static
Initial value:
= {
0,
0,
0,
0,
0,
}

◆ wavtable

Bit16s wavtable[WAVEPREC *3]
static