Be sure you have the latest version of the sound library.
Our examples this week focus on simple music generation. We will be working at a higher level of abstraction, thinking about the notes to play, rather than the creating the sound of a note.
You can experiement with generating sounds and noise yourself if you like. Take a look at the p5 docs for information about the library functions p5 provides for working with sound.
I don’t have a great deal of knowledge around music theory, so this information will not be deep (and there is so much more depth below). It is possible that some of it will be incorrect.
Still, these are the assumptions I used in creating the examples we will study this week.
1.059times higher than the last.
|Equal Temperament hz||261.63||277.18||293.66||311.13||329.63||349.23||369.99||392.00||415.30||440.00||466.16||493.88|
|Equal Temperament ratio||1||1.059||1.122||1.189||1.259||1.334||1.414||1.498||1.587||1.681||1.781||1.887|
|Just Interval Ratio||1||-||1.125||-||1.2||1.333||-||1.5||-||1.666||-||1.875|
|Just Interval Ratio||1/1||-||9/8||-||5/4||4/3||-||3/2||-||5/3||-||15/8|
emptyArray = ; simpleArray = [1, 2, 3]; nestedArray = [[60, 1], [62, 1]]; nestedArray.push([64, 1]); nestedArray; nestedArray; nestedArray2 = [[70, 1], [72, 1]]; combinedArray = nestedArray.concat(nestedArray2);
MonoSynth, uses the p5.js oscillator and envelope classes to create an synth object that can play back a sequence of notes.
var synth = new MonoSynth(); synth.playNotes([[60, 1/4], [62, 1/4]]);
QuickMusic provides a few utilty functions for processing sequences of notes and working with keys/scales.
Supported Musical Scales
quickMusic.getNoteInScale(position, tonic, scale)
translate from scale positoin to midi note number
find the name of a midi note number
find the midinote number by name
quickMusic.imposePhrase(phrase, tonic, scale)
translate notes from scale position to midi note number
shift notes up or down in pitch
create copy of a phrase
I also created several fully commented example scripts, we will review them in class, but I suggest also reading them at your own pace.