Fix note field editor authoring such that it limits the notes that show up (#715)

This commit is contained in:
Sam El-Husseini 2018-06-20 16:29:03 -07:00 committed by GitHub
parent 7974f36c31
commit fc83cc5d5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,19 @@
namespace music { namespace music {
/** /**
* Get the frequency of a note. * Get the frequency of a note.
* @param name the note name, eg: Note.C * @param note the note name, eg: Note.C
*/ */
//% weight=1 help=music/note-frequency //% weight=1 help=music/note-frequency
//% blockId=device_note block="%note" //% blockId=device_note block="%note"
//% shim=TD_ID //% shim=TD_ID
//% color="#FFFFFF" colorSecondary="#FFFFFF" colorTertiary="#D67923" //% color="#FFFFFF" colorSecondary="#FFFFFF" colorTertiary="#D67923"
//% note.fieldEditor="note" note.defl="1046" //% note.fieldEditor="note" note.defl="1046"
//% note.fieldOptions.editorColour="#FF1493" note.fieldOptions.decompileLiterals=true //% note.fieldOptions.editorColour="#D67923" note.fieldOptions.decompileLiterals=true
//% note.fieldOptions.minNote=52 note.fieldOptions.maxNote=75 //% note.fieldOptions.minNote=40 note.fieldOptions.maxNote=75
//% useEnumVal=1 //% useEnumVal=1
//% weight=10 blockGap=8 //% weight=10 blockGap=8
export function noteFrequency(name: Note): number { export function noteFrequency(note: Note): number {
//TODO fill in actual min/max note values //TODO fill in actual min/max note values
return name; return note;
} }
} }