represents a music-like sound note with the specified pitch.

takes the note to have duration t.

takes the note to occupy the time interval tmin to tmax.

takes the note to be in the specified style.

uses the specified rendering options for the note.

Details and OptionsDetails and Options

  • The pitch specification can be as follows:
  • 0middle C
    nn semitones from middle C
    "C", "C#", "D", etc.notes in the middle C octave
    "Cm", "C#m", "Dm", etc.notes in the m octave ("C4" is middle C)
    {p1,p2,}a chord containing pitches pi
    Nonesilence (a musical rest)
    "percussion"a percussion event
  • The forms "C#", "C" (entered as \[Sharp]), and "CSharp" are all equivalent.
  • "Cb", "C" (entered as \[Flat]), and "CFlat" are also equivalent.
  • Negative numbers specify pitches below middle C.
  • The C one octave above middle C can be specified as 12 or "C5".
  • "C+4" is equivalent to "C4"; low notes can be specified as "C-1" etc.
  • SoundNote[pitch,t] specifies a total duration t; the actual sound of the note may decay before time t has elapsed.
  • SoundNote[pitch,tspec] normally is by default taken to be in a piano style.
  • Style s between 1 and 128 represents General MIDI instrument s.
  • Style {bank,patch,s} represents an instrument in the specified bank and patch.
  • In Sound, {"style",SoundNote[],} can be used to specify that many notes should be taken to be in the given style.
  • SoundNote[] by default represents middle C in piano style with duration 1 second.
  • Typical possible styles include:
  • "Accordion""Agogo""AltoSax""Applause"
  • Typical possible percussion events include:
  • "BassDrum""BassDrum2""BellTree""Cabasa"
  • The option SoundVolume->v specifies a relative sound volume v for a note.
  • What notes can actually play as sounds may depend on the setup of your computer system.

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Produce a middle C:

Click for copyable input

Produce a middle G for 1 second in a violin style:

Click for copyable input

Produce a chord for 1 second:

Click for copyable input

Produce a sequence of three notes:

Click for copyable input

Produce the sound of a bell tree:

Click for copyable input
Introduced in 2007