AeKeymap.c++ 2.15 KB
/*****************************************************************************
 *  File:  AEKeymap.c++ 
 *
 *  AEKeymap Class Implementations
 *
 ****************************************************************************/
#include <assert.h>

#include "AeAsset.h"


AeKeymap::AeKeymap(const char * name,
		   int velMin, int velMax,
		   int keyMin, int keyMax, int keyBase,
		   int detune) : AeAsset (name, kKeymapType);
{
    fVelocityMin = velMin;
    fVelocityMax = velMax;
    fKeyMin = keyMin;
    fKeyMax = keyMax;
    fKeyBase = keyBase;
    fDetune = detune;
}


AeKeymap::~AeKeymap(void)
{
}


void
AeKeymap::SetVelMinProc(AeAsset * asset, int vel)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetVelMin (vel);
}

void
AeKeymap::SetVelMaxProc(AeAsset * asset, int vel)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetVelMin (vel);
}

void
AeKeymap::SetKeyMinProc(AeAsset * asset, int key)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetKeyMin (key);
}

void
AeKeymap::SetKeyMaxProc(AeAsset * asset, int key)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetKeyMax (key);
}

void
AeKeymap::SetKeyBaseProc(AeAsset * asset, int key)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetKeyBase (key);
}

void
AeKeymap::SetDetuneProc(AeAsset * asset, int detune)
{
    assert (asset != NULL);
    ((AeKeymapAsset *)asset)->SetDetune (detune);
}

int
AeKeymap::GetVelMinProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetVelMin ();
}

int
AeKeymap::GetVelMaxProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetVelMax ();
}

int
AeKeymap::GetKeyMinProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetKeyMin ();
}

int
AeKeymap::GetKeyMaxProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetKeyMin ();
}

int
AeKeymap::GetKeyBaseProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetKeyMax ();
}

int
AeKeymap::GetDetuneProc(AeAsset * asset)
{
    assert (asset != NULL);
    return ((AeKeymapAsset *)asset)->GetDetune ();
}