Class Style
The feel parameter is estimated programatically from the analysis of the notes positions.
Limitations:
- ignore SFF2 files
- in the Midi music data ignore the following data: sysex, program changes, pitch bends, controller changes
- Program changes are loaded from the SInt section.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddStylePart(StylePartType type) Create a StylePart of specified type and add it to this object.voiddump(boolean showMusicData, boolean showSInt, boolean showCASM) getAccType(int channel) Get the AccType for a specified channel (which can be a "secondary" source channel or the "main" one).getSInt()getStylePart(StylePartType spType) intgetStylePartSizeInBars(StylePartType spType) The list used StylePartTypes sorted according to natural ordering.voidreadMusicData(File stdFile) Read only the MusicData (Midi notes) which will fill/create all the SourcePhrase objects in the StyleParts.voidreadMusicData(File extFile, File stdFile) Get the music data by merging music data from an extension style file and a base style file.voidreadNonMusicData(File stdFile) Read only the non MusicData (Midi notes) of a standard Yamaha style file : CASM (StyleParts creation), SInt, tempo, signature, name.voidreadNonMusicData(File extFile, File stdFile) Get the non music data by merging data from an extension style file and a base style file.
-
Field Details
-
name
-
timeSignature
-
ticksPerQuarter
public int ticksPerQuarter -
tempo
public int tempo -
division
-
sffType
-
-
Constructor Details
-
Style
public Style()
-
-
Method Details
-
addStylePart
Create a StylePart of specified type and add it to this object.If StylePart already exists, just return it.
- Parameters:
type-- Returns:
- The created StylePart.
-
getStylePart
-
getStylePartSizeInBars
-
getStylePartTypes
The list used StylePartTypes sorted according to natural ordering.- Returns:
-
getSInt
-
getAllAccTypes
-
getAccType
Get the AccType for a specified channel (which can be a "secondary" source channel or the "main" one).Search the first StylePart which uses this channel and return the associated AccType. If one channel is used by two AccTypes (it can happen, in 2 different StyleParts), try to return each of them successively upon each method call (otherwise problem will happen).
- Returns:
- Null if this channel is not used in this Style.
-
readNonMusicData
public void readNonMusicData(File stdFile) throws IOException, org.jjazz.yamjjazz.FormatNotSupportedException, FileNotFoundException, InvalidMidiDataException Read only the non MusicData (Midi notes) of a standard Yamaha style file : CASM (StyleParts creation), SInt, tempo, signature, name.- Parameters:
stdFile- A standard Yamaha style file- Throws:
IOExceptionorg.jjazz.yamjjazz.FormatNotSupportedExceptionFileNotFoundExceptionInvalidMidiDataException
-
readMusicData
public void readMusicData(File stdFile) throws IOException, FileNotFoundException, InvalidMidiDataException Read only the MusicData (Midi notes) which will fill/create all the SourcePhrase objects in the StyleParts.This method must be called AFTER readNonMusicData() has been called, so that the StyleParts are already created.
- Parameters:
stdFile- A standard Yamaha style file- Throws:
IOExceptionFileNotFoundExceptionInvalidMidiDataException
-
readNonMusicData
public void readNonMusicData(File extFile, File stdFile) throws IOException, org.jjazz.yamjjazz.FormatNotSupportedException, FileNotFoundException, InvalidMidiDataException Get the non music data by merging data from an extension style file and a base style file.- Parameters:
extFile- A YamJJazz extension filestdFile- A standard Yamaha style file- Throws:
IOExceptionorg.jjazz.yamjjazz.FormatNotSupportedExceptionFileNotFoundExceptionInvalidMidiDataException
-
readMusicData
public void readMusicData(File extFile, File stdFile) throws IOException, FileNotFoundException, InvalidMidiDataException, org.jjazz.yamjjazz.FormatNotSupportedException Get the music data by merging music data from an extension style file and a base style file.This method must be called AFTER readNonMusicData() has been called, so that the StyleParts are already created.
- Parameters:
extFile- A YamJJazz extension filestdFile- A standard Yamaha style file- Throws:
IOExceptionFileNotFoundExceptionInvalidMidiDataExceptionorg.jjazz.yamjjazz.FormatNotSupportedException
-
dump
public void dump(boolean showMusicData, boolean showSInt, boolean showCASM)
-