Merge branch 'breadboarding' of github.com:Microsoft/pxt-microbit into breadboarding
This commit is contained in:
commit
f19a110953
|
@ -1,63 +1,110 @@
|
||||||
enum Note {
|
enum Note {
|
||||||
C = 262,
|
C = 262,
|
||||||
//% block=C#
|
//% block=C#
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
CSharp = 277,
|
CSharp = 277,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
D = 294,
|
D = 294,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Eb = 311,
|
Eb = 311,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
E = 330,
|
E = 330,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
F = 349,
|
F = 349,
|
||||||
//% block=F#
|
//% block=F#
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
FSharp = 370,
|
FSharp = 370,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
G = 392,
|
G = 392,
|
||||||
//% block=G#
|
//% block=G#
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
GSharp = 415,
|
GSharp = 415,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
A = 440,
|
A = 440,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Bb = 466,
|
Bb = 466,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
B = 494,
|
B = 494,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
C3 = 131,
|
C3 = 131,
|
||||||
//% block=C#3
|
//% block=C#3
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
CSharp3 = 139,
|
CSharp3 = 139,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
D3 = 147,
|
D3 = 147,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Eb3 = 156,
|
Eb3 = 156,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
E3 = 165,
|
E3 = 165,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
F3 = 175,
|
F3 = 175,
|
||||||
//% block=F#3
|
//% block=F#3
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
FSharp3 = 185,
|
FSharp3 = 185,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
G3 = 196,
|
G3 = 196,
|
||||||
//% block=G#3
|
//% block=G#3
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
GSharp3 = 208,
|
GSharp3 = 208,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
A3 = 220,
|
A3 = 220,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Bb3 = 233,
|
Bb3 = 233,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
B3 = 247,
|
B3 = 247,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
C4 = 262,
|
C4 = 262,
|
||||||
//% block=C#4
|
//% block=C#4
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
CSharp4 = 277,
|
CSharp4 = 277,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
D4 = 294,
|
D4 = 294,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Eb4 = 311,
|
Eb4 = 311,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
E4 = 330,
|
E4 = 330,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
F4 = 349,
|
F4 = 349,
|
||||||
//% block=F#4
|
//% block=F#4
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
FSharp4 = 370,
|
FSharp4 = 370,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
G4 = 392,
|
G4 = 392,
|
||||||
//% block=G#4
|
//% block=G#4
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
GSharp4 = 415,
|
GSharp4 = 415,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
A4 = 440,
|
A4 = 440,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Bb4 = 466,
|
Bb4 = 466,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
B4 = 494,
|
B4 = 494,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
C5 = 523,
|
C5 = 523,
|
||||||
//% block=C#5
|
//% block=C#5
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
CSharp5 = 555,
|
CSharp5 = 555,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
D5 = 587,
|
D5 = 587,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Eb5 = 622,
|
Eb5 = 622,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
E5 = 659,
|
E5 = 659,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
F5 = 698,
|
F5 = 698,
|
||||||
//% block=F#5
|
//% block=F#5
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
FSharp5 = 740,
|
FSharp5 = 740,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
G5 = 784,
|
G5 = 784,
|
||||||
//% block=G#5
|
//% block=G#5
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
GSharp5 = 831,
|
GSharp5 = 831,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
A5 = 880,
|
A5 = 880,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
Bb5 = 932,
|
Bb5 = 932,
|
||||||
|
//% blockIdentity=music.noteFrequency
|
||||||
B5 = 989,
|
B5 = 989,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,6 +172,7 @@ namespace music {
|
||||||
//% weight=50 help=music/note-frequency
|
//% weight=50 help=music/note-frequency
|
||||||
//% blockId=device_note block="%note"
|
//% blockId=device_note block="%note"
|
||||||
//% parts="speaker"
|
//% parts="speaker"
|
||||||
|
//% shim=TD_ID
|
||||||
export function noteFrequency(name: Note): number {
|
export function noteFrequency(name: Note): number {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,11 @@
|
||||||
"builtinParts": {
|
"builtinParts": {
|
||||||
"accelerometer": true,
|
"accelerometer": true,
|
||||||
"buttonpair": true,
|
"buttonpair": true,
|
||||||
"ledmatrix": true
|
"ledmatrix": true,
|
||||||
|
"speaker": true,
|
||||||
|
"bluetooth": true,
|
||||||
|
"thermometer": true,
|
||||||
|
"compass": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compileService": {
|
"compileService": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user