/** Creates new MeasureStartTimeSlice from the parentInput's input stream. * The next object in the input stream must be a time slice with type MEASURE_START. * After creating the MeasureStartTimeSlice, you can call addTimeSlices() * to store the event time slices for this measure start time slice. * * @param parentInput the parent RIFF object being used to read the input stream * @see #addTimeSlices */ static public MeasureStartTimeSlice newInstance(Riff parentInput) { Riff riffInput = new Riff(parentInput, RIFF_ID); int type = riffInput.readBYTE(); if (type != MEASURE_START) { throw new RiffFormatException ("Expected MEASURE_START for time slice type. Got " + type + "."); } return(new MeasureStartTimeSlice (new Rational(riffInput.readSHORT(), riffInput.readSHORT()), RiffTags.newInstance(riffInput))); }
/** Creates new TimeSlice from the parentInput's input stream. * The next object in the input stream must be a time slice with * a type any other than MEASURE_START (which means the type should * be EVENT). * After creating the TimeSlice, you can call addMusicSymbols() * to store the music symbols for this time slice. * * @param parentInput the parent RIFF object being used to read the input stream * @see #addMusicSymbols */ static public TimeSlice newInstance(Riff parentInput) { Riff riffInput = new Riff(parentInput, RIFF_ID); int type = riffInput.readBYTE(); if (type == MEASURE_START) { throw new RiffFormatException ("Did not expect a time slice with type MEASURE_START."); } else if (type != EVENT) { throw new RiffFormatException ("Expected EVENT for time slice type. Got " + type + "."); } return(new TimeSlice (new Rational(riffInput.readSHORT(), riffInput.readSHORT()), RiffTags.newInstance(riffInput))); }
/** Creates new Tie 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 Tie newInstance(Riff parentInput) { Riff riffInput = new Riff(parentInput, RIFF_ID); return(new Tie(RiffTags.newInstance(riffInput))); }
/** Creates a new AugmentationDot 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 AugmentationDot newInstance(Riff parentInput) { Riff riffInput = new Riff(parentInput, RIFF_ID); return(new AugmentationDot(RiffTags.newInstance(riffInput))); }