Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/content/tutorials/en/simple-melody-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Skip to [Play musical notes with oscillators](#play-musical-notes-with-oscillato

### p5.Oscillator objects<a id="p5-oscillator-objects"></a>

[`p5.Oscillator`](/reference/p5.sound/p5.Oscillator/) objects hold information to generate electrical signals called [oscillators ](https://www.techtarget.com/whatis/definition/oscillator)that can play [musical notes](https://www.simplifyingtheory.com/music-note/). These signals change between a minimum and maximum value in a pattern that repeats at a specific rate. When the signal is played through your speakers, we can hear that it generates a sound!
[`p5.Oscillator`](/reference/p5.sound/p5.Oscillator/) objects hold information to generate electrical signals called [oscillators ](https://en.wikipedia.org/wiki/Electronic_oscillator)that can play [musical notes](https://www.simplifyingtheory.com/music-note/). These signals change between a minimum and maximum value in a pattern that repeats at a specific rate. When the signal is played through your speakers, we can hear that it generates a sound!

To understand how oscillators generate musical notes, we can dive into some science behind [sound](https://www.britannica.com/science/sound-physics).

Expand Down Expand Up @@ -350,7 +350,7 @@ If you are already familiar with the background concepts above, skip ahead to th

Music composers and producers often create simple melodies by choosing notes from a specific ***musical scale*** to ensure melodies will sound pleasing to listeners. In western culture, **musical scales** are a collection of notes arranged according to ascending or descending frequencies. Ascending scales increase in frequency (from a low pitch to a higher pitch), and descending scales decrease in frequency (from a high pitch to a lower pitch). An **octave** is an ascending scale consisting of eight evenly spaced musical notes, where the frequency of the last note is two times the frequency of the first note. 

We chose one of the most fundamental scales in western music known as [C Major](https://pulse.berklee.edu/scales/c-major-scale.html) in the example for this tutorial. The first note in the [C Major](https://pulse.berklee.edu/scales/c-major-scale.html) scale is [middle C](https://www.skoove.com/blog/middle-c-on-piano/#:~:text=Middle%20C%20is%20a%20basic,the%20middle%20of%20the%20piano.), with a frequency of 264 Hz. The last note in the scale will have a frequency that is [double the frequency](https://www.swarthmore.edu/NatSci/ceverba1/Class/e5_2006/MusicalScales.html) for middle C. This means the last note in the scale is [C sharp](https://peabody.sapp.org/class/st2/lab/notehz/) with a frequency of 524 Hz. See table below for a list of frequencies and corresponding musical notes:
We chose one of the most fundamental scales in western music known as [C Major](https://pulse.berklee.edu/scales/c-major-scale.html) in the example for this tutorial. The first note in the [C Major](https://pulse.berklee.edu/scales/c-major-scale.html) scale is [middle C](https://www.skoove.com/blog/middle-c-on-piano/#:~:text=Middle%20C%20is%20a%20basic,the%20middle%20of%20the%20piano.), with a frequency of 262 Hz. The last note in the scale will have a frequency that is [double the frequency](https://www.swarthmore.edu/NatSci/ceverba1/Class/e5_2006/MusicalScales.html) for middle C. This means the last note in the scale is [C5](https://plastic.audio/note-frequencies/?note=C5), one octave above middle C, with a frequency of 524 Hz. Doubling the rounded 262 Hz used in the code gives 524 Hz; in the usual tuning, where A4 is 440 Hz, C5 is about 523.25 Hz. See table below for a list of frequencies and corresponding musical notes:

Musical Notes and Frequencies  in C Major

Expand Down Expand Up @@ -394,7 +394,7 @@ C

<td>

264 
262 

</td>

Expand Down Expand Up @@ -542,7 +542,7 @@ B

<td>

C# 
C5 

(5th Octave)

Expand Down Expand Up @@ -1534,7 +1534,7 @@ Music Resources
- [Music - definition](https://www.britannica.com/art/music)
- [What is Melody?](https://www.masterclass.com/articles/music-101-what-is-melody)
- [Musical note](https://www.simplifyingtheory.com/music-note/)
- [What is an oscillator?](https://www.techtarget.com/whatis/definition/oscillator)
- [What is an oscillator?](https://en.wikipedia.org/wiki/Electronic_oscillator)
- [Amplitude and Frequency](https://www.howmusicworks.org/103/Sound-and-Music/Amplitude-and-Frequency)
- [Understanding note frequencies](https://producelikeapro.com/blog/note-frequency-chart/)
- [What's synthesis and sound design?](https://www.youtube.com/watch?v=qV10Gb-Dvao) - video
Expand Down
Loading