Add one or more tracks.

        subtrack : Track or iterable of Tracks
431488
def add_tracks(self, subtracks):
        
        if isinstance(subtracks, BaseTrack):
            subtracks = [subtracks]
        for subtrack in subtracks:
            self.add_child(subtrack)
            self.subtracks.append(subtrack)
1234689
def add(self, s, c, track=False):
        
        return self._add(s, self.convert_list(c), track=track)
822028
def group(have)
      if have.track
        # Assign a custom track identifier if one was supplied
        have.subtitles.each { |subtitle| subtitle[:track] = have.track }
      elsif @haves.index(have) == 0 || @haves[@haves.index(have) - 1].subtitles.empty?
        # Otherwise let the path be the track identifier for the first subtitle
        have.subtitles.each { |subtitle| subtitle[:track] = have.file }
      else
        # For the 2nd+ subtitles determine the track association by detecting
        # collisions against the previously imported subtitles

        collisions = 0

        have.subtitles.each do |subtitle|
          @haves[@haves.index(have) - 1].subtitles.each do |previous_subtitle|
            collisions += 1 if (subtitle[:start] > previous_subtitle[:start] &&
                                subtitle[:start] < previous_subtitle[:end]) ||
                               (subtitle[:end] > previous_subtitle[:start] &&
                                subtitle[:end] < previous_subtitle[:end]) ||
                               (previous_subtitle[:start] > subtitle[:start] &&
                                previous_subtitle[:start] < subtitle[:end]) ||
                               (previous_subtitle[:end] > subtitle[:start] &&
                                previous_subtitle[:end] < subtitle[:end]) ||
                               (subtitle[:start] == previous_subtitle[:start] ||
                                subtitle[:end] == previous_subtitle[:end])
          end
        end

        if collisions.to_f / have.subtitles.length.to_f > 0.01
          # Add a new track if there are > 1% collisions between these
          # subtitles and the ones that were last imported
          have.subtitles.each { |subtitle| subtitle[:track] = have.file }
        else
          # Otherwise continue using the previous track identifier
          # (= Assume that these and the previous subtitles are one track)
          previous_track = @haves[@haves.index(have) - 1].subtitles.first[:track]
          have.subtitles.each { |subtitle| subtitle[:track] = previous_track }
        end
      end
    end
1241574
public Track[] getTracks() {
		List<Track> list = getComponentModel().tracks;
		return list == null ? null : list.toArray(new Track[]{});
	}
837843
def updateTraceCount(self):
        """"""
        self.ui.ntracesLbl.setNum(self.ui.trackview.model().traceCount())
1200945
private void associateToDetected( List<CombinedTrack<TD>> known ) {
		// initialize data structures
		detectedDesc.reset();
		knownDesc.reset();

		// create a list of detected feature descriptions
		int N = detector.getNumberOfFeatures();
		for( int i = 0; i < N; i++ ) {
			detectedDesc.add(detector.getDescription(i));
		}

		// create a list of previously created track descriptions
		for( CombinedTrack<TD> t : known ) {
			knownDesc.add(t.desc);
		}

		// associate features
		associate.setSource(knownDesc);
		associate.setDestination(detectedDesc);
		associate.associate();

		N = Math.max(known.size(),detector.getNumberOfFeatures());
		if( associated.length < N )
			associated = new boolean[N];
	}
410578
function TrackSkippedSchema() {
    /**
     * The track of value
     * @member
     * @type { Track }
     */
    this.track = Object.create(Track.prototype);
    /**
     * The album of value
     * @member
     * @type { Album }
     */
    this.album = Object.create(Album.prototype);

}
248403
function parseTrack(cursor) {
    var chunk, events = [],
        result, runningStatus = null;

    chunk = parseChunk('MTrk', cursor);

    while (!chunk.eof()) {
        result = parseEvent(chunk, runningStatus);
        runningStatus = result.runningStatus;

        events.push(result.event);
    }

    return new Track(events);
}
198891
void setPlayingTrack(int playingTrackPosition) {
        if (playingTrackPosition < 0 || playingTrackPosition >= mSoundCloudPlaylist.getTracks().size()) {
            throw new IllegalArgumentException("No tracks a the position " + playingTrackPosition);
        }
        mCurrentTrackIndex = playingTrackPosition;
    }
