Examples of NoteMessage


Examples of vavi.sound.mfi.NoteMessage

            int onLength = (length + 254) / 255;
            MfiEvent[] mfiEvents = new MfiEvent[1/* onLength */];
            for (int i = 0; i < Math.max(onLength, 1); i++) {

                NoteMessage mfiMessage = new VaviNoteMessage();
                mfiMessage.setDelta(i == 0 ? delta : 0);
                mfiMessage.setVoice(voice);
                mfiMessage.setNote(context.retrievePitch(channel, data1));
                mfiMessage.setGateTime(i == onLength - 1 ? length % 255 : 255);
                mfiMessage.setVelocity(data2 / 2);
if (length >= 255) {
Debug.println(channel + "ch, " + mfiMessage.getNote() + ", " + mfiMessage.getDelta() + ":[" + i + "]:" + (i == onLength - 1 ? length % 255 : 255) + "/" + length);
}
//Debug.println(channel + ", " + mfiMessage.getVoice() + ", " + ((mfiMessage.getMessage()[1] & 0xc0) >> 6));
                mfiEvents[i] = new MfiEvent(mfiMessage, 0l); // TODO 0l
//if (mfiEvents[i] == null) {
// Debug.println("[" + i + "]: " + mfiEvents[i]);
View Full Code Here

Examples of vavi.sound.mfi.vavi.header.NoteMessage

     * Length of {@link vavi.sound.mfi.NoteMessage}
     * @return 0: 3 bytes, 1: 4bytes
     * @see NoteMessage
     */
    public int getNoteLength() {
        NoteMessage subChunk = (NoteMessage) headerChunk.getSubChunks().get(NoteMessage.TYPE);
        if (subChunk != null) {
            return subChunk.getNoteLength();
        } else {
Debug.println("no note info, use 0");
            return 0;
        }
    }
View Full Code Here

Examples of vavi.sound.mfi.vavi.header.NoteMessage

     * Length of {@link vavi.sound.mfi.NoteMessage}
     * @param noteLength 0: 3 bytes, 1: 4bytes
     * @see NoteMessage
     */
    public void setNoteLength(int noteLength) {
        NoteMessage subChunk = (NoteMessage) headerChunk.getSubChunks().get(NoteMessage.TYPE);
        if (subChunk != null) {
            subChunk.setNoteLength(noteLength);
        } else {
            headerChunk.getSubChunks().put(NoteMessage.TYPE, new NoteMessage(noteLength));
        }
    }
View Full Code Here

Examples of vavi.sound.smaf.message.NoteMessage

     * internal use
     * Mtsq �̏ꍇ
     * @param gateTime should not be 0
     */
    protected SmafMessage getHandyPhoneStandardMessage(int duration, int data, int gateTime) {
        return new NoteMessage(duration, data, gateTime);
    }
View Full Code Here

Examples of vavi.sound.smaf.message.NoteMessage

            int status = read(is);
            if (status >= 0x80 && status <= 0x8f) { // note w/o velocity
                int channel = status & 0x0f;
                int note = read(is);
                int gateTime = readOneToFour(is);
                smafMessage = new NoteMessage(duration, channel, note, gateTime);
            } else if (status >= 0x90 && status <= 0x9f) { // note w/ velocity
                int channel = status & 0x0f;
                int note = read(is);
                int velocity = read(is);
                int gateTime = readOneToFour(is);
                smafMessage = new NoteMessage(duration, channel, note, gateTime, velocity);
            } else if (status >= 0xa0 && status <= 0xaf) { // reserved
                int d1 = read(is);
                int d2 = read(is);
                smafMessage = null;
Debug.println("reserved: 0xa_: " + StringUtil.toHex2(d1) + StringUtil.toHex2(d2));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.