annotating note with TD_ID
This commit is contained in:
parent
a34bcee7a2
commit
60f8dd8228
@ -1,63 +1,110 @@
|
||||
enum Note {
|
||||
C = 262,
|
||||
//% block=C#
|
||||
//% blockIdentity=music.noteFrequency
|
||||
CSharp = 277,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
D = 294,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Eb = 311,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
E = 330,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
F = 349,
|
||||
//% block=F#
|
||||
//% blockIdentity=music.noteFrequency
|
||||
FSharp = 370,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
G = 392,
|
||||
//% block=G#
|
||||
//% blockIdentity=music.noteFrequency
|
||||
GSharp = 415,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
A = 440,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Bb = 466,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
B = 494,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
C3 = 131,
|
||||
//% block=C#3
|
||||
//% blockIdentity=music.noteFrequency
|
||||
CSharp3 = 139,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
D3 = 147,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Eb3 = 156,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
E3 = 165,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
F3 = 175,
|
||||
//% block=F#3
|
||||
//% blockIdentity=music.noteFrequency
|
||||
FSharp3 = 185,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
G3 = 196,
|
||||
//% block=G#3
|
||||
//% blockIdentity=music.noteFrequency
|
||||
GSharp3 = 208,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
A3 = 220,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Bb3 = 233,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
B3 = 247,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
C4 = 262,
|
||||
//% block=C#4
|
||||
//% blockIdentity=music.noteFrequency
|
||||
CSharp4 = 277,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
D4 = 294,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Eb4 = 311,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
E4 = 330,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
F4 = 349,
|
||||
//% block=F#4
|
||||
//% blockIdentity=music.noteFrequency
|
||||
FSharp4 = 370,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
G4 = 392,
|
||||
//% block=G#4
|
||||
//% blockIdentity=music.noteFrequency
|
||||
GSharp4 = 415,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
A4 = 440,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Bb4 = 466,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
B4 = 494,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
C5 = 523,
|
||||
//% block=C#5
|
||||
//% blockIdentity=music.noteFrequency
|
||||
CSharp5 = 555,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
D5 = 587,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Eb5 = 622,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
E5 = 659,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
F5 = 698,
|
||||
//% block=F#5
|
||||
//% blockIdentity=music.noteFrequency
|
||||
FSharp5 = 740,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
G5 = 784,
|
||||
//% block=G#5
|
||||
//% blockIdentity=music.noteFrequency
|
||||
GSharp5 = 831,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
A5 = 880,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
Bb5 = 932,
|
||||
//% blockIdentity=music.noteFrequency
|
||||
B5 = 989,
|
||||
}
|
||||
|
||||
@ -121,6 +168,7 @@ namespace music {
|
||||
*/
|
||||
//% weight=50 help=music/note-frequency
|
||||
//% blockId=device_note block="%note"
|
||||
//% shim=TD_ID
|
||||
export function noteFrequency(name: Note): number {
|
||||
return name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user