Examples of ShortMessage


Examples of javax.sound.midi.ShortMessage

     * TODO ���̉��܂ŗ]�T����������L�΂��āA����������؂�H(������)
     */
    public MfiEvent[] getMfiEvents(MidiEvent midiEvent, MfiContext context)
        throws InvalidMfiDataException {

        ShortMessage shortMessage = (ShortMessage) midiEvent.getMessage();
        int channel = shortMessage.getChannel();
        int command = shortMessage.getCommand();
        int data1 = shortMessage.getData1();
        int data2 = shortMessage.getData2();
//Debug.println(midiEvent.getTick() + ", " + channel + ", " + command + ", " + (context.retrievePitch(channel, data1) + 45) + ", " + (data2 / 2));

        if (command == ShortMessage.NOTE_OFF ||
            // note on �� velocity 0 �̏ꍇ
            (command == ShortMessage.NOTE_ON && data2 == 0)) {
View Full Code Here

Examples of javax.sound.midi.ShortMessage

        throws InvalidMidiDataException {

        int midiChannel = context.retrieveChannel(this.channel);

        MidiEvent[] events = new MidiEvent[1];
        ShortMessage shortMessage = new ShortMessage();
        shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                midiChannel,
                        1// ���W�����[�V�����E�f�v�X MSB
                        modulation);
        events[0] = new MidiEvent(shortMessage, context.getCurrentTick());
        return events;
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    /** */
    public SmafEvent[] getSmafEvents(MidiEvent midiEvent, SmafContext context)
        throws InvalidSmafDataException {

        ShortMessage shortMessage = (ShortMessage) midiEvent.getMessage();
        int channel = shortMessage.getChannel();
        int data2 = shortMessage.getData2();

        int track = context.retrieveSmafTrack(channel);
        int voice = context.retrieveVoice(channel);

        ModulationMessage smafMessage = new ModulationMessage();
View Full Code Here

Examples of javax.sound.midi.ShortMessage

        throws InvalidMidiDataException {

        int midiChannel = context.retrieveChannel(this.channel);

        MidiEvent[] events = new MidiEvent[1];
        ShortMessage shortMessage = new ShortMessage();
        shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                midiChannel,
                                10// �p���|�b�g MSB
                                panpot);
        events[0] = new MidiEvent(shortMessage, context.getCurrentTick());
        return events;
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    /** */
    public SmafEvent[] getSmafEvents(MidiEvent midiEvent, SmafContext context)
        throws InvalidSmafDataException {

        ShortMessage shortMessage = (ShortMessage) midiEvent.getMessage();
        int channel = shortMessage.getChannel();
        int data2 = shortMessage.getData2();

        int track = context.retrieveSmafTrack(channel);
        int voice = context.retrieveVoice(channel);

        PanMessage smafMessage = new PanMessage();
View Full Code Here

Examples of javax.sound.midi.ShortMessage

            } else {
                int midiChannel = context.retrieveChannel(this.channel);
   
                MidiEvent[] events = new MidiEvent[2];
   
                ShortMessage shortMessage = new ShortMessage();
                shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                        midiChannel,
                                        0x00,       // �o���N�Z���N�g MSB
                                        data2);
                events[0] = new MidiEvent(shortMessage, context.getCurrentTick());
   
                shortMessage = new ShortMessage();
                shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                        midiChannel,
                                        0x20,       // �o���N�Z���N�g LSB
                                        bank & 0x7f);
                events[1] = new MidiEvent(shortMessage, context.getCurrentTick());
   
                return events;
            }
        } else {                                // MobileStandard
            int midiChannel = context.retrieveChannel(this.channel);

Debug.println("BankSelect(" + significant + "): [" + duration + "] " + midiChannel + "ch, " + bank);
            ShortMessage shortMessage = new ShortMessage();
            shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                    midiChannel,
                                    significant.data1,  // �o���N�Z���N�g MSB or LSB
                                    bank);
            return new MidiEvent[] {
                new MidiEvent(shortMessage, context.getCurrentTick())
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    /** TODO */
    public SmafEvent[] getSmafEvents(MidiEvent midiEvent, SmafContext context)
        throws InvalidSmafDataException {

        ShortMessage shortMessage = (ShortMessage) midiEvent.getMessage();
        int channel = shortMessage.getChannel();
        int data1 = shortMessage.getData1();

        int track = context.retrieveSmafTrack(channel);

        BankSelectMessage changeBankMessage = new BankSelectMessage();
        changeBankMessage.setDuration(context.getDuration());
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    public MidiEvent[] getMidiEvents(MidiContext context)
        throws InvalidMidiDataException {

        int midiChannel = context.retrieveChannel(this.channel);

        ShortMessage shortMessage = new ShortMessage();
        shortMessage.setMessage(ShortMessage.PITCH_BEND,
                                midiChannel,
                                pitchBend & 0x7f,   // LSB
                                pitchBend >> 7);    // MSB
        return new MidiEvent[] {
            new MidiEvent(shortMessage, context.getCurrentTick())
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    /** */
    public SmafEvent[] getSmafEvents(MidiEvent midiEvent, SmafContext context)
        throws InvalidSmafDataException {

        ShortMessage shortMessage = (ShortMessage) midiEvent.getMessage();
        int channel = shortMessage.getChannel();
        int data2 = shortMessage.getData2();

        int track = context.retrieveSmafTrack(channel);
        int voice = context.retrieveVoice(channel);

        PitchBendMessage smafMessage = new PitchBendMessage();
View Full Code Here

Examples of javax.sound.midi.ShortMessage

    /** */
    public MidiEvent[] getMidiEvents(MidiContext context) throws InvalidMidiDataException {
        int midiChannel = context.retrieveChannel(this.channel);

        MidiEvent[] events = new MidiEvent[1];
        ShortMessage shortMessage = new ShortMessage();
//Debug.println("(" + StringUtil.toHex2(command) + "): " + channel + "ch, " + StringUtil.toHex2(value));
        shortMessage.setMessage(ShortMessage.CONTROL_CHANGE,
                                midiChannel,
                                command,
                                value);
        events[0] = new MidiEvent(shortMessage, context.getCurrentTick());
        return events;
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.