Welcome to score-model’s documentation!¶
-
class
score_model.m21utils.
Voice
(stream)¶ - Attributes
activeSite
A reference to the most-recent object used to contain this object.
atSoundingPitch
Get or set the atSoundingPitch status, that is whether the score is at concert pitch or may have transposing instruments that will not sound as notated.
beat
beat returns None for a Stream.
beatDuration
unlike other Music21Objects, streams always have beatDuration of None
beatStr
unlike other Music21Objects, streams always have beatStr (beat string) of None
beatStrength
unlike other Music21Objects, streams always have beatStrength of None
classSet
Returns a set (that is, unordered, but indexed) of all of the classes that this class belongs to, including string names, fullyQualified string names, and objects themselves.
classes
Returns a tuple containing the names (strings, not objects) of classes that this object belongs to – starting with the object’s class name and going up the mro() for the object.
clef
Finds or sets a
Clef
at offset 0.0 in the Streamderivation
Return the
Derivation
object for this element.duration
Returns the total duration of the Stream, from the beginning of the stream until the end of the final element.
editorial
a
Editorial
object that stores editorial informationelements
.elements is a Tuple representing the elements contained in the Stream.
finalBarline
Get or set the final barline of this Stream’s Measures, if and only if there are Measures defined as elements in this Stream.
flat
A very important read-only property that returns a new Stream that has all sub-containers “flattened” within it, that is, it returns a new Stream where no elements nest within other elements.
hasEditorialInformation
Returns True if there is a
Editorial
object already associated with this object, False otherwise.hasStyleInformation
Returns True if there is a
Style
object already associated with this object, False otherwise.highestOffset
Get start time of element with the highest offset in the Stream.
highestTime
Returns the maximum of all Element offsets plus their Duration in quarter lengths.
isGapless
Returns True if there are no gaps between the lowest offset and the highest time.
iter
The Stream iterator, used in all for loops and similar iteration routines.
keySignature
Find or set a Key or KeySignature at offset 0.0 of a stream.
lowestOffset
Get the start time of the Element with the lowest offset in the Stream.
measureNumber
Return the measure number of a
Measure
that contains this object if the object is in a measure.metadata
Get or set the
Metadata
object found at the beginning (offset 0) of this Stream.notes
The notes property of a Stream returns an iterator that consists only of the notes (that is,
Note
,Chord
, etc.) found in the stream.notesAndRests
The notesAndRests property of a Stream returns a StreamIterator that consists only of the
GeneralNote
objects found in the stream.offset
The offset property sets or returns the position of this object as a float or fractions.Fraction value (generally in quarterLengths), depending on what is representable.
pitches
Returns all
Pitch
objects found in any element in the Stream as a Python List.priority
Get and set the priority integer value.
quarterLength
Set or Return the Duration as represented in Quarter Length, possibly as a fraction.
seconds
Get or set the duration of this Stream in seconds, assuming that this object contains a
MetronomeMark
orMetricModulation
.secondsMap
Returns a list where each element is a dictionary consisting of the ‘offsetSeconds’ in seconds of each element in a Stream, the ‘duration’ in seconds, the ‘endTimeSeconds’ in seconds (that is, the offset plus the duration), and the ‘element’ itself.
semiFlat
Returns a flat-like Stream representation, but where Stream sub-classed containers, such as Measure or Part, are retained in the output Stream, but positioned at their relative offset.
sorted
Returns a new Stream where all the elements are sorted according to offset time, then
spannerBundle
A low-level object for Spanner management.
spanners
Return all
Spanner
objectsstaffLines
Returns the number of staffLines for the Stream, as defined by
style
Returns (or Creates and then Returns) the Style object associated with this object, or sets a new style object.
timeSignature
Gets or sets the timeSignature at offset 0.0 of the Stream (generally a Measure)
variants
Return a Stream containing all
Variant
objects in this Stream.voices
Return all
Voices
objects
Methods
activateVariants
([group, matchBySpan, inPlace])For any
Variant
objects defined in this Stream (or selected by matching the group parameter), replace elements defined in the Variant with those in the calling Stream.addGroupForElements
(group[, classFilter])Add the group to the groups attribute of all elements.
allPlayingWhileSounding
(el[, elStream])Returns a new Stream of elements in this stream that sound at the same time as el, an element presumably in another Stream.
analyze
(*args, **keywords)Runs a particular analytical method on the contents of the stream to find its ambitus (range) or key.
append
(others)Add a Music21Object (including another Stream) to the end of the current Stream.
asTimespans
([classList, flatten])Convert stream to a
TimespanTree
instance, a highly optimized data structure for searching through elements and offsets.asTree
([flatten, classList, useTimespans, …])Returns an elementTree of the score, using exact positioning.
attachIntervalsBetweenStreams
(cmpStream)For each element in self, creates an interval.Interval object in the element’s editorial that is the interval between it and the element in cmpStream that is sounding at the moment the element in srcStream is attacked.
attachMelodicIntervals
()For each element in self, creates an interval.Interval object in the element’s editorial that is the interval between it and the previous element in the stream.
augmentOrDiminish
(amountToScale, *[, inPlace])Given a number greater than zero, multiplies the current quarterLength of the duration of each element by this number as well as their offset and returns a new Stream.
beatAndMeasureFromOffset
(searchOffset[, …])Returns a two-element tuple of the beat and the Measure object (or the first one if there are several at the same offset; unlikely but possible) for a given offset from the start of this Stream (that contains measures).
chordify
(*[, addTies, addPartIdAsGroup, …])Create a chordal reduction of polyphonic music, where each change to a new pitch results in a new chord.
clear
()Remove all elements in a stream.
clearCache
(**keywords)A number of music21 attributes (especially with Chords and RomanNumerals, etc.) are expensive to compute and are therefore cached.
cloneEmpty
([derivationMethod])Create a Stream that is identical to this one except that the elements are empty and set derivation (Should this be deleted???)
containerHierarchy
(*[, followDerivation, …])Return a list of Stream subclasses that this object is contained within or (if followDerivation is set) is derived from.
containerInHierarchy
(el, *[, setActiveSite])Returns the container in a hierarchy that this element belongs to.
contextSites
(*[, callerFirst, memo, …])A generator that returns a list of namedtuples of sites to search for a context…
coreAppend
(element, *[, setActiveSite])N.B.
coreElementsChanged
(*[, updateIsFlat, …])NB – a “core” stream method that is not necessary for most users.
coreGatherMissingSpanners
([recurse, …])find all spanners that are referenced by elements in the (recursed if recurse=True) stream and either inserts them in the Stream (if insert is True) or returns them if insert is False.
coreGetElementByMemoryLocation
(objId)NB – a “core” stream method that is not necessary for most users.
coreGuardBeforeAddElement
(element, *[, …])Before adding an element, this method provides important checks to that element.
coreHasElementByMemoryLocation
(objId)NB – a “core” stream method that is not necessary for most users.
coreInsert
(offset, element, *[, ignoreSort, …])N.B.
coreSelfActiveSite
(el)Set the activeSite of el to be self.
coreStoreAtEnd
(element[, setActiveSite])NB – this is a “core” method.
elementOffset
(element[, stringReturns])Return the offset as an opFrac (float or Fraction) from the offsetMap.
expandRepeats
([copySpanners])Expand this Stream with repeats.
explode
()Create a multi-part extraction from a single polyphonic Part.
extendDuration
(objName, *[, inPlace])Given a Stream and an object class name, go through the Stream and find each instance of the desired object.
extendDurationAndGetBoundaries
(objName, *[, …])DEPRECATED in v.6 – to be removed in v.7
extendTies
([ignoreRests, pitchAttr])Connect any adjacent pitch space values that are the same with a Tie.
extractContext
(searchElement[, before, …])Extracts elements around the given element within (before) quarter notes and (after) quarter notes (default 4), and returns a new Stream.
findConsecutiveNotes
([skipRests, …])Returns a list of consecutive pitched Notes in a Stream.
findGaps
()Returns either (1) a Stream containing empty Music21Objects whose offsets and durations are the length of gaps in the Stream or (2) None if there are no gaps.
flattenUnnecessaryVoices
(*[, force, inPlace])If this Stream defines one or more internal voices, do the following:
getAllContextsByClass
(className)Returns a generator that yields elements found by .getContextByClass and then finds the previous contexts for that element.
getClefs
([searchActiveSite, searchContext, …])DEPRECATED…
getContextByClass
(className, *[, …])A very powerful method in music21 of fundamental importance: Returns the element matching the className that is closest to this element in its current hierarchy (or the hierarchy of the derivation origin unless followDerivation is False.
getElementAfterElement
(element[, classList])Given an element, get the next element.
getElementAtOrBefore
(offset[, classList])Given an offset, find the element at this offset, or with the offset less than and nearest to.
getElementBeforeOffset
(offset[, classList])Get element before (and not at) a provided offset.
getElementById
(elementId[, classFilter])Returns the first encountered element for a given id.
getElementsByClass
(classFilterList)Return a StreamIterator that will iterate over Elements that match one or more classes in the classFilterList.
getElementsByGroup
(groupFilterList)>>> n1 = note.Note('C')
getElementsByOffset
(offsetStart[, …])Returns a StreamIterator containing all Music21Objects that are found at a certain offset or within a certain offset time range (given the offsetStart and (optional) offsetEnd values).
getElementsNotOfClass
(classFilterList)Return a list of all Elements that do not match the one or more classes in the classFilterList.
getInstrument
([searchActiveSite, returnDefault])Return the first Instrument found in this Stream.
getInstruments
([searchActiveSite, …])Search this stream or activeSite streams for
Instrument
objects, otherwise return a default InstrumentgetKeySignatures
([searchActiveSite, …])Collect all
KeySignature
objects in this Stream in a new Stream.getOffsetBySite
(site[, stringReturns])If this class has been registered in a container such as a Stream, that container can be provided here, and the offset in that object can be returned.
getOffsetInHierarchy
(site)For an element which may not be in site, but might be in a Stream in site (or further in streams), find the cumulative offset of the element in that site.
getOverlaps
()Find any elements that overlap.
getSpannerSites
([spannerClassList])Return a list of all
Spanner
objects (or Spanner subclasses) that contain this element.getTimeSignatures
(*[, searchContext, …])Collect all
TimeSignature
objects in this stream.hasElement
(obj)Return True if an element, provided as an argument, is contained in this Stream.
hasElementOfClass
(className[, forceFlat])Given a single class name as string, return True or False if an element with the specified class is found.
hasMeasures
()Return a boolean value showing if this Stream contains Measures.
hasPartLikeStreams
()Return a boolean value showing if this Stream contains any Parts, or Part-like sub-Streams.
hasVoices
()Return a boolean value showing if this Stream contains Voices
haveAccidentalsBeenMade
()If Accidentals.displayStatus is None for all contained pitches, it as assumed that accidentals have not been set for display and/or makeAccidentals has not been run.
index
(el)Return the first matched index for the specified object.
informSites
([changedInformation])trigger called whenever sites need to be informed of a change in the parameters of this object.
insert
(offsetOrItemOrList[, itemOrNone, …])Inserts an item(s) at the given offset(s).
insertAndShift
(offsetOrItemOrList[, itemOrNone])Insert an item at a specified or native offset, and shift any elements found in the Stream to start at the end of the added elements.
insertIntoNoteOrChord
(offset, noteOrChord[, …])Insert a Note or Chord into an offset position in this Stream.
invertDiatonic
([inversionNote, inPlace])inverts a stream diatonically around the given note (by default, middle C)
isClassOrSubclass
(classFilterList)Given a class filter list (a list or tuple must be submitted), which may have strings or class objects, determine if this class is of the provided classes or a subclasses.
isSequence
()A stream is a sequence if it has no overlaps.
isTwelveTone
()Return true if this Stream only employs twelve-tone equal-tempered pitch values.
isWellFormedNotation
()Return True if, given the context of this Stream or Stream subclass, contains what appears to be well-formed notation.
lyrics
([ignoreBarlines, recurse, skipTies])Returns a dict of lists of lyric objects (with the keys being the lyric numbers) found in self.
makeAccidentals
(*[, pitchPast, …])A method to set and provide accidentals given various conditions and contexts.
makeBeams
(*[, inPlace])Return a new Stream, or modify the Stream in place, with beams applied to all notes.
makeChords
([minimumWindowSize, …])TO BE DEPRECATED SOON! Use Chordify instead!
makeImmutable
()Clean this Stream: for self and all elements, purge all dead locations and remove all non-contained sites.
makeMeasures
([meterStream, …])Return a new stream (or if inPlace=True change in place) this Stream so that it has internal measures.
makeNotation
([meterStream, …])This method calls a sequence of Stream methods on this Stream to prepare notation, including creating voices for overlapped regions, Measures if necessary, creating ties, beams, and accidentals.
makeRests
([refStreamOrTimeRange, fillGaps, …])Calls
makeRests()
.makeTies
([meterStream, inPlace, …])Calls
makeTies()
.makeVariantBlocks
()from music21 import *
makeVoices
(*[, inPlace, fillGaps])If this Stream has overlapping Notes or Chords, this method will isolate all overlaps in unique Voices, and place those Voices in the Stream.
measure
(measureNumber[, collect, …])Given a measure number, return a single
Measure
object if the Measure number exists, otherwise return None.measureOffsetMap
([classFilterList])If this Stream contains Measures, provide an OrderedDict whose keys are the offsets of the start of each measure and whose values are a list of references to the
Measure
objects that start at that offset.measures
(numberStart, numberEnd[, collect, …])Get a region of Measures based on a start and end Measure number where the boundary numbers are both included.
melodicIntervals
(*skipArgs, **skipKeywords)Returns a Stream of
Interval
objects between Notes (and by default, Chords) that follow each other in a stream.mergeAttributes
(other)Merge relevant attributes from the Other stream into this one.
mergeElements
(other[, classFilterList])Given another Stream, store references of each element in the other Stream in this Stream.
metronomeMarkBoundaries
([srcObj])Return a list of offset start, offset end, MetronomeMark triples for all TempoIndication objects found in this Stream or a Stream provided by srcObj.
next
([className, activeSiteOnly])Get the next element found in the activeSite (or other Sites) of this Music21Object.
offsetMap
([srcObj])Returns a list where each element is a NamedTuple consisting of the ‘offset’ of each element in a stream, the ‘endTime’ (that is, the offset plus the duration) and the ‘element’ itself.
playingWhenAttacked
(el[, elStream])Given an element (from another Stream) returns the single element in this Stream that is sounding while the given element starts.
plot
(*args, **keywords)Given a method and keyword configuration arguments, create and display a plot.
pop
(index)Return and remove the object found at the user-specified index value.
previous
([className, activeSiteOnly])Get the previous element found in the activeSite or other .sites of this Music21Object.
purgeLocations
([rescanIsDead])Remove references to all locations in objects that no longer exist.
purgeOrphans
([excludeStorageStreams])A Music21Object may, due to deep copying or other reasons, have a site (with an offset) which no longer contains the Music21Object.
quantize
([quarterLengthDivisors, …])Quantize time values in this Stream by snapping offsets and/or durations to the nearest multiple of a quarter length value given as one or more divisors of 1 quarter length.
recurse
(*[, streamsOnly, …]).recurse() is a fundamental method of music21 for getting into elements contained in a Score, Part, or Measure, where elements such as notes are contained in sub-Stream elements.
remove
(targetOrList, *[, shiftOffsets, recurse])Remove an object from this Stream.
removeByClass
(classFilterList)Remove all elements from the Stream based on one or more classes given in a list.
removeByNotOfClass
(classFilterList)Remove all elements not of the specified class or subclass in the Steam in place.
repeatAppend
(item, numberOfTimes)Given an object and a number, run append that many times on a deepcopy of the object.
repeatInsert
(item, offsets)Given an object, create a deep copy of each object at each positions specified by the offset list:
replace
(target, replacement, *[, recurse, …])Given a target object, replace it with the supplied replacement object.
scaleDurations
(amountToScale, *[, inPlace])Scale all durations by a provided scalar.
scaleOffsets
(amountToScale, *[, anchorZero, …])Scale all offsets by a multiplication factor given in amountToScale.
setDerivationMethod
(derivationMethod[, recurse])Sets the .derivation.method for each element in the Stream if it has a .derivation object.
setElementOffset
(element, offset, *[, …])Sets the Offset for an element, very quickly.
setOffsetBySite
(site, value)Change the offset for a site.
shiftElements
(offset[, startOffset, …])Add the given offset value to every offset of the objects found in the Stream.
show
([fmt, app])Displays an object in a format provided by the fmt argument or, if not provided, the format set in the user’s Environment
showVariantAsOssialikePart
(containedPart, …)Takes a part within the score and a list of variant groups within that part.
simultaneousAttacks
(stream2)returns an ordered list of offsets where elements are started (attacked) at the same time in both self and stream2.
sliceAtOffsets
(offsetList[, target, …])Given a list of quarter lengths, slice and optionally tie all Music21Objects crossing these points.
sliceByBeat
([target, addTies, inPlace, …])Slice all elements in the Stream that have a Duration at the offsets determined to be the beat from the local TimeSignature.
sliceByGreatestDivisor
(*[, addTies, inPlace])Slice all
Duration
objects on all Notes and Rests of this Stream.sliceByQuarterLengths
(quarterLengthList, *)Slice all
Duration
objects on all Notes and Rests of this Stream.sort
([force])Sort this Stream in place by offset, then priority, then standard class sort order (e.g., Clefs before KeySignatures before TimeSignatures).
sortTuple
([useSite, raiseExceptionOnMiss])Returns a collections.namedtuple called SortTuple(atEnd, offset, priority, classSortOrder, isNotGrace, insertIndex) which contains the six elements necessary to determine the sort order of any set of objects in a Stream.
splitAtDurations
()Takes a Music21Object (e.g., a note.Note) and returns a list of similar objects with only a single duration.DurationTuple in each.
splitAtQuarterLength
(quarterLength[, …])This method overrides the method on Music21Object to provide similar functionality for Streams.
splitByClass
(classObj, fx)Given a stream, get all objects of type classObj and divide them into two new streams depending on the results of fx.
splitByQuarterLengths
(quarterLengthList[, …])Given a list of quarter lengths, return a list of Music21Object objects, copied from this Music21Object, that are partitioned and tied with the specified quarter length list durations.
storeAtEnd
(itemOrList[, ignoreSort])Inserts an item or items at the end of the Stream, stored in the special box (called _endElements).
stripTies
([inPlace, matchByPitch, …])Find all notes that are tied; remove all tied notes, then make the first of the tied notes have a duration equal to that of all tied constituents.
template
([fillWithRests, removeClasses, …])Return a new Stream based on this one, but without the notes and other elements but keeping instruments, clefs, keys, etc.
toSoundingPitch
(*[, inPlace])If not at sounding pitch, transpose all Pitch elements to sounding pitch.
toWrittenPitch
(*[, inPlace])If not at written pitch, transpose all Pitch elements to written pitch.
transferOffsetToElements
()Transfer the offset of this stream to all internal elements; then set the offset of this stream to zero.
transpose
(value[, inPlace, recurse, …])Transpose all specified classes in the Stream by the user-provided value.
voicesToParts
(*[, separateById])If this Stream defines one or more voices, extract each into a Part, returning a Score.
write
([fmt, fp])Write out a file of music notation (or an image, etc.) in a given format.
makeMutable
-
score_model.m21utils.
correct_tuplet
(tuplets_list)¶ Correct the sequential tuplet structure.
It seems that the import from musicxml in music21 set some “start” elements as None (that is then converted in “continue” in our representation). This function handle this problem setting it back to “start”.
- Args:
tuplets_list (list): the sequential structure of tuplets
- Raises:
TypeError: Other errors are presents in the input tuplet_list.
- Returns:
list: a corrected sequential structure for tuplets.
-
score_model.m21utils.
get_accidental_number
(acc)¶ Get an integer from a music21 accidental (e.g. # is +1 and bb is -2).
-
score_model.m21utils.
get_beams
(gn)¶ Return the (part of) beamings on top of a general note.
The beamings are expressed as a list of strings “start”, “continue” and “stop.
- Args:
gn (GeneralNote): the music21 general note (e.g. note, rest or chord).
- Returns:
list: the list of beamings.
-
score_model.m21utils.
get_dots
(gn)¶ Get the number of dots from a general note.
-
score_model.m21utils.
get_note_head
(gn)¶ Get a number encoding the note-head.
A note-head is encoded as an integer, where 4,2,1 encode respectively a quarter note, a half note and a whole note. Shorter durations are not encoded in the head (but in beamings and tuplets). Rests are considered as notes for simplicity, i.e. there is not type 8, even if it exist a different head symbol for rests.
- Args:
gn (GeneralNote): a music21 general note
- Returns:
int: the integer encoding the note-head
-
score_model.m21utils.
get_tuplets
(gn)¶ Return the (part of) tuplets on top of a general note.
The tuplets are expressed as a list of strings “start”, “continue” and “stop.
- Args:
gn (GeneralNote): the music21 general note (e.g. note, rest or chord).
- Returns:
list: the list of tuplets.
-
score_model.m21utils.
get_tuplets_info
(gn)¶ Create a list with the string that is on the tuplet bracket.
-
score_model.m21utils.
get_type_number
(gn)¶ Get the music21 type number for a generalnote (and correct an MusicXML import problem by setting a default).
-
score_model.m21utils.
gn2label
(gn)¶ Get a label that uniquely identify a general note (not considering tuplets or beamings).
The label is a tuple of length 4 that contains: pitches (list), note-head (integer), dots (integer) and grace-note (bool).
- Args:
gn (Generalnote): the music21 general note (e.g. note, rest or chord).
- Returns:
tuple: the label.
-
score_model.m21utils.
gn2pitches_list
(gn)¶ Get the list of pitches in a general note.
Pitches is a list where each element is a dictionary with keys: “npp” (string): natural pitch position (the pitch without accidentals), “acc” (int) : accidentals (e.g. # is +1 and bb is -1), “tie” (bool): if the gnote is tied to the precedent gnote.
- Args:
gn (GeneralNote): the music21 general note.
- Returns:
list: a list of dictionaries representing pitches.
-
score_model.m21utils.
is_grace
(gn)¶ Get a boolean from a general note saying if it is a grace note.
-
score_model.m21utils.
is_tied
(note)¶ Get a boolean from a general note saying if it is tied to the previous gnote.
-
score_model.m21utils.
m21_2_notationtree
(gn_list, tree_type)¶ Generate a notation tree from a list of music21 general notes corresponding to the gns in a voice in a measure.
- Args:
gn_list (list): a list of music21 GeneralNote objects tree_type (string): either “beamings” or “tuplets”
- Returns:
NotationTree : the notation tree (NT or TT)
-
score_model.m21utils.
m21_2_seq_struct
(gn_list, struct_type)¶ Generate a sequential representation of the structure (beamings and tuplets) from the general notes in a single measure (and a single voice).
The function gives two outputs: seq_structure and internal_nodes info. The latter contains the tuplet numbers, but it is still present for beamings as empty list of lists.
- Args:
gn_list (list of generalNotes): a list of music21 general notes in a measure (and a single voice) struct_type (string): either “beamings” or “tuplets”
- Raises:
TypeError: if struct_type is not “beamings” nor “tuplets”
- Returns:
couple: (seq_structure, grouping_info)
-
score_model.m21utils.
m21tuple_from_info
(tuplet_info)¶ Generate a m21.duration.Tuplet object from our string description (for a single general note).
Examples are “3B”, “3:2”, “5:4B” where the B means that the bracket is displayed.
- Args:
tuplet_info (string): the description of the tuplet for a single general note
- Returns:
m21.duration.Tuplet: the m21 tuplet object
-
score_model.m21utils.
add_nt_to_score
(score)¶ Takes any m21 score, reorganizes it, and compute notation trees
-
score_model.m21utils.
nt2general_notes
(nt, tt)¶ Generate a list of music21 generalNote from a couple (beaming tree, couple tree).
WARNING: the attribute tie cannot be correctly set on the first note. Remember to run the method set_ties() when the entire voice is ready.
- Args:
nt (NotationTree): A notation tree of type “beamings” tt (NotationTree): A notation tree of type “tuplets”
- Returns:
list: a list of music21 GeneralNote
-
score_model.m21utils.
nt2inter_gn_groupings
(nt)¶ Return the number of grouping ``between’’ two adjacent notes.
For beamings trees this is the number of beams connecting two adjacent notes.
- Args:
nt (NotationTree): A notation tree, either beaming tree or tuplet tree.
- Returns:
list: A list of length [number_of_leaves - 1], with integers.
-
score_model.m21utils.
nt2over_gn_groupings
(nt)¶ Return the number of grouping ``over’’ a note.
For beamings trees this is the number of beams over each note.
- Args:
nt (NotationTree): A notation tree, either beaming tree or tuplet tree.
- Returns:
list: A list of length [number_of_leaves], with integers.
-
score_model.m21utils.
nt2seq_structure
(nt)¶ Create the sequential representation of groupings from a notation tree (hierarchical representation).
In particular the functions generates two outputs. seq_structure : a nested list of length [number_of_leaves] in the nt, with “start”,”stop” and “continue” elements depending on the tree structure; grouping_info : a nested list of length [number_of_leaves] with the grouping info. The latter corresponds for tuplets to the tuplet name in the bracket (and B if the bracket is visible), but it is computed also for beamings, as list of empty strings, to preserve the similarity.
- Args:
nt (NotationTree): A notation tree, either beaming tree or tuplet tree.
- Returns:
couple: (seq_structure,grouping_info)
-
score_model.m21utils.
reconstruct
(score)¶ This function ensures that the score is systematically of the structure : Score -> Part -> Measure -> Voice It recursively goes through the whole score, if the type of stream is not as expected, a new stream is inserted.
Args: score (m21.stream) : a stream of m21 objects
-
score_model.m21utils.
score_notation_tree
(score)¶ Replaces the voices with score model voices
-
score_model.m21utils.
window
(seq, n=2)¶ Return a sliding window (of width n) over data.
-
class
score_model.bar_trees.
InternalNode
(parent, label)¶ The class for the Internal node, extending Node.
Methods
add_child
(child)Add a children to the node.
complete
()Return true if all the subtree under the node either have children or are LeafNodes
subtree_leaves
()Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
subtree_size
()Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
to_string
()Return the string representation of the subtree under the Node.
atomic
has_children
not_atomic
not_unary
unary
-
class
score_model.bar_trees.
LeafNode
(parent, label)¶ The class for the Leaf node, extending Node.
Methods
add_child
(child)Add a children to the node.
complete
()Return true if all the subtree under the node either have children or are LeafNodes
Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
Return the string representation of the subtree under the Node.
atomic
has_children
not_atomic
not_unary
unary
-
subtree_leaves
()¶ Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
-
subtree_size
()¶ Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
-
to_string
()¶ Return the string representation of the subtree under the Node. This class is overridden in LeafNode to make the recursion stop.
-
-
class
score_model.bar_trees.
Node
(parent, type, label=None)¶ The generic Tree node class.
Methods
add_child
(child)Add a children to the node.
complete
()Return true if all the subtree under the node either have children or are LeafNodes
Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
Return the string representation of the subtree under the Node.
atomic
has_children
not_atomic
not_unary
unary
-
add_child
(child)¶ Add a children to the node. Not really useful in standard utilisation, as a new node is added to the children list when it is created.
-
complete
()¶ Return true if all the subtree under the node either have children or are LeafNodes
-
subtree_leaves
()¶ Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
-
subtree_size
()¶ Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
-
to_string
()¶ Return the string representation of the subtree under the Node. This class is overridden in LeafNode to make the recursion stop.
-
-
class
score_model.bar_trees.
NotationTree
(root, tree_type=None, quality_check=True)¶ The class for the Notation Tree.
Two kinds of notation trees exist: beaming tree (BT) and tuplet tree (TT), encoding in the tree structure respectively the beaming and the tuplet information in a voice in a measure. The information about the notes are encoded in leaves and the same for the BT and the TT of a voice in a measure.
This class just provide functions on top of the Node structure.
Methods
get_ancestors
(node)Get a list of all the ancestors in the tree of a node.
get_depth
(node)Return the depth of a node in the tree.
get_lca
(node1, node2)Get the lower common ancestor (lca) of two input nodes.
get_leaf_nodes
([local_root])Return a list with all Leaf Nodes in the tree.
get_nodes
([local_root])Return a list with all nodes in the tree.
show
([save, name])Print a graphical version of the tree.
to_string
-
show
(save=False, name='tree')¶ Print a graphical version of the tree.
- Args:
save (bool, optional): save the image as a file. Defaults to False. name (str, optional): the file name. Defaults to “tree”. simplify_label (function, optional): a function to simplify the tree labels for a clear visualization. Defaults is a function that does nothing.
- Returns:
Digraph: the digraph object
-
-
class
score_model.bar_trees.
RhythmTree
(root, quality_check=True)¶ The class for Rhythm Trees.
Each node encode a specific duration that is divided equally between his children. Each LeafNode has a label that contains a list of general notes. Each general note is a list of pitches expressed as MIDI numbers.
This class give functions on top of the Node structure.
Methods
get_ancestors
(node)Get a list of all the ancestors in the tree of a node.
get_depth
(node)Return the depth of a node in the tree.
get_lca
(node1, node2)Get the lower common ancestor (lca) of two input nodes.
get_leaf_nodes
([local_root])Return a list with all Leaf Nodes in the tree.
get_nodes
([local_root])Return a list with all nodes in the tree.
show
([save, name, simplify_label])Print a graphical version of the tree.
get_leaves_timestamps
get_timeline
node_duration
to_string
-
class
score_model.bar_trees.
Root
¶ The class for the Root node (e.g. without parent), extending Node.
Methods
add_child
(child)Add a children to the node.
complete
()Return true if all the subtree under the node either have children or are LeafNodes
subtree_leaves
()Return the number of leaves in the subtree under the node.This class is overridden in LeafNode to make the recursion stop.
subtree_size
()Return the number of nodes in the subtree under the node (counting also the node itself).This class is overridden in LeafNode to make the recursion stop.
to_string
()Return the string representation of the subtree under the Node.
atomic
get_parent
has_children
not_atomic
not_unary
unary
-
class
score_model.bar_trees.
Tree
(root)¶ The generic class for trees
Methods
get_ancestors
(node)Get a list of all the ancestors in the tree of a node.
get_depth
(node)Return the depth of a node in the tree.
get_lca
(node1, node2)Get the lower common ancestor (lca) of two input nodes.
get_leaf_nodes
([local_root])Return a list with all Leaf Nodes in the tree.
get_nodes
([local_root])Return a list with all nodes in the tree.
show
([save, name, simplify_label])Print a graphical version of the tree.
to_string
-
get_ancestors
(node)¶ Get a list of all the ancestors in the tree of a node.
-
get_depth
(node)¶ Return the depth of a node in the tree.
-
get_lca
(node1, node2)¶ Get the lower common ancestor (lca) of two input nodes.
- Args:
node1 (Node): the first node to consider. node2 (Node): the second node to consider.
- Returns:
Node: the lca of the input nodes.
-
get_leaf_nodes
(local_root=None)¶ Return a list with all Leaf Nodes in the tree.
-
get_nodes
(local_root=None)¶ Return a list with all nodes in the tree.
-
show
(save=False, name='tree', simplify_label=<function Tree.<lambda>>)¶ Print a graphical version of the tree.
- Args:
save (bool, optional): save the image as a file. Defaults to False. name (str, optional): the file name. Defaults to “tree”. simplify_label (function, optional): a function to simplify the tree labels for a clear visualization. Defaults is a function that does nothing.
- Returns:
Digraph: the digraph object
-
-
score_model.bar_trees.
accidental2string
(acc_number)¶ Return a string repr of accidentals.
-
score_model.bar_trees.
dot2string
(dot)¶ Return a string repr of dots.
-
score_model.bar_trees.
gracenote2string
(gracenote)¶ Return a string repr of a gracenote.
-
score_model.bar_trees.
simplify_label
(label)¶ Create a simple string representation of the notation tree leaf node labels for a better visualization.
- Args:
label (tuple): the label of a leaf node in a notation tree
- Returns:
string: a simple but still unique representation of the leaf
-
score_model.bar_trees.
tie2string
(tie)¶ Return a string repr of a tie.
-
score_model.bar_trees.
timeline2rt
(tim: score_model.music_sequences.Timeline, allowed_divisions=[2, 3], max_depth=7, div_preferences=None)¶ Generate a Rhythm Tree from a timeline.
- Args:
tim (Timeline): the input timeline. allowed_divisions (list, optional): division to consider. Defaults to [2, 3]. max_depth (int, optional): maximum depth to consider. Defaults to 7. div_preferences ([type], optional): different depth may have different preferred div values. Defaults to None.
- Returns:
RhythmTree: the rhythm tree.
-
score_model.music_sequences.
musical_split
(seq, k: int)¶ Split a sequence of musical events in the interval [0,1[ in subsequences and rescale them.
This function add the beginning of the interval. For example music splitting the sequence [0,0.25,0.75] in 2 parts generates two arrays [0,0.5], [0,0.5]
- Args:
seq (list): the input list of temporal postion of musical events k (int): the number of intervals
-
score_model.music_sequences.
split_content
(seq, k: int, interval=(0, 1))¶ Split the content of a sorted array in equal intervals.
For an interval (a,b) it will split at positions [Fraction(i, k) * a + b) for i in range(1, k)]. For example for the interval (0,2) with k=4, it will split at 0.5,1,1.5. WARNING: the sequence should contains Fraction with limit_denominator to avoid rounding problems. Also problematic fractions like 0.1 could create problems
- Args:
seq (list): the input list of numbers k (int): the number of intervals
- Returns:
list: A list of intervals
-
class
score_model.score_model.
ScoreModel
(m21_score, auto_format=True, produce_trees=False)¶ Class that represent a score


Admin
Configuration
Vendor Configuration
Part Configuration
Product Configuration
Logout
Core
Dashboard
Interface
Stock Analysis
Inwards
Outwards
Production
Rejection
{% block body %} {% endblock %}


...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Root Pointer introduces the concept of set where it is defined to be a one or many memory blocks referencing each other allocated on the heap pointed to by one or many root_ptr<T>s allocated elsewhere by the application. Each set is consequently composed of a list of all memory blocks constituting it and a node_proxy linking each allocation and other potential node_proxys. For example:
Therefore whenever a node_proxy contained within a root_ptr<T> is about to be destroyed, the deallocation of each memory block composing the set is enforced. Thus whether the set was composed of memory blocks referencing each other in a cyclic way or not, all of them will be subject to destruction and deallocation indifferent from the cyclicism problem presented by the reference counters. As we can see in the following example, the node_proxy is destroyed and consequently every elements composing the set will be destructed and deallocated as well:
A set will be unified with another set whenever one of its member is found to reference a member from a different set. Once two sets are unified they will stay unified even if the new reference responsible for unifying the sets is once again disjointed.
Revised 22 March, 2016
Copyright © 2011-2016 Phil Bouchard
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


{% load staticfiles %} {% load tz %} {% block saml_content %} {% if not user_details.NIH_username or not user_details.NIH_active %} {# No eRA account OR no current dbGaP access #} {% if not user_details.NIH_username %}
Apply for dbGaP Authorized Access to access underlying Level 1 genomics data.
Associate with eRA Commons Account
{% else %}Log in with your NIH identity: {{ user_details.NIH_username }}
Unlink {{ user_details.email }} from the NIH identity: {{ user_details.NIH_username }}
{% endif %} {% elif not user_details.dbGaP_authorized %} {# no dbGaP #}eRA Account Authenticated
Congratulations, {{ user_details.NIH_username }}! Your eRA account has been authenticated. Now we need to verify if you have dbGaP authorization. This process may take up to 24 hours.
How to Apply for dbGaP Access {% else %} {# Both authorized #}dbGaP Access Authorized
Congratulations, {{ user_details.NIH_username }}! You now have access to the following ISB-CGC controlled dataset{% if user_datasets_count > 1 %}s{% endif %}:
Your access is valid until:
Extend controlled access period to 24 hours from now.
{% else %}Congratulations, {{ user_details.NIH_username }}! You are successfully authorized with dbGaP. Your access is valid until:
Extend controlled access period to 24 hours from now.
We do not currently have any authorized datasets on record for this NIH username. If you believe this is in error, please contact dbGaP and inquire as to your status on the dataset whitelists.
{% endif %} {% endwith %} {% endif %} {% if membership %}You are a member of the group isb-cgc-cntl. View bucket contents
{% endif %} {# If we're associated with an NIH account but not active, include the unlinking dialog #} {% if user_details.NIH_username and not user_details.NIH_active %} {% endif %} {% endblock %}


Next: aref, Previous: adjust-array, Up: Arrays Dictionary
adjustable-array-p
array ⇒ generalized-boolean
array—an array.
generalized-boolean—a generalized boolean.
Returns true if and only if adjust-array could return a value which is identical to array when given that array as its first argument.
(adjustable-array-p (make-array 5 :element-type 'character :adjustable t :fill-pointer 3)) ⇒ true (adjustable-array-p (make-array 4)) ⇒ implementation-dependent
Should signal an error of type type-error if its argument is not an array.


| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | 1× | // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. import * as Q from "q"; import * as path from "path"; import * as url from "url"; import * as cp from "child_process"; import * as fs from "fs"; import {ScriptImporter, DownloadedScript} from "./scriptImporter"; import { logger } from "vscode-chrome-debug-core"; import { ErrorHelper } from "../common/error/errorHelper"; import { IDebuggeeWorker, RNAppMessage } from "./appWorker"; import { RemoteExtension } from "../common/remoteExtension"; import { InternalErrorCode } from "../common/error/internalErrorCode"; import { getLoggingDirectory } from "../extension/log/LogHelper"; function printDebuggingError(error: Error, reason: any) { const nestedError = ErrorHelper.getNestedError(error, InternalErrorCode.DebuggingWontWorkReloadJSAndReconnect, reason); logger.error(nestedError.message); } /** This class will run the RN App logic inside a forked Node process. The framework to run the logic is provided by the file * debuggerWorker.js (designed to run on a WebWorker). We add a couple of tweaks (mostly to polyfill WebWorker API) to that * file and load it inside of a process. * On this side we listen to IPC messages and either respond to them or redirect them to packager via MultipleLifetimeAppWorker's * instance. We also intercept packager's signal to load the bundle's code and mutate the message with path to file we've downloaded * to let importScripts function take this file. */ export class ForkedAppWorker implements IDebuggeeWorker { protected scriptImporter: ScriptImporter; protected debuggeeProcess: cp.ChildProcess | null = null; /** A deferred that we use to make sure that worker has been loaded completely defore start sending IPC messages */ protected workerLoaded = Q.defer<void>(); private bundleLoaded: Q.Deferred<void>; private remoteExtension: RemoteExtension; private logWriteStream: fs.WriteStream; private logDirectory: string | null; constructor( private packagerAddress: string, private packagerPort: number, private sourcesStoragePath: string, private projectRootPath: string, private postReplyToApp: (message: any) => void, private packagerRemoteRoot?: string, private packagerLocalRoot?: string ) { this.scriptImporter = new ScriptImporter(this.packagerAddress, this.packagerPort, this.sourcesStoragePath, this.packagerRemoteRoot, this.packagerLocalRoot); this.remoteExtension = RemoteExtension.atProjectRootPath(this.projectRootPath); this.remoteExtension.api.Debugger.onShowDevMenu(() => { this.postMessage({ method: "vscode_showDevMenu", }); }); this.remoteExtension.api.Debugger.onReloadApp(() => { this.postMessage({ method: "vscode_reloadApp", }); }); } public stop() { if (this.debuggeeProcess) { logger.verbose(`About to kill debuggee with pid ${this.debuggeeProcess.pid}`); this.debuggeeProcess.kill(); this.debuggeeProcess = null; } } public start(): Q.Promise<number> { let scriptToRunPath = path.resolve(this.sourcesStoragePath, ScriptImporter.DEBUGGER_WORKER_FILENAME); const port = Math.round(Math.random() * 40000 + 3000); // Note that we set --inspect-brk flag to pause the process on the first line - this is // required for debug adapter to set the breakpoints BEFORE the debuggee has started. // The adapter will continue execution once it's done with breakpoints. // --no-deprecation flag disables deprecation warnings like "[DEP0005] DeprecationWarning: Buffer() is deprecated..." and so on that leads to errors in native app // https://nodejs.org/dist/latest-v7.x/docs/api/cli.html const nodeArgs = [`--inspect-brk=${port}`, "--no-deprecation", scriptToRunPath]; // Start child Node process in debugging mode // Using fork instead of spawn causes breakage of piping between app worker and VS Code debug console, e.g. console.log() in application // wouldn't work. Please see https://github.com/microsoft/vscode-react-native/issues/758 this.debuggeeProcess = cp.spawn("node", nodeArgs, { stdio: ["pipe", "pipe", "pipe", "ipc"], }) .on("message", (message: any) => { // 'workerLoaded' is a special message that indicates that worker is done with loading. // We need to wait for it before doing any IPC because process.send doesn't seems to care // about whether the message has been received or not and the first messages are often get // discarded by spawned process if (message && message.workerLoaded) { this.workerLoaded.resolve(void 0); return; } this.postReplyToApp(message); }) .on("error", (error: Error) => { printDebuggingError(ErrorHelper.getInternalError(InternalErrorCode.ReactNativeWorkerProcessThrownAnError), error); }); // If special env variables are defined, then write process outputs to file this.logDirectory = getLoggingDirectory(); if (this.logDirectory) { this.logWriteStream = fs.createWriteStream(path.join(this.logDirectory, "nodeProcessLog.txt")); this.logWriteStream.on("error", err => { logger.error(`Error creating log file at path: ${this.logDirectory}. Error: ${err.toString()}\n`); }); this.debuggeeProcess.stdout.pipe(this.logWriteStream); this.debuggeeProcess.stderr.pipe(this.logWriteStream); this.debuggeeProcess.on("close", () => { this.logWriteStream.end(); }); } // Resolve with port debugger server is listening on // This will be sent to subscribers of MLAppWorker in "connected" event logger.verbose(`Spawned debuggee process with pid ${this.debuggeeProcess.pid} listening to ${port}`); return Q.resolve(port); } public postMessage(rnMessage: RNAppMessage): Q.Promise<RNAppMessage> { // Before sending messages, make sure that the worker is loaded const promise = this.workerLoaded.promise .then(() => { if (rnMessage.method !== "executeApplicationScript") { // Before sending messages, make sure that the app script executed if (this.bundleLoaded) { return this.bundleLoaded.promise.then(() => { return rnMessage; }); } else { return rnMessage; } } else { this.bundleLoaded = Q.defer<void>(); // When packager asks worker to load bundle we download that bundle and // then set url field to point to that downloaded bundle, so the worker // will take our modified bundle if (rnMessage.url) { const packagerUrl = url.parse(rnMessage.url); packagerUrl.host = `${this.packagerAddress}:${this.packagerPort}`; rnMessage = { ...rnMessage, url: url.format(packagerUrl), }; logger.verbose(`Packager requested runtime to load script from ${rnMessage.url}`); return this.scriptImporter.downloadAppScript(<string>rnMessage.url, this.projectRootPath) .then((downloadedScript: DownloadedScript) => { this.bundleLoaded.resolve(void 0); return Object.assign({}, rnMessage, { url: `${this.pathToFileUrl(downloadedScript.filepath)}`}); }); } else { throw ErrorHelper.getInternalError(InternalErrorCode.RNMessageWithMethodExecuteApplicationScriptDoesntHaveURLProperty); } } }); promise.done( (message: RNAppMessage) => { if (this.debuggeeProcess) { this.debuggeeProcess.send({ data: message }); } }, (reason) => printDebuggingError(ErrorHelper.getInternalError(InternalErrorCode.CouldntImportScriptAt, rnMessage.url), reason)); return promise; } // TODO: Replace by url.pathToFileURL method when Node 10 LTS become deprecated public pathToFileUrl(url: string) { const filePrefix = process.platform === "win32" ? "file:///" : "file://"; return filePrefix + url; } } |


Fleet Formation
Help Me Pick New Logo Through 3 April 2016!
I am in the process of running a logo design contest on 99designs and have created a poll with 6 of the best logo designs I've received. I would love for you to vote on the logo design. It only takes a minute.
Like Sci-Fi? Read My New Online Fiction Series.
Do you like Sci-Fi? While I finish up my next novel, I have started an online fiction series called Forbearance. Picking up from the canteen scene in Bellicose, we meet Keius Minjen, a postal marine, as he tries to survive the battle planet Guna to exact revenge and one day liberate his homeland.
Sign-up if you want me to send you news about upcoming installments of Forbearance or my other writings.
BEST SHIPS
Fighters – necessary cheap fodder – lots and lots will soak up damage in attack and defence and you need them for suiciding at enemy fighter defences. Far better armour per credit than anything else means you lose a lot less fleet if you have enough fighters with you. (a good amount of carriers/fleet carriers are important). If you play right, you will lose far more value of fighters than anything else.
Cruisers (best all round ship) – warp drives, decent speed, good armour per credit and strong enough to take out anything below p-rings and titans. Although you need more in the fleet to take out the big stuff cause the shield penetration is not so good, you will lose less than with Heavy Cruisers or bigger cause the armour per credit is better, shields are not really good value on any ship.
Heavy cruisers (pack more punch) – you never need anything bigger than heavy cruisers. They have some advantages over cruisers.. bombers and fighters are ineffective against them.. plus the high power means they penetrate heavy shields much better than cruisers so you don’t need as big a fleet to get the job done .. but you will lose more. Higher shields are not worth the increased cost of armour over cruisers in most sitiations. Slower than cruisers.
BEST FLEET COMPOSITIONS FOR ALL-ROUND ACTION
Cruisers + Carriers + Fighters (ratio.. 10 : 2 or more : lots.. full load + enough to come back and refill)
Heavy Cruisers + Fleet Carriers + Fighters (+ a few Battleships)
(always retreat carriers and recyclers before battle, then recall after)
Large numbers of destroyers or heavy bombers can make good additions to these fleets.. but be aware that they could be a liability and make sure you know what you are doing.
SPECIALIST SHIPS
Recyclers – get plenty. 5-10%25 of mobile fleet size (ie. what you can move away from your bases) is not too much
Scout ships – take a bunch with you when you send fleets to-far off places and always have a few spares at each base (or sit a bunch of them on each jumpgate). Moving a scout ahead so you can see your fleet’s landing zone is a good idea to avoid being ambushed. A single scout is unlikely to be seen on scanners (can only be seen 40s before it lands) but still, be careful not to give away your intentions. You can see every base in a region where you have a a ship. Guildmates can see every base in a system where you have a ship. Be aware of this when scouting for guildmates. Just cause you can see it doesn’t mean your guildmates can.. but you don’t need a scout right on the base.
Battleships – specialist.. you don’t need many till leviathans appear. They can destroy many fighters and bombers without a scratch. Also light defences. A single battleship can do a lot of damage, but against anything half decent heavy cruisers will be better value. No real weakness (cruisers can be owned by bombers and HC can be owned by heavy bombers, but ion bombers are too expensive to be much use). Put a few in your heavy cruiser fleets to pack a bit more punch, soak up a bit of repairable damage and add another element… they won’t die much behind a decent number of heavy cruisers.
Corvettes – fast attack.. useful to have a bunch around. a large amount is good for another layer of fodder to protect the more valuable ships when attacking (more layers are better, but they will get screwed on by enemy fighters when defending. Its much easier just to use fighters and carriers). Mostly useful for quick light action and killing enemy recyclers. Lack of warp drive lets them down.
Destroyers – good for another layer of fodder and for killing cruisers, but not necessary. no warp drive and slower than corvettes means they are of limited use. You can use them in large numbers to take out cruisers and heavy cruisers instead of heavy bombers. They cost more but don’t require hangar space and are less vulnerable but they will still get punished by a decent player with a lot of fighters.
Bombers types – can be good.. but they are tricky to use right (don’t attack anything with too many shields, and you have to use the right amount or you just throw them away). Vulnerable to being attacked. Careful use of bombers with the battle calculator can yield good results. Never use bombers for defence as any decent opponent will screw on them.
o Bombers – own Cruisers and smaller. Missile tech is cheap but is only useful for bombers.
o Heavy Bombers – own Heavy Cruisers and smaller. Plasma tech is more expensive.. but you need it for cruisers and heavy cruisers anyway. Once you have good plasma tech, normal bombers become mostly redundant.
o Ion bombers – are way to specialist to be of much use.  Maybe you want to take some along with your cruiser fleets as a bit of heavy shield penetration that doesn’t slow you down, but you’re probably better off just taking more cruisers. Ion tech is not nearly as important as plasma tech and it is more expensive.
- Larger Ships – can be good for the same reason as battleships.. they can take on entire smaller fleets without dying and they can soak up some repairable damage. Lack of speed and high cost lets them down so build few. The larger the ship, the more it can do on its own without taking critical damage.. but repair costs can be high and if it gets attacked while alone you could get seriously screwed over. Twice, I’ve lost a titan cause I fell asleep while it was inching its way towards the target Wink
frigates suck.


Photoshop script: scripting listener
When you are scripting in photoshop, you will notice not all operations you use in photoshop are found in the scripting reference. These operations can be used through the action manager (if the action is recordable).
»