download MKPartRecorder.h
Language: ObjectiveC
Copyright: (c) 1988-1992, NeXT Computer, Inc. (c) 1999-2005, The MusicKit Project. (c) 1994 Stanford University. (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT
LOC: 26
Project Info
The MusicKit(musickit)
Server: SourceForge
Type: cvs
...sicKit\Frameworks\MusicKit\
   _ArielQP.h
   _DSPMK.h
   _error.h
   _midi.h
   _MKAppProxy.h
   _MKAppProxy.m
   _MKNameTable.h
   _MKNameTable.m
   _MKParameter.h
   _MTCHelper.h
   _MTCHelper.m
   _musickit.h
   _noteRecorder.h
   _OrchloopbeginUG.h
   _OrchloopbeginUG.m
   _ParName.h
   _ParName.m
   _scorefile.h
   _ScorefileVar.h
   _ScorefileVar.m
   _SharedSynthInfo.h
   _SharedSynthInfo.m
   _synthElementMethods.m
   _time.h
   ArielQP.h
   ArielQP.m
   classFuncs.h
   ConductorPrivate.h
   dsp_types.h
   DSPSerialPortDevice.h
   dspwrap.h
   EnvelopePrivate.h
   equalTempered.m
   errors.h
   fastFFT.c
   fastFFT.h
   GNUmakefile.postamble
   GNUmakefile.preamble.in
   InstrumentPrivate.h
   keynums.h
   libMusicKit.def
   Localized.strings
   make.sh
   Makefile.postamble
   Makefile.preamble
   midi_spec.h
   midifile.h
   midifile.m
   MidiPrivate.h
   midiTranslation.h
   MKConductor.h
   MKConductor.m
   MKConductorDelegate.h
   MKDeviceStatus.h
   MKEnvelope.h
   MKEnvelope.m
   MKFilePerformer.h
   MKFilePerformer.m
   MKFileWriter.h
   MKFileWriter.m
   MKInstrument.h
   MKInstrument.m
   MKMidi.h
   MKMidi.m
   MKMixerInstrument.h
   MKMixerInstrument.m
   MKMTCPerformer.h
   MKMTCPerformer.m
   MKNote.h
   MKNoteFilter.h
   MKNoteFilter.m
   MKNoteReceiver.h
   MKNoteReceiver.m
   MKNoteSender.h
   MKNoteSender.m
   MKOrchestra.h
   MKPart.m
   MKPartials.h
   MKPartials.m
   ...tialsWaveshapingTable.m
   MKPartPerformer.h
   MKPartPerformer.m
   MKPartRecorder.h
   MKPartRecorder.m
   MKPatch.h
   MKPatch.m
   MKPatchConnection.h
   MKPatchConnection.m
   MKPatchEntry.h
   MKPatchEntry.m
   MKPatchTemplate.h
   MKPatchTemplate.m
   MKPerformer.h
   MKPerformer.m
   MKPerformerDelegate.h
   MKPlugin.h
   MKSamplerInstrument.h
   MKSamplerInstrument.m
   MKSamples.h
   MKScore.h
   MKScore.m
   MKScorefileObject.h
   MKScorefilePerformer.h
   MKScorefilePerformer.m
   MKScorefileWriter.m
   MKScorePerformer.h
   MKScorePerformer.m
   MKScoreRecorder.h
   MKScoreRecorder.m
   MKSynthData.h
   MKSynthData.m
   MKSynthInstrument.h
   MKSynthPatch.h
   MKTimbre.h
   MKTimbre.m
   MKTuningSystem.h
   MKTuningSystem.m
   MKUnitGenerator.h
   MKUnitGenerator.m
   MKWaveTable.h
   MKWaveTable.m
   mtcMidi.m
   mtcMidiPrivate.m
   MusicKit-Info.plist
   MusicKit.h
   MusicKitConfig.h.in
   names.h
   noDVal.h
   noteDispatcherMethods.m
   NotePrivate.h
   noteRecorderCFuncs.m
   noteRecorderMethods.m
   orch.h
   OrchestraPrivate.h
   OrchloopbeginUG.h
   OrchloopbeginUG.m
   orchloopbeginUGInclude.m
   params.h
   parNames.m
   partialsDBInclude.m
   PartialsPrivate.h
   PartPerformerPrivate.h
   PartPrivate.h
   PartRecorderPrivate.h
   PatchTemplatePrivate.h
   PB.project
   PerformerPrivate.h
   pitches.h
   platform.make
   ...efilePerformerPrivate.h
   ScorePerformerPrivate.h
   ScorePrivate.h
   ScoreRecorderPrivate.h
   SynthDataPrivate.h
   synthElementCFuncs.m
   synthElementMethods.m
   SynthInstrumentPrivate.h
   SynthPatchList.h
   SynthPatchList.m
   SynthPatchPrivate.h
   timetagInclude.m
   timeunits.h
   tokenNames.m
   tokens.h
   trigonometry.c
   trigonometry.h
   TuningSystemPrivate.h
   UnitGeneratorPrivate.h
   win32-def.top
   writeBinary.m
   writeMidi.m
   writeScore.m

/*
  $Id: MKPartRecorder.h,v 1.8 2005/05/11 02:16:30 leighsmith Exp $
  Defined In: The MusicKit

  Description:
    See class description below.
  
    Each MKPartRecorder contains a single MKNoteReceiver object.  During a
    performance, a MKPartPerformer receives MKNotes from its MKNoteReceiver,
    copies them, and then adds them to its MKPart object.  The MKPartRecorder
    gives each MKNote a new timeTag and, if it's a noteDur, a new duration.
    The new timeTag reflects the time in the performance that the MKNote was
    received by the object.  The timeTag and the duration are computed
    as beats or seconds.  (Additionally, if the timeunit is "MK_timeTag",
    the MKNote's timeTag is used verbatim.)
  
    You can create MKPartRecorders yourself, or you can use a MKScoreRecorder
    object to create a group of them for you.
  

  Original Author: David A. Jaffe

  Copyright (c) 1988-1992, NeXT Computer, Inc.
  Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT
  Portions Copyright (c) 1994 Stanford University.  
  Portions Copyright (c) 1999-2005, The MusicKit Project.
*/
/*!
  @class MKPartRecorder
  @brief A MKPartRecorder is an MKInstrument that realizes MKNotes by adding copies of them to a MKPart.
 
A MKPartRecorder's MKPart is set through the <b>setPart:</b>
method.  If the MKPart already contains MKNotes, the old MKNotes aren't removed
or otherwise affected by recording into the MKPart - the recorded MKNotes are
merged in.

Each MKPartRecorder contains a single MKNoteReceiver object.  During a
performance, a MKPartPerformer receives MKNotes from its MKNoteReceiver, copies
them, and then adds them to its MKPart object.  Each MKNote is given a new (but
not necessarily different) timeTag; if the MKNote 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 <b>timeUnit</b> instance variable.  If
<b>timeUnit</b> 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.  If it's set to MK_timeTag, the new values are derived from the
timeTag value in the MKNote itself.  For example, when recording from MKMidi, you
may want to use MK_timeTag.

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

  @see  MKScoreRecorder, MKPart
*/
#ifndef __MK_PartRecorder_H___
#define __MK_PartRecorder_H___

#import "MKInstrument.h"
#import "timeunits.h"

@interface MKPartRecorder : MKInstrument
{
    /*! @var timeUnit Enumerates possible methods of how time is interpreted. */
    MKTimeUnit timeUnit;                
    /*! @var noteReceiver The object's single NoteReceiver. */
    MKNoteReceiver *noteReceiver;
    /*! @var part The MKPartRecorder instance's MKPart. */
    MKPart *part; 
    BOOL compensatesDeltaT;

@private
    id _scoreRecorder;
}

/*!
  @return Returns an id.
  @brief Initializes the receiver by creating and adding its single
  MKNoteReceiver.

  You must invoke this method when creating a new
  object.  A subclass implementation should send <b>[super init]</b>
  before performing its own initialization.  
*/
- init; 

/*!
  @brief Sets the receiver's <b>timeUnit</b> instance variable to
  <i>aTimeUnit</i>, one of <b>MK_second</b>, <b>MK_beat</b> or <b>MK_timeTag</b>.

  The default is <b>MK_second</b>.
  @param  aTimeUnit is a MKTimeUnit.
  @return Returns an id.
  @see timeunits.h
 */
- setTimeUnit: (MKTimeUnit) aTimeUnit;

/*!
  @brief Returns the receiver's <b>timeUnit</b>, either MK_second,
  MK_timeTag, or MK_beat.
  @return Returns a MKTimeUnit.
  @see timeunits.h
 */
- (MKTimeUnit) timeUnit;

/*!
  @brief Sets <i>aPart</i> as the receiver's MKPart.
  @param  aPart is an MKPart instance.
*/
- (void) setPart: (MKPart *) aPart; 

/*!
  @brief Returns the receiver's MKPart object.
  @return Returns an MKPart instance.
*/
- (MKPart *) part; 

/*!
  @brief Copies <i>aNote</i>, computes and sets the new MKNote's timeTag (and
  duration if it's a noteDur), and then adds the new MKNote to the
  receiver's MKPart.

  <i>aNoteReceiver</i> is ignored. The timeTag
  and duration computations use the <tt>makeTimeTag:</tt> and <tt>makeDur:</tt>
  methods defined in MKNoteRecorder. 
  @param  aNote is an MKNote instance.
  @param  aNoteReceiver is an MKNoteReceiver instance.
  @return Returns the receiver.
 */
- realizeNote: (MKNote *) aNote fromNoteReceiver: (MKNoteReceiver *) aNoteReceiver; 

/*!
  @brief Creates and returns a new MKPartRecorder as a copy of the
  receiver.

  The new object has its own MKNoteReceiver object but adds
  MKNotes to the same MKPart as the receiver.
  @param  zone is an NSZone.
  @return Returns an id.
*/
- copyWithZone: (NSZone *) zone; 

/* 
  You never send this message directly.  
  Should be invoked with NXWriteRootObject(). 
  Invokes superclass write: then archives timeUnit. 
  Optionally archives part using NXWriteObjectReference().
 */
- (void) encodeWithCoder: (NSCoder *) aCoder;

/* 
 You never send this message directly.  
 Note that -init is not sent to newly unarchived objects.
 See write:. 
*/
- (id) initWithCoder: (NSCoder *) aDecoder;

/*!
  @brief Assigns whether to use time compensation.
  @param yesOrNo
  
  Default is NO. 
 */
- setDeltaTCompensation: (BOOL) yesOrNo;

/*!
  @brief Returns whether to use time compensation.
  
  Default is NO. 
 */
- (BOOL) compensatesDeltaT;

@end

#endif

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us