ChoonMLLib - class library to access and convert ChoonML files

ChoonML Namespace

[This is preliminary documentation and subject to change.]

The ChoonML namespace provides a library to access ChoonML files and convert to other formats.

Applications that use this library to read a ChoonML file typically:

Applications that use this library to create a ChoonML file typically:

Converter applications built using this library typically implement the converter interfaces defined in the ChoonConvert namespace.

Namespace hierarchy

Classes

ClassDescription
Choon

Top level "choon" class

This corresponds to the "choon" top level object in ChoonML and allows a ChoonML file to be parsed or written Attributes and (Description and Copyright) elements defined under this have corresponding properties that enable access.

ExtFileMode enables either 'detached' ChoonML files (with data in separate files) or integrated files to be read/written.

The "parts" and "sections" collections also have access properties.

Methods Load and SaveMeta allow the metadata part of a ChoonML file to be persisted or retrieved. Extract and WriteSample allow samples to be written out (usually as they are processed from the input bitstream) When used in "binary" data mode, ReadSFT and WriteSFT read and write the Sample File Table (SFT)

All methods in this library can throw a ChoonMLException if an error occurs.

Warning: This interface has not yet been frozen and can be changed under you!

ChoonMLException

Exception class to encapsulate exceptions thrown from the API.

API apps should catch this exception

Part

This class encapsulates a Part - that is, an instrument or mixer channel.

It is persisted into a <part> element in ChoonML.

Samples related to this part will be automatically persisted under this element according to their Part property, which indexes Samples.

Converters should create instances of this class and add them to Parts.

All methods in this library can throw an exception if an error occurs.

Warning: This interface has not yet been frozen and can be changed under you!

PartCollection

This class encapsulates a collection of Part objects.

It is used as the type for the Parts collection.

It partially implements IList.

Sample

Encapsulates a sample of sound. This is persisted to the 'samplePlay' and 'sampleBlock' elements.

Properties provide access to the attributes of the sample elements.

The StartWrite, AddData and WriteSample methods enable the sample data to be written to the ChoonML file or to an external sample file. The BufferLen and BufferLen properties access the buffer that this uses.

SampleCollection

This class provides a collection of samples.

New entries are added to this using CreateSamples - the collection cannot be directly written.

Section

This class encapsulates a 'section' element.

Access is provided to the attributes of the section.

SectionCollection

This class encapsulates a collection of Section objects.

It is used as the type for the Sections collection.

It partially implements IList.

Enumerations

EnumerationDescription
Choon.IntervalUnit Type to encapsulate a unit of interval.
Sample.CodecTypes The type of codec used to encode the sample
Sample.SampleFormatTypes The types of sample persistence