Transpose the notes in the bar up or down the interval.

        Call transpose() on all NoteContainers in the bar.
972388
def transpose(self, interval, up=True):
        
        for cont in self.bar:
            cont[2].transpose(interval, up)
549051
def transpose(self, *axes):
        """"""
        if self.ndim <= 1:
            return self
        ar = np.asarray(self).transpose(*axes)
        if axes[0] != 0:
            # then axis 0 is unaffected by the transposition
            newlabels = [self.labels[ax] for ax in axes]
            return Timeseries(ar, self.tspan, newlabels)
        else:
            return ar
1246001
function transpose() {
         var tmp,
             a = this.val;
         tmp = a[1];
         a[1] = a[3];
         a[3] = tmp;
         tmp = a[2];
         a[2] = a[6];
         a[6] = tmp;
         tmp = a[5];
         a[5] = a[7];
         a[7] = tmp;
         return this;
       }
1003933
def seventh(note, key):
    
    return triad(note, key) + [intervals.seventh(note, key)]
404393
def transpose(self, *args, **kwargs):
        
        nv.validate_transpose(args, kwargs)
        return self._constructor(
            self.values.T, index=self.columns, columns=self.index,
            default_fill_value=self._default_fill_value,
            default_kind=self._default_kind).__finalize__(self)
1206051
public function transpose()
	{
		$array	= array();
		$rowNumber		= $this->getRowNumber();
		$columnNumber	= $this->getColumnNumber();
		for( $row = 0; $row < $rowNumber; $row++ )
			for( $column = 0; $column < $columnNumber; $column++ )
				$array[$column][$row]	= $this->values[$row][$column];
		$this->rowNumber	= $columnNumber;
		$this->columnNumber	= $rowNumber;
		$this->values		= $array;
	}
1021354
public static void transpose( DMatrix3x3 m ) {
        double tmp;
        tmp = m.a12; m.a12 = m.a21; m.a21 = tmp;
        tmp = m.a13; m.a13 = m.a31; m.a31 = tmp;
        tmp = m.a23; m.a23 = m.a32; m.a32 = tmp;
    }
379682
public static void transpose( DMatrix5x5 m ) {
        double tmp;
        tmp = m.a12; m.a12 = m.a21; m.a21 = tmp;
        tmp = m.a13; m.a13 = m.a31; m.a31 = tmp;
        tmp = m.a14; m.a14 = m.a41; m.a41 = tmp;
        tmp = m.a15; m.a15 = m.a51; m.a51 = tmp;
        tmp = m.a23; m.a23 = m.a32; m.a32 = tmp;
        tmp = m.a24; m.a24 = m.a42; m.a42 = tmp;
        tmp = m.a25; m.a25 = m.a52; m.a52 = tmp;
        tmp = m.a34; m.a34 = m.a43; m.a43 = tmp;
        tmp = m.a35; m.a35 = m.a53; m.a53 = tmp;
        tmp = m.a45; m.a45 = m.a54; m.a54 = tmp;
    }
1058697
def transpose_note(note, transpose, scale="C"):
    
    val = note_to_val(note)
    val += transpose
    return val_to_note(val, scale)
339087
function seventh(note, key) {
	var arr = triad(note, key);
	arr.push(intervals.seventh(note, key));
	return arr;
}
894138
def play_note(note):
    """"""

    global text
    octave_offset = (note.octave - LOWEST) * width
    if note.name in WHITE_KEYS:

        # Getting the x coordinate of a white key can be done automatically

        w = WHITE_KEYS.index(note.name) * white_key_width
        w = w + octave_offset

        # Add a list containing the x coordinate, the tick at the current time
        # and of course the note itself to playing_w

        playing_w.append([w, tick, note])
    else:

        # For black keys I hard coded the x coordinates. It's ugly.

        i = BLACK_KEYS.index(note.name)
        if i == 0:
            w = 18
        elif i == 1:
            w = 58
        elif i == 2:
            w = 115
        elif i == 3:
            w = 151
        else:
            w = 187
        w = w + octave_offset
        playing_b.append([w, tick, note])

    # To find out what sort of chord is being played we have to look at both the
    # white and black keys, obviously:

    notes = playing_w + playing_b
    notes.sort()
    notenames = []
    for n in notes:
        notenames.append(n[2].name)

    # Determine the chord

    det = chords.determine(notenames)
    if det != []:
        det = det[0]
    else:
        det = ''

    # And render it onto the text surface

    t = font.render(det, 2, (0, 0, 0))
    text.fill((255, 255, 255))
    text.blit(t, (0, 0))

    # Play the note

    fluidsynth.play_Note(note, channel, 100)
