Exemple #1
0
//---------------------------------------------------------
void CrolPlayer::SetPitch(int const voice, float const variation)
{
    if ((voice < kBassDrumChannel) || mpROLHeader->mode)
    {
        uint16_t const pitchBend = (variation == 1.0f) ? skMidPitch : static_cast<uint16_t>((0x3fff >> 1) * variation);

        ChangePitch(voice, pitchBend);
        SetFreq(voice, mNoteCache[voice], mKeyOnCache[voice]);
    }
Exemple #2
0
void Camera::Move2D(int x, int y) {
    //compute the mouse delta from the previous mouse position
    glm::vec3 mouse_delta = glm::vec3(x, y, 0) * 3.0F;
    //if the camera is moving, meaning that the mouse was clicked and dragged, change the pitch and heading
    if (move_camera) {
        ChangeHeading(.08f * mouse_delta.x);
        ChangePitch(.08f * mouse_delta.y);
    }
    //mouse_position = glm::vec3(x, y, 0);
}