JUCE MidiMessage MidiMessage::quarterFrame

static MidiMessage MidiMessage::quarterFrame (int sequenceNumber, int value )

How to calculate the value parameter used in the above method:
 

int convert(int mt, int value, int fps) 

    int retVal = 0; 

    (mt % 2) ? retVal = value >> 4 : retVal = value; 
    (mt == 7 && fps == 25) ? retVal |= 2 : retVal; 
    (mt == 7 && fps == 29) ? retVal |= 4 : retVal; 
    (mt == 7 && fps == 30) ? retVal |= 6 : retVal; 

    return retVal & 0x0f; 

}

Midi Time Code, MTC, JUCE, Midi

Leave a comment

    Add comment