Package vavi.sound.mfi

Examples of vavi.sound.mfi.MfiEvent


        mfiMessage.setVolume(shortMessage.getData2() / 2);

        context.setPreviousTick(track, midiEvent.getTick());

        return new MfiEvent[] {
            new MfiEvent(mfiMessage, midiEvent.getTick())
        };
    }
View Full Code Here


            midiContext.setCurrent(0);

            Track mfiTrack = mfiTracks[i];
           
            for (int j = 0; j < mfiTrack.size(); j++) {
                MfiEvent mfiEvent = mfiTrack.get(j);
                MfiMessage mfiMessage = mfiEvent.getMessage();
               
                midiContext.addCurrent(mfiMessage.getDelta());
               
                if (mfiMessage instanceof MidiConvertible) {
//Debug.println("midi convertible: " + message);
View Full Code Here

        }
    }

    /** thread local sequence */
    private static MfiEvent getStreamOn(int streamNumber, int velocity) throws InvalidMfiDataException {
        MfiEvent event = NecMessage.getStreamOnEvent(sequence.get() % 2, streamNumber, velocity);
        sequence.set(sequence.get() + 1);
        return event;
    }
View Full Code Here

                events.add(NecMessage.getStreamOnEvent(R, streamNumber++, velocity));
            }
            // nop2
            for (int j = 0; j < blockDelta / Nop2Message.maxDelta; j++) {
                Nop2Message nop2 = new Nop2Message(0xff, 0xff);
                events.add(new MfiEvent(nop2, 0l));
            }
            int moduloOfBlockDelta = blockDelta % Nop2Message.maxDelta;
            Nop2Message nop2 = new Nop2Message(moduloOfBlockDelta % 0x100, moduloOfBlockDelta / 0x100);
            events.add(new MfiEvent(nop2, 0l));
        }
        if (moduloOfChunks != 0) {
            if (channels == 1) {
                // adpcm on
                events.add(getStreamOn(streamNumber++, velocity));
            } else {
                // adpcm on L
                events.add(NecMessage.getStreamOnEvent(L, streamNumber++, velocity));
                // adpcm on R
                events.add(NecMessage.getStreamOnEvent(R, streamNumber++, velocity));
            }
            // nop2
            int moduloOfDelta = delta % blockDelta;
            for (int j = 0; j < moduloOfDelta / Nop2Message.maxDelta; j++) {
                Nop2Message nop2 = new Nop2Message(0xff, 0xff);
                events.add(new MfiEvent(nop2, 0l));
            }
            int moduloOfBlockDelta = moduloOfDelta % Nop2Message.maxDelta;
            Nop2Message nop2 = new Nop2Message(moduloOfBlockDelta % 0x100, moduloOfBlockDelta / 0x100);
            events.add(new MfiEvent(nop2, 0l));
        }

        return events;
    }
View Full Code Here

        function.setMono(channels == 1 ? true : false);
        function.setFormat(1);
        function.setSamplingRate(sampleRate);
        function.setAdpcm(adpcm);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

    public static MfiEvent getMaxGainEvent(int maxGain) throws InvalidMfiDataException {
        MachineDependMessage message = new NecMessage();
        Function1_243_3 function = new Function1_243_3();
        function.setMaxGain(maxGain);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

    public static MfiEvent getSettingEvent(int maxStreamNumber) throws InvalidMfiDataException {
        MachineDependMessage message = new NecMessage();
        Function1_243_4 function = new Function1_243_4();
        function.setMaxStreamNumber(maxStreamNumber);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

        Function1_241_3 function = new Function1_241_3();
        function.setChannel(channel);
        function.setStreamNumber(streamNumber);
        function.setVelocity(velocity);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

        Function1_241_4 function = new Function1_241_4();
        function.setChannel(channel);
        function.setStreamNumber(streamNumber);
        function.setVelocity(velocity);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

    public static MfiEvent getVolumeEvent(int volume) throws InvalidMfiDataException {
        MachineDependMessage message = new NecMessage();
        Function242_1 function = new Function242_1();
        function.setVolume(volume);
        message.setMessage(0x00, function.getMessage());
        return new MfiEvent(message, 0l);
    }
View Full Code Here

TOP

Related Classes of vavi.sound.mfi.MfiEvent

Copyright © 2018 www.massapicom. 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.