pub struct Reaper {
    pub control_surfaces: Vec<Box<dyn ControlSurface>>,
    /* private fields */
}

Fields

control_surfaces: Vec<Box<dyn ControlSurface>>

Implementations

Makes the given instance available globally.

After this has been called, the instance can be queried globally using get().

This can be called once only. Subsequent calls won’t have any effect!

Gives access to the instance which you made available globally before.

Panics

This panics if make_available_globally() has not been called before.

Show message in console.

Note

\n will be added in the end.

Run action by it’s command id.

Note

It seems, that flag should be always 0. If project is None — will perform on current project.

Get project from the current tab.

Open new project tab.

To open project in new tab use Reaper::open_project

Open project from the filename.

Add reascript from file and put to the action list.

commit must be used in the last call, but it is faster to make it false in a bulk.

Remove reascript.

commit must be used in the last call, but it is faster to make it false in a bulk.

Ask user to select a file.

extension — extension for file, e.g. “mp3”, “txt”. Or empty string.

Arm or disarm command.

Original doc

arms a command (or disarms if 0 passed) in section (empty string for main)

Get armed command.

If string is empty (len() = 0), then it’s main section.

Reset global peak cache.

Get ID for action with the given name.

Note

name is the ID string, that was made, when registered as action, but not the description line.

If action name doesn’t start with underscore, it will be added.

Get action name (string ID) of an action with the given ID.

Return REAPER bin directory (e.g. “C:\Program Files\REAPER”).

Get globally overrided automation mode.

None if do not overrides.

Override global automation mode.

Show text inputs to user and get values from them.

Note

default buf size is 1024

Call function while freezing the UI.

Call function in undo block with given name.

Note

Probably, it’s better to use UndoFlags.all() by default.

Show message box to user and get result.

Redraw the arrange view.

Redraw timeline.

Open preferences window.

page should be positive or None.

if not page — then name will be used.

Iter through all opened projects.

Warning

This operation, probably, of O(n²) complexity. So, it’s better not to use it in loop or too often.

Checks if the given pointer is still valid.

Returns true if the pointer is a valid object of the correct type in the current project.

Checks if the given pointer is still valid.

Example
use reaper_medium::ProjectContext::CurrentProject;

let track = session.reaper().get_track(CurrentProject, 0)
    .ok_or("No track")?;
let track_is_valid = session.reaper()
    .validate_ptr_2(CurrentProject, track);
assert!(track_is_valid);

Returns true if the pointer is a valid object of the correct type in the given project. The project is ignored if the pointer itself is a project.

Get latency in samples.

Returns (input, output) latency.

Try to evaluate samplerate from the latency parameters.

Not stable, and can be not precise.

Open all audio and MIDI devices (if not opened).

Reset all MIDI devices.

Return whether audio is in pre-buffer (thread safe).

Return whether audio is running (thread safe).

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.