({{, (RefLink[SoundNote, paclet:ref/SoundNote])[pitch] 
represents a music-like sound note with the specified pitch.}, {, (RefLink[SoundNote, paclet:ref/SoundNote])[pitch,t] 
takes the note to have duration t.}, {, (RefLink[SoundNote, paclet:ref/SoundNote])[pitch,{(Subscript[t, min]),(Subscript[t, max])}] 
takes the note to occupy the time interval (Subscript[t, min]) to (Subscript[t, max]).}, {, (RefLink[SoundNote, paclet:ref/SoundNote])[pitch,tspec,"style"] 
takes the note to be in the specified style.}, {, (RefLink[SoundNote, paclet:ref/SoundNote])[pitch,tspec,"style",opts] 
uses the specified rendering options for the note.}})

OpenersNotesSection(Spacer1)Details and Options

The pitch specification can be as follows:

The forms "C#", "C♯" (entered as (RefLink[\[Sharp], paclet:ref/character/Sharp])), and "CSharp" are all equivalent.

"Cb", "C♭" (entered as (RefLink[\[Flat], paclet:ref/character/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.

(RefLink[SoundNote, paclet:ref/SoundNote])[pitch,t] specifies a total duration t; the actual sound of the note may decay before time t has elapsed.

(RefLink[SoundNote, paclet:ref/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 (RefLink[Sound, paclet:ref/Sound]), {"style",SoundNote[…],…} can be used to specify that many notes should be taken to be in the given style.

(RefLink[SoundNote, paclet:ref/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 (RefLink[SoundVolume, paclet:ref/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.

OpenersPrimaryExamplesSection(Spacer1)Examples  (39)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Produce a middle C:

Sound[SoundNote[0]]

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

Sound[SoundNote["G",1,"Violin"]]

Produce a chord for 1 second:

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"]]

OpenersExampleSection1(Spacer1)Scope  (16)

OpenersExampleSubsection0(Spacer1)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]]

The G above middle C:

Sound[SoundNote["G"]]

Middle C:

Sound[SoundNote["C4"]]

One octave above middle C:

Sound[SoundNote["C5"]]

One octave below middle C:

Sound[SoundNote["C3"]]

A chord of C and G:

Sound[SoundNote[{"C","G"}]]

A chord of C, E, G, and B♭:

Sound[SoundNote[{"C","E","G","Bb"}]]

A chord of D, F♯, A, and D:

Sound[SoundNote[{"D","F#","A","D6"}]]

Low and high C notes:

Sound[{SoundNote["C0"],SoundNote["C9"]}]

Lowest C typically supported:

Sound[SoundNote["C-1"]]

OpenersExampleSubsection1(Spacer1)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}]}]

OpenersExampleSubsection2(Spacer1)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]]

OpenersExampleSection2(Spacer1)Options  (1)

OpenersExampleSubsection3(Spacer1)SoundVolume  (1)

Play a sequence of progressively louder notes:

Sound[Table[SoundNote["C",.2,SoundVolume->v],{v,0,1,0.1}]]

OpenersExampleSection3(Spacer1)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]]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

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}]}]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

The Wolfram Language renders MIDI notes even if they would not be played by the specified instrument:

Sound[SoundNote["C3",1,"Violin"]]

The Wolfram Language specified the first MIDI instrument as 1, rather than 0:

Sound[SoundNote["C",0.2,1]]

OpenersExampleSection6(Spacer1)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]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Sound, paclet:ref/Sound])  ▪  (RefLink[SampledSoundList, paclet:ref/SampledSoundList])  ▪  (RefLink[SampledSoundFunction, paclet:ref/SampledSoundFunction])  ▪  (RefLink[Audio, paclet:ref/Audio])  ▪  (RefLink[Beep, paclet:ref/Beep])  ▪  (RefLink[EmitSound, paclet:ref/EmitSound])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Sound, paclet:tutorial/Sound])}, {▪(RefLinkPlain[The Representation of Sound, paclet:tutorial/TheRepresentationOfSound])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Sound and Sonification, paclet:guide/SoundAndSonification])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/12-sound.html])(WebLink[: Sound, https://www.wolfram.com/language/elementary-introduction/12-sound.html])}})}})