Package apple.avfoundation
Class AVAudioSequencer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVAudioSequencer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVAudioSequencer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static AVAudioSequenceralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)doublebeatsForHostTimeError(long inHostTime, org.moe.natj.general.ptr.Ptr<NSError> outError)beatsForHostTime:error: Returns the beat that will be (or was) played at the specified host time.doublebeatsForSeconds(double seconds)beatsForSeconds: Get the beat position (timestamp) for the given time in the trackstatic voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()doublecurrentPositionInBeats()[@property] currentPositionInBeats The current playback position in beats Setting this positions the sequencer's player to the specified beat.doublecurrentPositionInSeconds()[@property] currentPositionInSeconds The current playback position in seconds Setting this positions the sequencer's player to the specified time.NSDatadataWithSMPTEResolutionError(long SMPTEResolution, org.moe.natj.general.ptr.Ptr<NSError> outError)dataWithSMPTEResolution:error: Return a data object containing the events from the sequence All details regarding the SMPTE resolution apply here as well.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static longhash_static()longhostTimeForBeatsError(double inBeats, org.moe.natj.general.ptr.Ptr<NSError> outError)hostTimeForBeats:error: Returns the host time that will be (or was) played at the specified beat.AVAudioSequencerinit()init Initialize a new sequencer, which will not be connected to an audio engine.AVAudioSequencerinitWithAudioEngine(AVAudioEngine engine)initWithAudioEngine: Initialize a new sequencer, handing it the audio engine.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisPlaying()[@property] playing Indicates whether or not the sequencer's player is playing Returns TRUE if the sequencer's player has been started and not stopped.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)booleanloadFromDataOptionsError(NSData data, long options, org.moe.natj.general.ptr.Ptr<NSError> outError)loadFromData:options:error: Parse the data and add the its events to the sequencebooleanloadFromURLOptionsError(NSURL fileURL, long options, org.moe.natj.general.ptr.Ptr<NSError> outError)loadFromURL:options:error: Load the file referenced by the URL and add the events to the sequencestatic java.lang.Objectnew_objc()voidprepareToPlay()prepareToPlay Get ready to play the sequence by prerolling all events Happens automatically on play if it has not already been called, but may produce a delay in startup.floatrate()[@property] rate The playback rate of the sequencer's player 1.0 is normal playback rate.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)doublesecondsForBeats(double beats)secondsForBeats: Get the time in seconds for the given beat position (timestamp) in the trackvoidsetCurrentPositionInBeats(double value)[@property] currentPositionInBeats The current playback position in beats Setting this positions the sequencer's player to the specified beat.voidsetCurrentPositionInSeconds(double value)[@property] currentPositionInSeconds The current playback position in seconds Setting this positions the sequencer's player to the specified time.voidsetRate(float value)[@property] rate The playback rate of the sequencer's player 1.0 is normal playback rate.static voidsetVersion_static(long aVersion)booleanstartAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)startAndReturnError: Start the sequencer's player If the AVAudioSequencer has not been prerolled, it will pre-roll itself and then start.voidstop()stop Stop the sequencer's player Stopping the player leaves it in an un-prerolled state, but stores the playback position so that a subsequent call to startAndReturnError will resume where it left off.static org.moe.natj.objc.Classsuperclass_static()AVMusicTracktempoTrack()[@property] tempoTrack The tempo track Each sequence has a single tempo track.NSArray<? extends AVMusicTrack>tracks()[@property] tracks An NSArray containing all the tracks in the sequence Track indices count from 0, and do not include the tempo track.NSDictionary<java.lang.String,?>userInfo()[@property] userInfo A dictionary containing meta-data derived from a sequence The dictionary can contain one or more of the kAFInfoDictionary_* keys specified instatic longversion_static()booleanwriteToURLSMPTEResolutionReplaceExistingError(NSURL fileURL, long resolution, boolean replace, org.moe.natj.general.ptr.Ptr<NSError> outError)writeToURL:SMPTEResolution:replaceExisting:error: Create and write a MIDI file from the events in the sequence Only MIDI events are written when writing to the MIDI file.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static AVAudioSequencer alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
beatsForHostTimeError
public double beatsForHostTimeError(long inHostTime, org.moe.natj.general.ptr.Ptr<NSError> outError)beatsForHostTime:error: Returns the beat that will be (or was) played at the specified host time. This call is only valid if the player is playing and will return 0 with an error if the player is not playing or if the starting time of the player was after the specified host time. The method uses the sequence's tempo map to retrieve a beat time from the starting and specified host time.
-
beatsForSeconds
public double beatsForSeconds(double seconds)
beatsForSeconds: Get the beat position (timestamp) for the given time in the track
-
currentPositionInBeats
public double currentPositionInBeats()
[@property] currentPositionInBeats The current playback position in beats Setting this positions the sequencer's player to the specified beat. This can be set while the player is playing, in which case playback will resume at the new position.
-
currentPositionInSeconds
public double currentPositionInSeconds()
[@property] currentPositionInSeconds The current playback position in seconds Setting this positions the sequencer's player to the specified time. This can be set while the player is playing, in which case playback will resume at the new position.
-
dataWithSMPTEResolutionError
public NSData dataWithSMPTEResolutionError(long SMPTEResolution, org.moe.natj.general.ptr.Ptr<NSError> outError)
dataWithSMPTEResolution:error: Return a data object containing the events from the sequence All details regarding the SMPTE resolution apply here as well. The returned NSData lifetime is controlled by the client.
-
hostTimeForBeatsError
public long hostTimeForBeatsError(double inBeats, org.moe.natj.general.ptr.Ptr<NSError> outError)hostTimeForBeats:error: Returns the host time that will be (or was) played at the specified beat. This call is only valid if the player is playing and will return 0 with an error if the player is not playing or if the starting position of the player (its "starting beat") was after the specified beat. The method uses the sequence's tempo map to translate a beat time from the starting time and beat of the player.
-
init
public AVAudioSequencer init()
init Initialize a new sequencer, which will not be connected to an audio engine. This is used to create a sequencer whose tracks will only send events to external MIDI endpoints.
-
initWithAudioEngine
public AVAudioSequencer initWithAudioEngine(AVAudioEngine engine)
initWithAudioEngine: Initialize a new sequencer, handing it the audio engine.
-
isPlaying
public boolean isPlaying()
[@property] playing Indicates whether or not the sequencer's player is playing Returns TRUE if the sequencer's player has been started and not stopped. It may have "played" past the end of the events in the sequence, but it is still considered to be playing (and its time value increasing) until it is explicitly stopped.
-
loadFromDataOptionsError
public boolean loadFromDataOptionsError(NSData data, long options, org.moe.natj.general.ptr.Ptr<NSError> outError)
loadFromData:options:error: Parse the data and add the its events to the sequence- Parameters:
data- the data to load fromoptions- determines how the contents are mapped to tracks inside the sequenceoutError- on exit, if an error occurs, a description of the error
-
loadFromURLOptionsError
public boolean loadFromURLOptionsError(NSURL fileURL, long options, org.moe.natj.general.ptr.Ptr<NSError> outError)
loadFromURL:options:error: Load the file referenced by the URL and add the events to the sequence- Parameters:
fileURL- the URL to the fileoptions- determines how the file's contents are mapped to tracks inside the sequenceoutError- on exit, if an error occurs, a description of the error
-
prepareToPlay
public void prepareToPlay()
prepareToPlay Get ready to play the sequence by prerolling all events Happens automatically on play if it has not already been called, but may produce a delay in startup.
-
rate
public float rate()
[@property] rate The playback rate of the sequencer's player 1.0 is normal playback rate. Rate must be > 0.0.
-
secondsForBeats
public double secondsForBeats(double beats)
secondsForBeats: Get the time in seconds for the given beat position (timestamp) in the track
-
setCurrentPositionInBeats
public void setCurrentPositionInBeats(double value)
[@property] currentPositionInBeats The current playback position in beats Setting this positions the sequencer's player to the specified beat. This can be set while the player is playing, in which case playback will resume at the new position.
-
setCurrentPositionInSeconds
public void setCurrentPositionInSeconds(double value)
[@property] currentPositionInSeconds The current playback position in seconds Setting this positions the sequencer's player to the specified time. This can be set while the player is playing, in which case playback will resume at the new position.
-
setRate
public void setRate(float value)
[@property] rate The playback rate of the sequencer's player 1.0 is normal playback rate. Rate must be > 0.0.
-
startAndReturnError
public boolean startAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)
startAndReturnError: Start the sequencer's player If the AVAudioSequencer has not been prerolled, it will pre-roll itself and then start. When the sequencer is associated with an audio engine, the sequencer's player will only play if the audio engine is running.
-
stop
public void stop()
stop Stop the sequencer's player Stopping the player leaves it in an un-prerolled state, but stores the playback position so that a subsequent call to startAndReturnError will resume where it left off. This action will not stop an associated audio engine.
-
tempoTrack
public AVMusicTrack tempoTrack()
[@property] tempoTrack The tempo track Each sequence has a single tempo track. All tempo events are placed into this track (as well as other appropriate events (for instance, the time signature from a MIDI file). The tempo track can be edited and iterated upon as any other track. Non-tempo events in a tempo track are ignored.
-
tracks
public NSArray<? extends AVMusicTrack> tracks()
[@property] tracks An NSArray containing all the tracks in the sequence Track indices count from 0, and do not include the tempo track.
-
userInfo
public NSDictionary<java.lang.String,?> userInfo()
[@property] userInfo A dictionary containing meta-data derived from a sequence The dictionary can contain one or more of the kAFInfoDictionary_* keys specified in
-
writeToURLSMPTEResolutionReplaceExistingError
public boolean writeToURLSMPTEResolutionReplaceExistingError(NSURL fileURL, long resolution, boolean replace, org.moe.natj.general.ptr.Ptr<NSError> outError)
writeToURL:SMPTEResolution:replaceExisting:error: Create and write a MIDI file from the events in the sequence Only MIDI events are written when writing to the MIDI file. MIDI files are normally beat based, but can also have a SMPTE (or real-time rather than beat time) representation. The relationship between "tick" and quarter note for saving to Standard MIDI File - pass in zero to use default - this will be the value that is currently set on the tempo track- Parameters:
fileURL- the path for the file to be createdresolution- the relationship between "tick" and quarter note for saving to a Standard MIDI File - pass in zero to use default - this will be the value that is currently set on the tempo trackreplace- if the file already exists, YES will cause it to be overwritten with the new data. Otherwise the call will fail with a permission error.outError- on exit, if an error occurs, a description of the error
-
-