Details and Options
ResourceFunction["MusicalScaleSample"] can be used to generate samples of simple and fast musical scales (most of them are ethnic and cultural scales, in addition to the more common Greek scales) or more complete and personalized ones.
The following arguments are defined as default by the function:
Instrument | "Guitar" |
NoteInterval | 0.3 |
Tone | "F2" |
Octaves | 2 |
SoundVolume | 1 |
Playing | "Organic" |
There are 30 different scales that work in the first argument of the function. They can be chosen from the following:
"MajorPentatonic" | "JazzMinor" | "Persian" |
"MinorPentatonic" | "BluesScale" | "EastIndianPurvi" |
"NeopolitanMajor" | "Chromatic" | "Oriental" |
"NeopolitanMinor" | "Overtone" | "GagakuRyoSenPou" |
"HungarianMajor" | "WholeTone" | "Zokugaku" |
"HungarianMinor" | "Enigmatic" | "InSenPou" |
"HungarianGypsy" | "Symmetrical" | "Okinawa" |
"HarmonicMajor" | "Arabian" | "DiminishedWholeTone" |
"HarmonicMinor" | "Balinese" | "EightToneSpanish" |
"DoubleHarmonic" | "Byzantine" | "Prometheus" |
By default, the
"Instrument" chosen is the "
Guitar" since the source of the scales presented here came from the study of the guitar. Other instruments can be specified using the
"Instrument" option, possible values of which can be chosen from the list described in the "Details & Options" section of
SoundNote.
The default interval between notes is 0.3 seconds, but other timings (in seconds) may be specified via the "NoteInterval" option.
Optionally, one can select the "Tone" of the musical scale, and any tone from the first to the fifth octave (60 different tones) can be selected. By default, the tone is "F2", as it is the first fret of a guitar’s arm. The selectable tones are:
"C1" | "Ab2" | "E4" |
"Db1" | "A2" | "F4" |
"D1" | "Bb2" | "Gb4" |
"Eb1" | "B2" | "G4" |
"E1" | "C3" | "Ab4" |
"F1" | "Db3" | "A4" |
"Gb1" | "D3" | "Bb4" |
"G1" | "Eb3" | "B4" |
"Ab1" | "E3" | "C5" |
"A1" | "F3" | "Db5" |
"Bb1" | "Gb3" | "D5" |
"B1" | "G3" | "Eb5" |
"C2" | "Ab3" | "E5" |
"Db2" | "A3" | "F5" |
"D2" | "Bb3" | "Gb5" |
"Eb2" | "B3" | "G5" |
"E2" | "C4" | "Ab5" |
"F2" | "Db4" | "A5" |
"Gb2" | "D4" | "Bb5" |
"G2" | "Eb4" | "B5" |
When
ResourceFunction["MusicalScaleSample"] is used in conjunction with the
Sound command in order to simultaneously play multiple overlaped musical samples, the "
NoteInterval" specified in the function is overridden by the duration of the sound with the
Sound command.
The default number of "Octaves" that participate in the sample is 2, because as a matter of sonority, the change from one octave to another is important; it also represents the complete vertical movement in the arm of a guitar, which covers two octaves. However, "Octaves" may be specified to be 1, 2 (default) or 3. For example, the default tone is "F2" and the number of standard octaves is 2, so the standard music samples of the function can have notes from "F2" to "B3", that is, covering the second and third octaves. Although the highest selectable tone in the "Tone" argument is "B5", when you choose 3 octaves as argument, the scale may have a range from "B5" (the fifth octave note) to "Bb8" (the penultimate note of eighth octave).
Octaves | Max range of notes |
1 | 12 |
2 | 24 |
3 | 36 |
It is possible to change the volume of the musical sample using the "
SoundVolume" option. This is similar to
SoundVolume values and is useful for more complex creations of musical samples.
The musical scale can be played with the "Playing" option by specifying the values "Organic" (default) or "Mechanical". The form "Organic" is one made with a certain minimum variation in the time of each note to have a smoother and more natural sonority (almost as a person would). The form "Mechanical" plays with all notes played exactly with the same "NoteInterval" already set, the way a machine would do. "Playing"→"Mechanical" makes the music sample always have the same duration when generated.