Liking cljdoc? Tell your friends :D

music-theory.note


->noteclj/s

(->note x)

Creates a Note record, which represents a note as an unbounded MIDI note number, from a string or keyword describing the note in scientific pitch notation, i.e. a letter and (optionally) any number of sharps and flats.

e.g. C#5, Dbb4, E0

Creates a Note record, which represents a note as an unbounded MIDI note
number, from a string or keyword describing the note in scientific pitch
notation, i.e. a letter and (optionally) any number of sharps and flats.

e.g. C#5, Dbb4, E0
sourceraw docstring

interval+clj/s

(interval+ note & intervals)

Given a note (spelled a particular way, e.g. "Ab4" or "G#4") and an interval (which can be something like :m3 for minor third, :M3 for major third, etc.), returns the correctly spelled note that interval above that note.

Can take multiple intervals, all of which will be added to the note.

When given a MIDI note number, returns a MIDI note number instead of a note.

Given a note (spelled a particular way, e.g. "Ab4" or "G#4") and an
interval (which can be something like :m3 for minor third, :M3 for major
third, etc.), returns the correctly spelled note that interval above that
note.

Can take multiple intervals, all of which will be added to the note.

When given a MIDI note number, returns a MIDI note number instead of a note.
sourceraw docstring

interval-clj/s

(interval- note & intervals)

Given a note (spelled a particular way, e.g. "Ab4" or "G#4") and an interval (which can be something like :m3 for minor third, :M3 for major third, etc.), returns the correctly spelled note that interval below that note.

Can take multiple intervals, all of which will be subtracted from the note.

When given a MIDI note number, returns a MIDI note number instead of a note.

Given a note (spelled a particular way, e.g. "Ab4" or "G#4") and an
interval (which can be something like :m3 for minor third, :M3 for major
third, etc.), returns the correctly spelled note that interval below that
note.

Can take multiple intervals, all of which will be subtracted from the note.

When given a MIDI note number, returns a MIDI note number instead of a note.
sourceraw docstring

letter+clj/s

(letter+ letter interval & [multiplier])

Given a letter (as a capital character, like \A) and an interval to move up, returns the resulting letter (A-G), ignoring accidentals.

e.g. F + 1 == F (unison) F + 2 == G (2nd) F + 3 == A (3rd) F + 4 == B (4th) F + 8 == F (octave)

If multiplier is -1, moves down instead of up.

e.g. F - 1 == F (unison) F - 2 == E (2nd) F - 3 == D (3rd) F - 4 == C (4th) F - 8 == F (octave)

Given a letter (as a capital character, like \A) and an interval to move
up, returns the resulting letter (A-G), ignoring accidentals.

e.g. F + 1 == F (unison)
     F + 2 == G (2nd)
     F + 3 == A (3rd)
     F + 4 == B (4th)
     F + 8 == F (octave)

If multiplier is -1, moves down instead of up.

e.g. F - 1 == F (unison)
     F - 2 == E (2nd)
     F - 3 == D (3rd)
     F - 4 == C (4th)
     F - 8 == F (octave)
sourceraw docstring

Notecljs

source

note->midiclj/s

(note->midi note)

Converts a note in the form of a string or keyword (e.g. C#4, :Db5, A2) into the corresponding MIDI note number.

Throws an assertion error if the note is outside the range of MIDI notes (0-127).

Converts a note in the form of a string or keyword (e.g. C#4, :Db5, A2) into
the corresponding MIDI note number.

Throws an assertion error if the note is outside the range of MIDI notes
(0-127).
sourceraw docstring

note-positionclj/s

(note-position tonic note)

Given a tonic (e.g. A) and a note (e.g. C#), returns a number from 0-11 representing the position of the note (e.g. 4) relative to the tonic.

Given a tonic (e.g. A) and a note (e.g. C#), returns a number from 0-11
representing the position of the note (e.g. 4) relative to the tonic.
sourceraw docstring

octaveclj/s

(octave note)

Returns the octave of a note.

Returns the octave of a note.
sourceraw docstring

spell-noteclj/s

(spell-note note-letter note-number)

Given a letter (as a capital character like \D) and a note number (e.g. 61 is one semitone above middle C), returns the correct enharmonic spelling of the note (in this case, :Db4), built on that note.

Given a letter (as a capital character like \D) and a note number (e.g. 61
is one semitone above middle C), returns the correct enharmonic spelling of
the note (in this case, :Db4), built on that note.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close