Struct rimd::SMFBuilder [] [src]

pub struct SMFBuilder { /* fields omitted */ }

An SMFBuilder can be used to create an SMF file. This is done by adding tracks to the builder via add_track and then adding events to each track.

Methods

impl SMFBuilder
[src]

Create a new SMFBuilder. Initially the builder will have no tracks

Get the number of tracks currenly in the builder

Add new a track to this builder

Add a static track to the builder (note this will clone all events in the passed iterator)

Set the copyright for the track at index track. This will also cause a copyright meta event to be inserted.

Panics

Panics if track is >= to the number of tracks in this builder, or if the track already has a copyright set.

Set the name for the track at index track. This will also cause a name meta event to be inserted.

Panics

Panics if track is >= to the number of tracks in this builder, or if the track already has a name set.

Add a midi message to track at index track at absolute time time.

Panics

Panics if track is >= to the number of tracks in this builder

Add a midi message to track at index track at delta ticks after the last message (or at delta if no current messages exist)

Panics

Panics if track is >= to the number of tracks in this builder

Add a meta event to track at index track at absolute time time.

Panics

Panics if track is >= to the number of tracks in this builder

Add a meta event to track at index track at delta ticks after the last message (or at delta if no current messages exist)

Panics

Panics if track is >= to the number of tracks in this builder

Add a TrackEvent to the track at index track. The event will be added at event.vtime after the last event currently in the builder for the track.

Panics

Panics if track is >= to the number of tracks in this builder

Generate an SMF file with the events that have been added to the builder