Package vavi.sound.smaf

Examples of vavi.sound.smaf.SmafMessage


     *  
     * </pre>
     */
    private void readHandyPhoneStandard(InputStream is) throws InvalidSmafDataException, IOException {

        SmafMessage smafMessage = null;

        while (available() > 0) {
            // -------- event --------
            int e1 = read(is);
            if (e1 == 0xff) { // exclusive
View Full Code Here


    }

    /** formatType 1, 2 */
    private void readMobileStandard(InputStream is) throws InvalidSmafDataException, IOException {

        SmafMessage smafMessage = null;

        while (available() > 0) {
            // event
            int status = read(is);
            if (status == 0xf0) { // exclusive
View Full Code Here

        dos.writeBytes(getType());
        dos.writeInt(getDataLength());
Debug.println("track: " + trackNumber + ": " + getDataLength());
        for (int j = 0; j < track.size(); j++) {
            SmafEvent event = track.get(j);
            SmafMessage message = event.getMessage();
            if (!SmafFileFormat.isIgnored(message)) {
                byte[] data = message.getMessage();
                dos.write(data, 0, data.length);
            }
        }
    }
View Full Code Here

    public int getDataLength() {
        int trackLength = 0;

        for (int j = 0; j < track.size(); j++) {
            SmafEvent event = track.get(j);
            SmafMessage message = event.getMessage();
            if (!SmafFileFormat.isIgnored(message)) {
                trackLength += message.getLength();
            }
        }

        return trackLength;
    }
View Full Code Here

    /** formatType 0 */
    protected void readHandyPhoneStandard(InputStream is)
        throws InvalidSmafDataException, IOException {

        SmafMessage smafMessage = null;

        while (available() > 0) {
            // -------- duration --------
            int duration = readOneToTwo(is);
//Debug.println("duration: " + duration + ", 0x" + StringUtil.toHex4(duration));
View Full Code Here

    /** formatType 1, 2 */
    private void readMobileStandard(InputStream is)
        throws InvalidSmafDataException, IOException {

        SmafMessage smafMessage = null;

        while (available() > 0) {
            // duration
            int duration = readOneToFour(is);
//Debug.println("duration: " + duration);
View Full Code Here

        metaMessage.setMessage(MidiConstants.META_MACHINE_DEPEND, props);
        events.add(new SmafEvent(metaMessage, 0l));

        //
        for (Chunk waveDataChunk : waveDataChunks) {
            SmafMessage smafMessage = ((WaveDataChunk) waveDataChunk).toSmafMessage(waveType);
            events.add(new SmafEvent(smafMessage, 0l));
        }

        //
        List<SmafMessage> messages = ((SequenceDataChunk) sequenceDataChunk).getSmafMessages();
View Full Code Here

     * @see #setDrum(int, vavi.sound.smaf.message.MidiContext.ChannelConfiguration)
     */
    public void setTrack(Track smafTrack) {
        for (int j = 0; j < smafTrack.size(); j++) {
            SmafEvent event = smafTrack.get(j);
            SmafMessage message = event.getMessage();
            if (message instanceof vavi.sound.smaf.MetaMessage) {
                vavi.sound.smaf.MetaMessage metaMessage = (vavi.sound.smaf.MetaMessage) message;
                if (metaMessage.getType() == MidiConstants.META_MACHINE_DEPEND) {
                    //
                    this.formatType = (FormatType) metaMessage.getData().get("formatType"); // [ms]
View Full Code Here

int t = 0;
        for (Track track : smafTracks) {
            for (int i = 0; i < track.size(); i++) {
                SmafEvent event = track.get(i);
                SmafMessage message = event.getMessage();
                if (message instanceof vavi.sound.smaf.MetaMessage) {
                    vavi.sound.smaf.MetaMessage metaMessage = (vavi.sound.smaf.MetaMessage) message;
                    if (metaMessage.getType() == MidiConstants.META_MACHINE_DEPEND) {
                        this.timeBase = (Integer) metaMessage.getData().get("durationTimeBase"); // [ms]
Debug.println("timebase: " + timeBase + ", (" + t + ":" + i + ")");
View Full Code Here

    /** formatType 0 */
    protected void readHandyPhoneStandard(InputStream is)
        throws InvalidSmafDataException, IOException {

        SmafMessage smafMessage = null;

        while (available() > 0) {
            // -------- duration --------
            int duration = readOneToTwo(is);
//Debug.println("duration: " + duration + ", 0x" + StringUtil.toHex4(duration));
View Full Code Here

TOP

Related Classes of vavi.sound.smaf.SmafMessage

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.