• Keine Ergebnisse gefunden

deactivateS elf - deactivateSelf

- deactivateSelf

Frees the PartPerformer's Note list. You never invoke this method directly; it's invoked as part of the deactivate method inherited from Performer.

See also: - deactivate (Performer)

firstTimeTag

- (double )firstTimeTag

Returns the PartPerformer's first time tag value, as set through setFirstTimeTag:.

See also: - setFirstTimeTag:, - setLastTimeTag:

free

-free

init

This invokes [super free] with an additional check: If the PartPerformer was created by a ScorePerformer, it can't be freed through this method. It must be freed through a message to the ScorePerformer.

See also: - free (ScorePerformer), - freePartPerformers (ScorePerformer)

-init

Initializes the PartPerformer by creating and adding its single NoteSender. A subclass implementation should send [super init] before performing its own initialization.

Returns self.

lastTimeTag

- (double )lastTimeTag

Returns the PartPerformer's last time tag value, as set through setLastTimeTag:.

See also: - setFirstTimeTag:, - setLastTimeTag:

part

-part

Returns the PartPerformer's Part object, as set through setPart:.

See also: - setPart:

perform

-perform

Performs a single Note from the Note list by sending it to the PartPerformer's

NoteSender. You never invoke this method directly; it's automatically and sequentially invoked during a performance. If the PartPerfonner's Note list is exhausted, or if the next Note in the list has a time tag greater than the PartPerfonner's last time tag value, the PartPerformer is deactivated. Keep in mind that a PartPerfonner reads one Note ahead: It sends the Note read during the previous invocation of perform (or activateS elf if this is the first invocation), retrieves the next Note, and schedules another perform message based on the Note's time tag. A subclass implementation should send [super perform]. The return value is ignored.

read:

- read:(NXTypedStream *)stream

Unarchives the PartPerfonner by reading it from stream. You never invoke this method directly; to read an archived PartPerformer, call the NXReadObjectO C function.

See also: - write:, - awake

setFirstTimeTag:

- setFirstTimeTag:( double )firstTimeTag

Sets the least time tag value that the PartPerformer considers for performance. When the PartPerformer is activated, it reads through its Note list, searching for the first Note that has a time tag value greater than or equal to firstTimeTag. It begins performing from that Note. Keep in mind that the difference between the Note's time tag value and the value set here is made up as a (seeming) delay before the Note is performed.

However, this delay is added into the PartPerfonner's notion of the current time (as returned by the time method, inherited from Performer). This is distinct from the real delay incurred by setting the object's performance time offset (through Performer's setTimeShift: method): The time offset isn't added into the PartPerformer's notion of the current time.

If the PartPerformer is in a performance, this does nothing and returns nil. Otherwise, it returns self.

See also: - firstTimeTag, - setLastTimeTag:, - setTimeShift: (Performer)

setLastTimeTag:

- setLastTimeTag: (double )lastTimeTag

Sets the greatest time tag value that the PartPerformer considers for performance.

When, during its sequence of perform invocations, the PartPerformer reads a Note from its Note list that has a time tag value greater than lastTimeTag, the PartPerformer is immediately deactivated.

This method performs the same function as the setDuration: method inherited from Performer. You shouldn't invoke both.

If the PartPerformer is in a performance, this does nothing and returns nil. Otherwise, it returns self.

See also: -lastTimeTag, - setFirstTimeTag:, - setDuration: (Performer)

setPart:

- setPart:aPart

Associates the PartPerformer with aPart. If the PartPerformer is active, this does nothing and returns nil. Otherwise it returns self.

See also: - part

write:

- write:(NXTypedStream *)stream

Archives the PartPerformer by writing it to stream. You never invoke this method directly; to archive a PartPerformer, call the NXWriteRootObjectO C function. In addition to the archiving defined by the Performer class, the PartPerformer's first and last time tag values are archived directly and its Part and ScorePerformer (if any) are archived by reference.

See also: - read:, - awake

PartRecorder

INHERITS FROM Instrument: Object

DECLARED IN musickit.h

CLASS DESCRIPTION

A PartRecorder is an Instrument that realizes Notes by adding copies of them to a Part.

A PartRecorder's Part is set through the setPart: method. If the Part already contains Notes, the old Notes aren't removed or otherwise affected by recording into the Part-the recorded Notes are merged in.

Each PartRecorder contains a single NoteReceiver object. During a performance, a PartPerformer receives Notes from its NoteReceiver, copies them, and then adds them to its Part object. Each Note is given a new (but not necessarily different) timeTag; if the Note is a noteDur, it's also given a new duration. The timeTag and duration are computed either as beats or as seconds, depending on the value of the timeUnit instance variable. If time Unit is set to MK_second, the default, the new values are in seconds from the beginning of the performance. If it's set to MK_beat, they're computed as beats.

You can create PartRecorders yourself, or you can use a ScoreRecorder object to create a group of them for you.

The unit in which the object measures time.

The object's single NoteReceiver.

The object's Part.

METHOD TYPES

Creating and freeing a PartRecorder

-copy Modifying the object - init

- setPart:

Querying the object -part

Realizing Notes - realizeNote:fromNoteReceiver:

Accessing time - setTimeUnit:

- timeUnit

INSTANCE METHODS

copy -copy

init

Creates and returns a new PartRecorder as a copy of the receiver. The new object has its own NoteReceiver object but adds Notes to the same Part as the receiver.

- init

Initializes the receiver by creating and adding its single NoteReceiver. You never invoke this method directly. A subclass implementation should send [super init]

before performing its own initialization. The return value is ignored.

part

-part

Returns the receiver's Part object.

realizeNote:fromNoteReceiver:

- realizeNote:aNote fromNoteReceiver:aNoteReceiver

Copies aNote, computes and sets the new Note's timeTag (and duration if it's a noteDur), and then adds the new Note to the receiver's Part. aNoteReceiver is ignored.

Returns the receiver.

setPart:

- setPart:aPart

Sets aPart as the receiver's Part. Returns the receiver.

setTimeUnit:

- setTimeUnit:(MKTimeUnit)aTimeU nit

Sets the receiver's timeUnit instance variable to aTimeUnit, one of MK_second or MK_beat. The default is MK_second.

timeUnit

- (MKTimeUnit)timeUnit

Returns the receiver's timeUnit, either MK_second or MK_beat.