BandeqCHOP Class
This class inherits from the CHOP class. It references a specific Band EQ CHOP.
Members[edit]
chanIndex
(Read Only) me.chanIndex
can be used in any parameter to give a different value for each channel being generated, for example [3, 4, 5][me.chanIndex]
.
sampleIndex
(Read Only) The index of the current sample being evaluated.
Methods[edit]
No operator specific methods.
CHOP Class[edit]
Members
As these attributes are dependent on each other, set the rate
and start
(or startTime
) attributes, before the len
, end
(or endTime
) attributes.
numChans
→ int
(Read Only):
The number of channels.
numSamples
→ int
:
Get or set the number of samples (or indices) per channel. You can change the number of samples by setting this value, only in a scriptCHOP.
start
→ float
:
Get or set the start index of the channels. This can be modified only when the CHOP is a scriptCHOP.
end
→ float
:
Get or set the end index of the channels. This can be modified only when the CHOP is a scriptCHOP.
rate
→ float
:
Get or set the sample rate of the CHOP. This can be modified only when the CHOP is a scriptCHOP.
isTimeSlice
→ bool
:
Get or set the last cooked Time Slice value. True if the CHOP last cooked as a Time Slice. This can be modified only when the CHOP is a scriptCHOP
export
→ bool
:
Get or set Export Flag.
exportChanges
→ int
(Read Only):
Number of times the export mapping information has changed.
isCHOP
→ bool
(Read Only):
True if the operator is a CHOP.
Methods
[nameOrIndex]
→ Channel
:
Channels may be easily accessed from a CHOP using the [] subscript operator.
- nameOrIndex - Must be an exact string name, or it may be a numeric channel index. Wildcards are not supported. Refer to the help on channels to see how to use the returned Channel object.
and to get the third sample from the channel, assuming the channel has 3 or more samples:n = op('pattern1') c = n[4] c = n['chan2']n = op('pattern1') c = n['chan2'][2]
chan(*nameOrIndex, caseSensitive=True)
→ Channel | None
:
Returns the first Channel that matches the given name or index or None if none are found.
Multiple patterns may be specified which are all added to the search.
- nameOrIndex - May be a string name, possibly using Pattern Matching, or it may be a numeric channel index. You can provide multiple.
- caseSensitive - (Optional) Specifies whether or not case sensitivity is used.
n = op('pattern1') c = n.chan(4) c = n.chan('chan*') c = n.chan('chan3zall', caseSensitive=False)
chans(*nameOrIndex, caseSensitive=True)
→ list
:
Returns a (possibly empty) list of Channels that match that specified names or indices. Multiple names and indices may be provided.
- nameOrIndex - (Optional) One or more string names, possibly using Pattern Matching, or numeric channel index. No arguments are passed, a list of all channels is returned.
- caseSensitive - (Optional) Specifies whether or not case sensitivity is used.
n = op('pattern1') newlist = n.chans() # get all channels in the CHOP newlist = n.chans('a*', 3,4,5, 'd*')
numpyArray()
→ numpy.array
:
Returns all of the channels in this CHOP a 2D NumPy array with a width equal to the channel length (the number of samples) and a height equal to the number of channels. See numPy.
convertToKeyframes(tolerance=0.1)
→ animationCOMP
:
Create an Animation COMP that contains a keyframed approximation of the CHOP's channels.
The resultant animationCOMP is returned.
- tolerance - (Keyword, Optional) If this is not given, the default value is 0.1. It may be overridden for higher accuracy match between the source channels and the resulting keyframed channels.
save(filepath, createFolders=False)
→ str
:
Saves the channel to the file system. Supported file formats are
.clip, .bclip, .chan, .bchan
and.aiff
.Returns the file path used.
- filepath - (Optional) The path and filename to save to.
- createFolders - (Keyword, Optional) If True, it creates the not existent directories provided by the filepath.
n = op('pattern1') name = n.save() #save in native format with default name n.save('output.chan') #ascii readable tab delimited format n.save('output.aiff') #supported audio format