SoundNote[pitch]
represents a music-like sound note with the specified pitch.
SoundNote[pitch,t]
takes the note to have duration t.
SoundNote[pitch,{tmin,tmax}]
takes the note to occupy the time interval tmin to tmax.
SoundNote[pitch,tspec,"style"]
takes the note to be in the specified style.
SoundNote[pitch,tspec,"style",opts]
uses the specified rendering options for the note.
SoundNote
SoundNote[pitch]
represents a music-like sound note with the specified pitch.
SoundNote[pitch,t]
takes the note to have duration t.
SoundNote[pitch,{tmin,tmax}]
takes the note to occupy the time interval tmin to tmax.
SoundNote[pitch,tspec,"style"]
takes the note to be in the specified style.
SoundNote[pitch,tspec,"style",opts]
uses the specified rendering options for the note.
Details and Options
- The pitch specification can be as follows:
-
0 middle C n n 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 None silence (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" "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.
- The computable list of instruments is available in .
Examples
open all close allBasic Examples (5)
Sound[SoundNote[0]]Produce a middle G for 1 second in a violin style:
Sound[SoundNote["G", 1, "Violin"]]Sound[SoundNote[{"C", "G"}, 1, "Harpsichord"]]Produce a sequence of three notes:
Sound[{SoundNote["C"], SoundNote["G"], SoundNote["C5"]}]Produce the sound of a bell tree:
Sound[SoundNote["BellTree"]]Scope (16)
Basic Notes and Chords (6)
The note 7 semitones above middle C:
Sound[SoundNote[7]]The note 7 semitones below middle C:
Sound[SoundNote[-7]]Sound[SoundNote["G"]]Sound[SoundNote["C4"]]Sound[SoundNote["C5"]]Sound[SoundNote["C3"]]Sound[SoundNote[{"C", "G"}]]Sound[SoundNote[{"C", "E", "G", "Bb"}]]Sound[SoundNote[{"D", "F#", "A", "D6"}]]Sound[{SoundNote["C0"], SoundNote["C9"]}]Sound[SoundNote["C-1"]]Timing (3)
C for 0.2 seconds, G for 0.3 seconds:
Sound[{SoundNote["C", 0.2], SoundNote["G", 0.3]}]Notes with a rest in the middle:
Sound[{SoundNote["C", 0.2], SoundNote[None, 0.2], SoundNote["G", 0.3]}]Specify absolute times, with an overlap in the middle:
Sound[{SoundNote["C", {0, 0.3}], SoundNote["G", {0.1, 0.5}]}]Instrumentation (7)
Middle C on the organ for 1 second:
Sound[SoundNote["C", 1, "Organ"]]A sequence of two notes on two instruments:
Sound[{SoundNote["C", .2, "Tuba"], SoundNote["G", .3, "Cello"]}]Notes on two instruments, with overlap:
Sound[{SoundNote["C", {0, 0.3}, "Tuba"], SoundNote["G", {0.1, 0.5}, "Cello"]}]Give styles for multiple notes:
Sound[{"Tuba", SoundNote[0], SoundNote[1], "Cello", SoundNote[2]}]The Wolfram Language supports many instruments and sound effects:
Sound[SoundNote["C", 1, "PanFlute"]]Sound[SoundNote["C", 1, "Voice"]]Sound[SoundNote["C", 1, "Telephone"]]Percussion is specified without a pitch:
Sound[SoundNote["Snare"]]Play middle C for 1 second using MIDI instrument 99:
Sound[SoundNote["C", 1, 99]]Options (1)
Applications (8)
Play a chromatic scale starting at middle C:
Sound[Table[SoundNote[i], {i, 0, 12}]]Play a scale on a violin, with each note taking 0.1 seconds:
Sound[Table[SoundNote[i, 0.1, "Violin"], {i, 0, 12}]]Play the first 20 primes as notes in woodblock style:
Sound[Table[SoundNote[Prime[i] - 20, 0.1, "Woodblock"], {i, 20}]]Play the first notes in Beethoven's Fifth Symphony:
Sound[{SoundNote["G"], SoundNote["G"], SoundNote["G"], SoundNote["Eb", 4]}, 1.5]Play a sequence of five notes on a synthesizer:
Sound[SoundNote[#, 0.5, "Polysynth"]& /@ {2, 4, 0, -12, -5}]Generate a sequence of random notes:
Sound[SoundNote /@ RandomInteger[12, 30], 2]Generate a simple WolframTones-like composition:
Sound[SoundNote[#, 1 / 6, "Warm"]& /@ (Pick[{0, 5, 9, 12, 16, 21}, #, 1]& /@ CellularAutomaton[30, {{1, 0, 0, 0, 0, 0}, 0}, 13, {13, 5}])]Generate a random melody with random instruments:
Sound[Table[SoundNote[RandomInteger[7], .2, RandomChoice[{"Piano", "Guitar", "Violin"}]], 100]]Properties & Relations (3)
Play a sampled waveform followed by a note:
Sound[{Play[Sin[500t Sin[20t]], {t, 0, 0.3}], SoundNote[0, 0.1]}]Play a sampled sound and a note at the same time:
Sound[{Sound[Play[Sin[500t Sin[20t]], {t, 0, 0.5}], {0, 0.5}], SoundNote[0, {0, 0.5}]}]Represent notes using MusicNote and MusicChord primitives:
MusicScore[{MusicNote["D"], MusicChord["GMajor"], MusicNote["C"]}]These properties are supported in Sound:
Sound[{MusicNote["D"], MusicChord["GMajor"], MusicNote["C"]}]Possible Issues (2)
Neat Examples (5)
Play each of the first 15 MIDI instruments for 0.1 seconds:
Sound[Table[SoundNote[0, 0.1, i], {i, 15}]]Play all semitones in the middle octave together:
Sound[SoundNote[Range[12]]]Play several octaves together:
Sound[SoundNote[Range[-50, 50, 12]]]Play a cellular automaton sound:
Sound[SoundNote[DeleteCases[3 Range[31] Reverse[#], 0] - 48, .1] & /@ Transpose[CellularAutomaton[90, {{1}, 0}, 30]]]Play a random sequence of notes from different instruments:
Sound[SoundNote[#, 1, RandomChoice[{"Piano", "Cello", "Tuba"}]]& /@ RandomInteger[12, 30], 4]See Also
Sound SampledSoundList SampledSoundFunction Audio Beep EmitSound MusicNote MusicScore MusicChord
Function Repository: MusicalScaleSample
Tech Notes
Related Guides
Related Links
History
Text
Wolfram Research (2007), SoundNote, Wolfram Language function, https://reference.wolfram.com/language/ref/SoundNote.html.
CMS
Wolfram Language. 2007. "SoundNote." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SoundNote.html.
APA
Wolfram Language. (2007). SoundNote. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SoundNote.html
BibTeX
@misc{reference.wolfram_2026_soundnote, author="Wolfram Research", title="{SoundNote}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/SoundNote.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_soundnote, organization={Wolfram Research}, title={SoundNote}, year={2007}, url={https://reference.wolfram.com/language/ref/SoundNote.html}, note=[Accessed: 12-June-2026]}