3188
def add2(self, target, path_settings, method):
        
        return self.add(method, path_settings, target)
3246
public void associateAllToDetected() {
		// initialize data structures
		List<CombinedTrack<TD>> all = new ArrayList<>();
		all.addAll(tracksReactivated);
		all.addAll(tracksDormant);
		all.addAll(tracksPureKlt);

		int numTainted = tracksReactivated.size() + tracksDormant.size();

		tracksReactivated.clear();
		tracksDormant.clear();

		// detect features
		detector.detect(input);
		// associate features
		associateToDetected(all);

		FastQueue<AssociatedIndex> matches = associate.getMatches();

		// See which features got respawned and which ones are made dormant
		for( int i = 0; i < numTainted; i++ ) {
			associated[i] = false;
		}

		for( AssociatedIndex a : matches.toList() ) {
			// don't mess with pure-KLT tracks
			if( a.src >= numTainted )
				continue;

			CombinedTrack<TD> t = all.get(a.src);

			t.set(detector.getLocation(a.dst));
			trackerKlt.setDescription((float) t.x, (float) t.y, t.track);
			tracksReactivated.add(t);
			associated[a.src] = true;
		}

		for( int i = 0; i < numTainted; i++ ) {
			if( !associated[i] ) {
				tracksDormant.add(all.get(i));
			}
		}
	}
1031358
def add_segments(self, segments):
        
        self.tracks.update([seg.track for seg in segments])
        self.segments.extend(segments)
942730
public void setTracks(final Track[] tracks) {
		List<Track> list = tracks == null ? null : Arrays.asList(tracks);
		getOrCreateComponentModel().tracks = list;
	}
4435
def remove_tracks(self, track_indices):
        
        if isinstance(track_indices, int):
            track_indices = [track_indices]
        self.tracks = [track for idx, track in enumerate(self.tracks)
                       if idx not in track_indices]
810486
def songs_add(self, songs):
		

		mutations = [mc_calls.TrackBatch.add(song) for song in songs]
		response = self._call(
			mc_calls.TrackBatch,
			mutations
		)

		success_ids = [
			res['id']
			for res in response.body['mutate_response']
			if res['response_code'] == 'OK'
		]

		return success_ids
838081
protected PointTrack addNewTrack( int setIndex, double x , double y , Desc desc ) {
		PointTrack p = getUnused();
		p.set(x, y);
		((Desc)p.getDescription()).setTo(desc);
		if( checkValidSpawn(setIndex,p) ) {
			p.setId = setIndex;
			p.featureId = featureID++;

			sets[setIndex].tracks.add(p);
			tracksNew.add(p);
			tracksActive.add(p);
			tracksAll.add(p);
			return p;
		} else {
			unused.add(p);
			return null;
		}
	}
887051
public void spawnTracksFromDetected() {
		// mark detected features with no matches as available
		FastQueue<AssociatedIndex> matches = associate.getMatches();

		int N = detector.getNumberOfFeatures();
		for( int i = 0; i < N; i++ )
			associated[i] = false;

		for( AssociatedIndex i : matches.toList() ) {
			associated[i.dst] = true;
		}

		// spawn new tracks for unassociated detected features
		for( int i = 0; i < N; i++ ) {
			if( associated[i])
				continue;

			Point2D_F64 p = detector.getLocation(i);

			TD d = detectedDesc.get(i);

			CombinedTrack<TD> track;

			if( tracksUnused.size() > 0 ) {
				track = tracksUnused.pop();
			} else {
				track = new CombinedTrack<>();
				track.desc = detector.createDescription();
				track.track = trackerKlt.createNewTrack();
			}

			// create the descriptor for tracking
			trackerKlt.setDescription((float)p.x,(float)p.y,track.track);
			// set track ID and location
			track.featureId = totalTracks++;
			track.desc.setTo(d);
			track.set(p);

			// update list of active tracks
			tracksPureKlt.add(track);
			tracksSpawned.add(track);
		}
	}