This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

SoundNote

SoundNote[pitch]
represents a music-like sound note with the specified pitch.
SoundNote
takes the note to have duration t.
SoundNote
takes the note to occupy the time interval to .
SoundNote
takes the note to be in the specified style.
SoundNote
uses the specified rendering options for the note.
  • The pitch specification can be as follows:
0middle C
nn semitones from middle C
, , , etc.notes in the middle C octave
, , , etc.notes in the m octave (" is middle C)
{p1,p2,...}a chord containing pitches
Nonesilence (a musical rest)
"percussion"a percussion event
  • The forms , (entered as \[Sharp] ), and are all equivalent.
  • , (entered as \[Flat]), and are also equivalent.
  • Negative numbers specify pitches below middle C.
  • The C one octave above middle C can be specified as or .
  • is equivalent to ; low notes can be specified as etc.
  • SoundNote specifies a total duration t; the actual sound of the note may decay before time t has elapsed.
  • SoundNote normally is by default taken to be in a piano style.
  • Style s between 1 and 128 represents General MIDI instrument s.
  • Style represents an instrument in the specified bank and patch.
  • In Sound, 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"
    "Atmosphere""Bagpipe""Bandoneon""Banjo"
    "BaritoneSax""Bass""BassAndLead""Bassoon"
    "Bird""BlownBottle""Bowed""BrassSection"
    "Breath""Brightness""BrightPiano""Calliope"
    "Celesta""Cello""Charang""Chiff"
    "Choir""Clarinet""Clavi""Contrabass"
    "Crystal""DrawbarOrgan""Dulcimer""Echoes"
    "ElectricBass""ElectricGrandPiano""ElectricGuitar""ElectricPiano"
    "ElectricPiano2""EnglishHorn""Fiddle""Fifths"
    "Flute""FrenchHorn""FretlessBass""FretNoise"
    "Glockenspiel""Goblins""Guitar""GuitarDistorted"
    "GuitarHarmonics""GuitarMuted""GuitarOverdriven""Gunshot"
    "Halo""Harmonica""Harp""Harpsichord"
    "Helicopter""HonkyTonkPiano""JazzGuitar""Kalimba"
    "Koto""Marimba""MelodicTom""Metallic"
    "MusicBox""MutedTrumpet""NewAge""Oboe"
    "Ocarina""OrchestraHit""Organ""PanFlute"
    "PercussiveOrgan""Piano""Piccolo""PickedBass"
    "PizzicatoStrings""Polysynth""Rain""Recorder"
    "ReedOrgan""ReverseCymbal""RockOrgan""Sawtooth"
    "SciFi""Seashore""Shakuhachi""Shamisen"
    "Shanai""Sitar""SlapBass""SlapBass2"
    "SopranoSax""Soundtrack""Square""Steeldrums"
    "SteelGuitar""Strings""Strings2""Sweep"
    "SynthBass""SynthBass2""SynthBrass""SynthBrass2"
    "SynthDrum""SynthStrings""SynthStrings2""SynthVoice"
    "Taiko""Telephone""TenorSax""Timpani"
    "Tinklebell""TremoloStrings""Trombone""Trumpet"
    "Tuba""TubularBells""Vibraphone""Viola"
    "Violin""Voice""VoiceAahs""VoiceOohs"
    "Warm""Whistle""Woodblock""Xylophone"
  • Typical possible percussion events include:
  • "BassDrum""BassDrum2""BellTree""Cabasa"
    "Castanets""ChineseCymbal""Clap""Claves"
    "Cowbell""CrashCymbal""CrashCymbal2""ElectricSnare"
    "GuiroLong""GuiroShort""HighAgogo""HighBongo"
    "HighCongaMute""HighCongaOpen""HighFloorTom""HighTimbale"
    "HighTom""HighWoodblock""HiHatClosed""HiHatOpen"
    "HiHatPedal""JingleBell""LowAgogo""LowBongo"
    "LowConga""LowFloorTom""LowTimbale""LowTom"
    "LowWoodblock""Maracas""MetronomeBell""MetronomeClick"
    "MidTom""MidTom2""MuteCuica""MuteSurdo"
    "MuteTriangle""OpenCuica""OpenSurdo""OpenTriangle"
    "RideBell""RideCymbal""RideCymbal2""ScratchPull"
    "ScratchPush""Shaker""SideStick""Slap"
    "Snare""SplashCymbal""SquareClick""Sticks"
    "Tambourine""Vibraslap""WhistleLong""WhistleShort"
  • 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.
Produce a middle C:
Produce a middle G for 1 second in a violin style:
Produce a chord for 1 second:
Produce a sequence of three notes:
Produce the sound of a bell tree:
Produce a middle C:
In[1]:=
Click for copyable input
Out[1]=
 
Produce a middle G for 1 second in a violin style:
In[1]:=
Click for copyable input
Out[1]=
 
Produce a chord for 1 second:
In[1]:=
Click for copyable input
Out[1]=
 
Produce a sequence of three notes:
In[1]:=
Click for copyable input
Out[1]=
 
Produce the sound of a bell tree:
In[1]:=
Click for copyable input
Out[1]=
The note 7 semitones above middle C:
The note 7 semitones below middle C:
The G above middle C:
Middle C:
One octave above middle C:
One octave below middle C:
A chord of C and G:
A chord of C, E, G, and B:
A chord of D, F, A, and D:
Low and high C notes:
Lowest C typically supported:
C for 0.2 seconds, G for 0.3 seconds:
Notes with a rest in the middle:
Specify absolute times, with an overlap in the middle:
Middle C on the organ for 1 second:
A sequence of two notes on two instruments:
Notes on two instruments, with overlap:
Give styles for multiple notes:
Mathematica supports many instruments and sound effects:
Percussion is specified without a pitch:
Play middle C for 1 second using MIDI instrument 99:
Play a sequence of progressively louder notes:
Play a chromatic scale starting at middle C:
Play a scale on a violin, with each note taking 0.1 seconds:
Play the first 20 primes as notes in woodblock style:
Play the first notes in Beethoven's Fifth Symphony:
Play a sequence of five notes on a synthesizer:
Generate a sequence of random notes:
Generate a simple WolframTones-like composition:
Play a sampled waveform followed by a note:
Play a sampled sound and a note at the same time:
Mathematica renders MIDI notes even if they would not be played by the specified instrument:
Mathematica specified the first MIDI instrument as 1, rather than 0:
Play each of the first 15 MIDI instruments for 0.1 seconds:
Play all semitones in the middle octave together:
Play several octaves together:
Play a cellular automaton sound:
Play a random sequence of notes from different instruments:
New in 6