pxt-calliope/docs/reference/music/note-frequency.md
Juri Wolf 5f7a8e5301
Updates for V4 (#197)
* update yotta defaults for 16kb devices

* refactor deprecated blocks

* updates for button events

* update button events

* update refference

* update docs

* update docs

* update button event blocks

* update docs

* update block id
2022-08-10 09:36:19 -07:00

782 B

note Frequency

Get the frequency of a musical note.

music.noteFrequency(Note.C)

Parameters

  • name is the name of the Note you want a frequency value for.

Returns

  • a number that is the frequency (in Hertz) of a note you chose.

Example #example

Play a 'C' note for one second, rest for one second, and then play an 'A' note for one second.

music.playTone(music.noteFrequency(Note.C), 1000)
music.rest(1000)
music.playTone(music.noteFrequency(Note.A), 1000)

See also #seealso

play tone, ring tone, rest, tempo, change tempo by