Beispiel #1
0
        /** Creates new TimeSignature from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        public static TimeSignature newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

              return new TimeSignature
            (riffInput.readSIGNEDBYTE(),
             riffInput.readSIGNEDBYTE(),
             RiffTags.newInstance(riffInput));
        }
Beispiel #2
0
        /** Creates new TimeSignature from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        static public TimeSignature newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

            return(new TimeSignature
                       (riffInput.readSIGNEDBYTE(),
                       riffInput.readSIGNEDBYTE(),
                       RiffTags.newInstance(riffInput)));
        }
Beispiel #3
0
        /** Creates new Notehead from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        public static Notehead newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

              return new Notehead
            (convertShape(riffInput.readBYTE()),
             riffInput.readSIGNEDBYTE(),
             new Rational(riffInput.readSHORT(), riffInput.readSHORT()),
             RiffTags.newInstance(riffInput));
        }
Beispiel #4
0
        /** Creates new Rest from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        static public Rest newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

            return(new Rest
                       (convertShape(riffInput.readBYTE()),
                       riffInput.readSIGNEDBYTE(),
                       new Rational(riffInput.readSHORT(), riffInput.readSHORT()),
                       RiffTags.newInstance(riffInput)));
        }
Beispiel #5
0
        /** Creates new Clef from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        public static Clef newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

              return new Clef
             (convertShape(riffInput.readBYTE()),
              riffInput.readSIGNEDBYTE(),
              convertOctaveNumber(riffInput.readBYTE()),
              RiffTags.newInstance(riffInput));
        }
Beispiel #6
0
        /** Creates new Clef from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        static public Clef newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

            return(new Clef
                       (convertShape(riffInput.readBYTE()),
                       riffInput.readSIGNEDBYTE(),
                       convertOctaveNumber(riffInput.readBYTE()),
                       RiffTags.newInstance(riffInput)));
        }
Beispiel #7
0
        /** Creates new NIFFInfo from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        static public NiffInfo newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff(parentInput, RIFF_ID);

            // Read 8 bytes and convert to string
            byte[] buffer = new byte[8];
            buffer[0] = (byte)riffInput.readBYTE();
            buffer[1] = (byte)riffInput.readBYTE();
            buffer[2] = (byte)riffInput.readBYTE();
            buffer[3] = (byte)riffInput.readBYTE();
            buffer[4] = (byte)riffInput.readBYTE();
            buffer[5] = (byte)riffInput.readBYTE();
            buffer[6] = (byte)riffInput.readBYTE();
            buffer[7] = (byte)riffInput.readBYTE();

            return(new NiffInfo
                       (Encoding.UTF8.GetString(buffer, 0, buffer.Length),
                       riffInput.readSIGNEDBYTE(),
                       riffInput.readSIGNEDBYTE(),
                       riffInput.readSHORT(),
                       riffInput.readSHORT()));
        }
Beispiel #8
0
        /** Creates new NIFFInfo from the parentInput's input stream.
         * The next object in the input stream must be of this type.
         *
         * @param parentInput    the parent RIFF object being used to read the input stream
         */
        public static NiffInfo newInstance(Riff parentInput)
        {
            Riff riffInput = new Riff (parentInput, RIFF_ID);

            // Read 8 bytes and convert to string
            byte[] buffer = new byte[8];
            buffer[0] = (byte)riffInput.readBYTE();
            buffer[1] = (byte)riffInput.readBYTE();
            buffer[2] = (byte)riffInput.readBYTE();
            buffer[3] = (byte)riffInput.readBYTE();
            buffer[4] = (byte)riffInput.readBYTE();
            buffer[5] = (byte)riffInput.readBYTE();
            buffer[6] = (byte)riffInput.readBYTE();
            buffer[7] = (byte)riffInput.readBYTE();

            return new NiffInfo
              (Encoding.UTF8.GetString(buffer, 0, buffer.Length),
               riffInput.readSIGNEDBYTE(),
               riffInput.readSIGNEDBYTE(),
               riffInput.readSHORT(),
               riffInput.readSHORT());
        }