KbMain Class Reference

[kooBase Index] [kooBase Hierarchy] [Headers]


The kooBase main class More...

#include <kbMain.h>

Inherits: KbId

Public Members


Detailed Description

This is the main kooBase class. main() will create exactly one object of this class and a factory for the presentation as a parameter. If you want to change the presentation, change the factory in the file main.C.

See Also: IfMain, QtMain, TxMain


KbMain( IfFactory * fac, int argc, char ** argv ) [public]

Constructor. fac refers to the factory interface. The kb... classes do not own presentations of their contents, especially no graphical presentations! The presentations will be attached via this interface. E.g. QtFactory is derived from IfFactory and creates the QtMain-object, QtTrack-objects , QtPart-objects, etc.

Parameters:
argv command line arguments.
fac the factory that creates the presentation specific objects.
argc command line arguments.

void adjustRightBorder() [public]

adjust right border

KbTrack * gTrack(int n=0) [public]

returns the (n+1)īth track. This might be zero! Further tracks are connected to the first track via next-chain.

void sTrack(KbTrack * t) [public]

sets the first track. This is for internal use, e.g. when the first track gets deleted!

KbTrack * addTrack() [public]

This adds a track to the track-chain.

Returns:
a pointer to the new track.

char * gDevice(int i) [public]

Parameters:
i the device number.
Returns:
the name of the device descibed by the device number i.
See Also:
KbMain::findDevices

int gSnap() [public]

Returns:
the current snap-value, which holds the midi-ticks used for quantization and other truncation.
See Also:
sSnap

int gTempo() [public]

Returns:
the current tempo value, midi data is played and recorded.
See Also:
sTempo

int gMeter(int i) [public]

This returns the current meter.

Parameters:
i call with i=0 to obtain the numerator, and with i=1 to obtain the nominator
Returns:
the numerator, nominator resp.
See Also:
sMeter

void sSnap(int s) [public]

This sets the snap value, which holds the midi-ticks used for quantization and other truncation.

Parameters:
s the snap value.
See Also:
gSnap

void sTempo(int t) [public]

This sets the tempo value.

Parameters:
t the tempo
See Also:
gTempo

void sMeter(int i,int m) [public]

This sets the meter.

Parameters:
i call with i=0 to set the nominator to m, call with i=1 to set the numerator to m.
m the nominator, numerator resp.

int gPos() [public]

returns the time position (in ticks)

int gLeftSel() [public]

returns the left locator (in ticks)

int gRightSel() [public]

returns the right locator (in ticks)

int gLeftBar() [public]

returns the left locator (in bars)

int gRightBar() [public]

returns the right locator (in bars)

void sLeftSel(int p=-1) [public]

sets the left locator

void sRightSel(int p=-1) [public]

sets the right locator

void togCycle() [public]

toggles the cycle flag

void sPos(int p, int b=-1, int t=-1) [public]

sets the position either call with one parameter describing the position in ticks or call with bar, beat and ticks

int gPosOf(int p, int b, int t) [public]

same as sPos(int p, int b=-1, int t=-1), but returns and does not set the position!

bool gPlayWait() [public]

returns the playWait variable, which is TRUE, if the playroutine shall wait for an acoustic signal before playing

void BBT(int pos, int t0=0, int t0=0) [public]

does not set the position, and meter. calculates (updates) bar, beat and tick values from position.

Parameters:
pos the position
t0 meter numerator
t1 meter nominator

int gBar(int pos=-1, int t0=0, int t1=0) [public]

returns the bar value.

Parameters:
pos if not -1: runs BBT(pos) first

int gBeat(int pos=-1, int t0=0, int t1=0) [public]

returns the beat valuee.

Parameters:
pos if not -1: runs BBT(pos) first

int gTick(int pos=-1, int t0=0, int t1=0) [public]

returns the beat valuee.

Parameters:
pos if not -1: runs BBT(pos) first

void play(int tracki=-1, int off=0, int delt=0) [public]

plays a song

Parameters:
delt the number of midi ticks that are to be played
off the offset (in midi ticks)
tracki the track number to be played

void stopAll() [public]

stops playing


  • Author: Jan Wuerthner
  • Version: 0.95
  • Documentation generated by wuerthne@clouseau on Sat Feb 20 16:41:13 MST 1999
Kdoc