AEKeymap.c++ 1.66 KB
/*****************************************************************************
 *  File:  AEKeymap.c++ 
 *
 *  AEKeymap Class Implementations
 *
 ****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

#include "Assets.h"
#include "Mgrs.h"

/*****************************************************************************
 *
 *   Initialization Routines
 * 
 ****************************************************************************/

AEKeymap::AEKeymap()
{
    classType = AL_KEYMAP_CLASS;
    velocityMin = 0;
    velocityMax = 127;
    keyMin = 0;
    keyMax = 127;
    keyBase = 60; // middle C
    detune = 0;
    
    assert(theU64Dev->AllocHdwr(this,AL_KEYMAP_CLASS) == 0);
}

AEKeymap::~AEKeymap()
{
  theU64Dev->DeallocHdwr(this);
}

/*****************************************************************************
 *
 *    Asset's Methods
 *
 ****************************************************************************/

void AEKeymap::SetVelMin(int vel)
{
    velocityMin = vel;
}

void AEKeymap::SetVelMax(int vel)
{
    velocityMax = vel;
}

void AEKeymap::SetKeyMin(int key)
{
    keyMin = key;
}

void AEKeymap::SetKeyMax(int key)
{
    keyMax = key;
}

void AEKeymap::SetKeyBase(int key)
{
    keyBase = key;
}

void AEKeymap::SetDetune(int d)
{
    detune = d;
}

int AEKeymap::GetVelMin(void)
{
    return velocityMin;
}

int AEKeymap::GetVelMax(void)
{
    return velocityMax;
}

int AEKeymap::GetKeyMin(void)
{
    return keyMin;
}

int AEKeymap::GetKeyMax(void)
{
    return keyMax;
}

int AEKeymap::GetKeyBase(void)
{
    return keyBase;
}

int AEKeymap::GetDetune(void)
{
    return detune;
}