Instrument {gm} | R Documentation |
Create Instrument
Object
Description
Create an Instrument
object to represent an instrument.
Usage
Instrument(instrument, to = NULL, volume = NULL, pan = NULL)
Arguments
instrument |
A single integer between |
to |
Optional. A single character or a single positive integer, which indicates the musical line where to add the instrument. |
volume |
Optional. A single integer between |
pan |
Optional. A single integer between |
Details
Supported instruments:
Acoustic Grand Piano
Bright Acoustic Piano
Electric Grand Piano
Honky-Tonk Piano
Electric Piano 1
Electric Piano 2
Harpsichord
Clavinet
Celesta
Glockenspiel
Music Box
Vibraphone
Marimba
Xylophone
Tubular Bells
Dulcimer
Drawbar Organ
Percussive Organ
Rock Organ
Church Organ
Reed Organ
Accordion
Harmonica
Tango Accordion
Acoustic Guitar (Nylon)
Acoustic Guitar (Steel)
Electric Guitar (Jazz)
Electric Guitar (Clean)
Electric Guitar (Muted)
Overdriven Guitar
Distortion Guitar
Guitar Harmonics
Acoustic Bass
Electric Bass (Finger)
Electric Bass (Pick)
Fretless Bass
Slap Bass 1
Slap Bass 2
Synth Bass 1
Synth Bass 2
Violin
Viola
Cello
Contrabass
Tremolo Strings
Pizzicato Strings
Orchestral Harp
Timpani
String Ensemble 1
String Ensemble 2
Synth Strings 1
Synth Strings 2
Choir Aahs
Voice Oohs
Synth Voice
Orchestra Hit
Trumpet
Trombone
Tuba
Muted Trumpet
French Horn
Brass Section
Synth Brass 1
Synth Brass 2
Soprano Sax
Alto Sax
Tenor Sax
Baritone Sax
Oboe
English Horn
Bassoon
Clarinet
Piccolo
Flute
Recorder
Pan Flute
Blown Bottle
Shakuhachi
Whistle
Ocarina
Lead 1 (Square)
Lead 2 (Sawtooth)
Lead 3 (Calliope)
Lead 4 (Chiff)
Lead 5 (Charang)
Lead 6 (Voice)
Lead 7 (Fifths)
Lead 8 (Bass + Lead)
Pad 1 (New Age)
Pad 2 (Warm)
Pad 3 (Polysynth)
Pad 4 (Choir)
Pad 5 (Bowed)
Pad 6 (Metallic)
Pad 7 (Halo)
Pad 8 (Sweep)
FX 1 (Rain)
FX 2 (Soundtrack)
FX 3 (Crystal)
FX 4 (Atmosphere)
FX 5 (Brightness)
FX 6 (Goblins)
FX 7 (Echoes)
FX 8 (Sci-Fi)
Sitar
Banjo
Shamisen
Koto
Kalimba
Bag Pipe
Fiddle
Shanai
Tinkle Bell
Agogo
Steel Drums
Woodblock
Taiko Drum
Melodic Tom
Synth Drum
Reverse Cymbal
Guitar Fret Noise
Breath Noise
Seashore
Bird Tweet
Telephone Ring
Helicopter
Applause
Gunshot
Value
A list of class Instrument
.
See Also
+.Music()
for adding an instrument to a Music
object.
Examples
# Create a flute
flute <- Instrument(74, pan = -90)
flute
# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C5", "D5", "E5", "F5")) + flute
music
# Generate the music score
if (interactive()) {
show(music)
}