1169654
def play_NoteContainer(self, notecontainer):
        
        if len(notecontainer) <= 1:
            [self.play_Note(x) for x in notecontainer]
        else:
            self.play_Note(notecontainer[0])
            self.set_deltatime(0)
            [self.play_Note(x) for x in notecontainer[1:]]
348650
def transpose(self):
        
        # Create an empty databox with the same headers and delimiter.
        d = databox(delimter=self.delimiter)
        self.copy_headers(d)
        
        # Get the transpose
        z = _n.array(self[:]).transpose()
        
        # Build the columns of the new databox
        for n in range(len(z)): d['c'+str(n)] = z[n]
        
        return d
747755
def set_up_down_bars(params = {})
      # Map border to line.
      [:up, :down].each do |up_down|
        if params[up_down]
          params[up_down][:line] = params[up_down][:border] if params[up_down][:border]
        else
          params[up_down] = {}
        end
      end

      # Set the up and down bar properties.
      @up_down_bars = {
        :_up => Chartline.new(params[:up]),
        :_down => Chartline.new(params[:down])
      }
    end
860882
def write_NoteContainer(file, notecontainer, bpm=120, repeat=0, verbose=False):
    """"""
    m = MidiFile()
    t = MidiTrack(bpm)
    m.tracks = [t]
    while repeat >= 0:
        t.set_deltatime('\x00')
        t.play_NoteContainer(notecontainer)
        t.set_deltatime("\x48")
        t.stop_NoteContainer(notecontainer)
        repeat -= 1
    return m.write_file(file, verbose)
120489
public void setMiddleNote(Note n) {
		//same note has middle, maybe with octave
		byte strictHeight = n.getStrictHeight();
		boolean set = false;
		if (strictHeight == getMiddleNote().getStrictHeight()) {
			set = true;
		} else {
			//some accepted cases
			Clef[] toCompare = null;
			if (isG()) {
				toCompare = new Clef[] { TREBLE, FRENCH_VIOLIN };
			} else if (isF()) {
				toCompare = new Clef[] { BASS, BARITONE };
			} else if (isC()) {
				toCompare = new Clef[] { SOPRANO, MEZZOSOPRANO, ALTO, TENOR };
			}
			if (toCompare != null) {
                for (Clef aToCompare : toCompare) {
                    if (strictHeight == aToCompare.getMiddleNote().getStrictHeight()) {
                        m_lineNumber = (byte) aToCompare.getLineNumber();
                        set = true;
                        break;
                    }
                }
			}
			//Accept any note as middle
			if (isPerc()) {
				set = true;
			}
		}
		if (set) {
			//if linenumber has changed, recompute middle note
			reset();
			//compute invisible octave transposition
			m_invisibleOctaveTransp =
				(byte)(n.getOctaveTransposition()
					- getMiddleNote().getOctaveTransposition());
			m_middleNote = n;
			reset();
		}
	}
457255
function (deltaTime, on, firstChannel, chord, velocity) {
  var arr = [];

  // Make note event for first note after appropriate time
  arr.push(makeNoteEvent(deltaTime, on, firstChannel, noteValue(_.first(chord)), velocity));

  // Make note event for rest of the notes
  _.each(_.rest(chord), function (note, i) {
    arr.push(makeNoteEvent(0, on, i + firstChannel, noteValue(note), velocity));
  });

  return Buffer.concat(arr);
}