Return an ordered list of the notes in this natural key.

    Examples:
    >>> get_notes('F')
    ['F', 'G', 'A', 'Bb', 'C', 'D', 'E']
    >>> get_notes('c')
    ['C', 'D', 'Eb', 'F', 'G', 'Ab', 'Bb']
555967
def get_notes(key='C'):
    
    if _key_cache.has_key(key):
        return _key_cache[key]
    if not is_valid_key(key):
        raise NoteFormatError("unrecognized format for key '%s'" % key)
    result = []

    # Calculate notes
    altered_notes = map(operator.itemgetter(0),
            get_key_signature_accidentals(key))

    if get_key_signature(key) < 0:
        symbol = 'b'
    elif get_key_signature(key) > 0:
        symbol = '#'

    raw_tonic_index = base_scale.index(key.upper()[0])

    for note in islice(cycle(base_scale), raw_tonic_index, raw_tonic_index+7):
        if note in altered_notes:
            result.append('%s%s' % (note, symbol))
        else:
            result.append(note)
    
    # Save result to cache
    _key_cache[key] = result
    return result
1340764
def _record_key(record: Record) -> List[Tuple[Column, str]]:
    ""
    return sorted(record.items())
495222
def get_notes(self):
        """"""
        for bar in self.bars:
            for beat, duration, notes in bar:
                yield beat, duration, notes
1169313
def notes(options = {})
      # Create a default 2 item hash and update if options is supplied
      options = {
        id:   nil,
        type: nil
      }.update(options)
      return nil if @_notes.nil?
      return nil if @_notes.empty?
      # Empty 2-D Hash to be used for notes found based on id and type
      notes_found = Hash.new do |h, k|
        # h is the id portion of the hash
        # k is the type portion of the hash
        h[k] = {}
      end
      # Filter @notes based off of the id
      filter_hash(@_notes, options[:id]).each do |id, hash|
        # Filter hash based off of the type
        filter_hash(hash, options[:type]).each do |type, note|
          # Store the note into note_found
          notes_found[id][type] = note
        end
      end
      if notes_found.empty?
        return nil
      elsif notes_found.size == 1
        notes_found.values.first.values.first
      else
        return notes_found
      end
    end
1068551
def object_list(self):
        

        def _sort(ob, ol):
            reverse = ob.startswith("-")
            ob = ob[1:] if reverse else ob
            for column in self.columns:
                if column.sort_key_fn is not None and column.name == ob:
                    return sorted(ol, key=column.sort_key_fn, reverse=reverse)
            if self._meta.order_by and hasattr(ol, "order_by"):
                return list(ol.order_by(*self._meta.order_by.split("|")))
            return ol

        ol = self._object_list
        ob = self._meta.order_by
        if not ob: return ol
        if isinstance(ob, basestring):
            return _sort(ob, ol)
        elif isinstance(ob, list):
            ob.reverse()
            for fn in ob:
                ol = _sort(fn, ol)
        return ol
707108
def keys(self):
        
        return sorted([k for k in dir(self) if
                       k[0:1] != '_' and k != 'keys' and not k.isupper() and
                       not inspect.ismethod(getattr(self, k)) and
                       not (hasattr(self.__class__, k) and
                            isinstance(getattr(self.__class__, k),
                                       property)) and
                       not isinstance(getattr(self, k), property)])
549759
def get_credit_notes(options = {})

      request_params = {}

      request_params[:CreditNoteID]     = options[:credit_note_id] if options[:credit_note_id]
      request_params[:CreditNoteNumber] = options[:credit_note_number] if options[:credit_note_number]
      request_params[:order]            = options[:order] if options[:order]
      request_params[:ModifiedAfter]    = options[:modified_since] if options[:modified_since]

      request_params[:where]            = options[:where] if options[:where]

      response_xml = http_get(@client, "#{@xero_url}/CreditNotes", request_params)

      parse_response(response_xml, {:request_params => request_params}, {:request_signature => 'GET/CreditNotes'})
    end
749782
def getContactItems(self, person):
        
        notes = list(person.store.query(Notes, Notes.person == person))
        if not notes:
            return [Notes(store=person.store,
                          person=person,
                          notes=u'')]
        return notes
809797
def keys(cls):
        
        if cls._cache_keys is None:
            cls._cache_keys = [c.name for c in cls.__table__._columns]
        return cls._cache_keys
246181
def get_interval(note, interval, key='C'):
    
    intervals = map(lambda x: (notes.note_to_int(key) + x) % 12, [
        0,
        2,
        4,
        5,
        7,
        9,
        11,
        ])
    key_notes = keys.get_notes(key)
    for x in key_notes:
        if x[0] == note[0]:
            result = (intervals[key_notes.index(x)] + interval) % 12
    if result in intervals:
        return key_notes[intervals.index(result)] + note[1:]
    else:
        return notes.diminish(key_notes[intervals.index((result + 1) % 12)]
                               + note[1:])
318150
function getNotesUp($scalenum, $root, $octaves, $hand) {
        $initialnote = clone($root);
        $str = "\n % going up \n";
        $clef = ''; // this will force a clef to be defined for the first note
        for ($o=0; $o<$octaves; $o++) {
            $scale = new Scale($scalenum, $initialnote, 'ascending');
            $pitches = $scale->getPitches();
            $degree = 0;
            foreach ($pitches as $pitch) {
                $newclef = ($initialnote->interval($this->middleC) > 0) ? 'bass' : 'treble';
                if ($newclef != $clef) {
                    $clef = $newclef;
                    $str .= '\\clef "' . $clef . '" ';
                }
                $str .= $pitch->toLilypond() . $this->duration;

                $isbottom = $pitch->isEnharmonic($root);
                $finger = $this->getFinger($scalenum, $initialnote, $hand, $degree, false, $isbottom);
                $str .= '-' . $finger;

                $str .= ' ';
                $degree++;
            }
            $initialnote->transpose(12);
        }
        return $str;
    }
733960
def keys(self, key=None, reverse=False):
        """"""
        ks = sorted(list(dict.keys(self)), key=key, reverse=reverse)
        return ks
1096244
def sevenths(key):
    """"""
    if _sevenths_cache.has_key(key):
        return _sevenths_cache[key]
    res = map(lambda x: seventh(x, key), keys.get_notes(key))
    _sevenths_cache[key] = res
    return res
546005
public function getNotes()
    {
        $notes = [];
        if ($this->entity->getNotes()) {
            foreach ($this->entity->getNotes() as $note) {
                $notes[] = $note;
            }
        }

        return $notes;
    }
1095397
function writeNotes() {
  let output = '';
  let compatNotes = collectCompatNotes();
  for (let note of compatNotes) {
    let noteIndex = compatNotes.indexOf(note);
    output += `<p id=compatNote_${noteIndex+1}>${noteIndex+1}. ${note}</p>`;
  }
  return output;
}
861498
def triad(note, key):
    
    return [note, intervals.third(note, key), intervals.fifth(note, key)]
326136
public String getNotes()
   {
      String notes = (String) getCachedValue(TaskField.NOTES);
      return (notes == null ? "" : notes);
   }