コード例 #1
0
ファイル: RiffTimeSignature.cs プロジェクト: svejdo1/niffty
        /** 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));
        }
コード例 #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)));
        }
コード例 #3
0
ファイル: RiffNotehead.cs プロジェクト: svejdo1/niffty
        /** 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));
        }
コード例 #4
0
ファイル: RiffRest.cs プロジェクト: svejdo1/niffty
        /** 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)));
        }
コード例 #5
0
ファイル: RiffClef.cs プロジェクト: svejdo1/niffty
        /** 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));
        }
コード例 #6
0
ファイル: RiffClef.cs プロジェクト: svejdo1/niffty
        /** 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)));
        }
コード例 #7
0
ファイル: RiffNiffInfo.cs プロジェクト: svejdo1/niffty
        /** 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()));
        }
コード例 #8
0
ファイル: RiffNiffInfo.cs プロジェクト: svejdo1/niffty
        /** 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());
        }