ChoonMLLib - class library to access and convert ChoonML files

SampleCollection.CreateSamples Method 

[This is preliminary documentation and subject to change.]

Create samples.

This takes the parameters for one source sample as input. It then breaks the sample up according to the settings in ChopSections and/or JoinSamples.

This can result in zero or more samples being created. The returned value will have all the created samples in it. Samples are created and added to the SampleCollection.

public Sample[] CreateSamples(
   int partIndex,
   string name,
   string extFile,
   double startPos,
   double endPos


The index of the part this sample is in in Parts
The name of the sample. Must be unique
If creating a detached file the external file name
The start position in global units
The end position in global units. Note this is actually the sample *after* the last one.

Return Value

An array with all the created samples. If the sample was joined to the one before it then this will be empty.


Exception TypeCondition

Thrown with error 108 if a sample does not start in any section and ChopSections is set.

Thrown with error 106 if a sample runs of the end of all the sections

Both indicate that the section element in the input CHTML does not include sections covering the entire song.

See Also

SampleCollection Class | ChoonML Namespace