scratch-blocks
Advanced tools
Comparing version 0.1.0-prerelease.1476378634 to 0.1.0-prerelease.1476381009
@@ -44,5 +44,9 @@ /** | ||
"options": [ | ||
['meow', 'MEOW'], | ||
['meow2', 'MEOW2'], | ||
['pop', 'POP'] | ||
['meow', '0'], | ||
['boing', '1'], | ||
['cave', '2'], | ||
['drip drop', '3'], | ||
['drum machine', '4'], | ||
['eggs', '5'], | ||
['zoop', '6'] | ||
] | ||
@@ -103,2 +107,30 @@ } | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_playwithpitch'] = { | ||
/** | ||
* Block to play sound with pitch shift. | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "play sound %1 with pitch %2", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "SOUND_NUM" | ||
}, | ||
{ | ||
"type": "input_value", | ||
"name": "PITCH" | ||
} | ||
], | ||
"inputsInline": true, | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"category": Blockly.Categories.sound, | ||
@@ -130,2 +162,59 @@ "colour": Blockly.Colours.sounds.primary, | ||
Blockly.Blocks['sound_beats_menu'] = { | ||
/** | ||
* Sound beats drop-down menu. | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit( | ||
{ | ||
"message0": "%1", | ||
"args0": [ | ||
{ | ||
"type": "field_dropdown", | ||
"name": "BEATS", | ||
"options": [ | ||
['1/8', '0.125'], | ||
['1/4', '0.25'], | ||
['1/2', '0.5'], | ||
['1', '1'], | ||
['2', '2'], | ||
['4', '4'] | ||
] | ||
} | ||
], | ||
"inputsInline": true, | ||
"output": "String", | ||
"colour": Blockly.Colours.sounds.secondary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary, | ||
"outputShape": Blockly.OUTPUT_SHAPE_ROUND | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_playdrum'] = { | ||
/** | ||
* Block to play a certain drum | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "play drum %1", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "DRUMTYPE" | ||
} | ||
], | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_playdrumforbeats'] = { | ||
@@ -183,2 +272,26 @@ /** | ||
Blockly.Blocks['sound_playnote'] = { | ||
/** | ||
* Block to play a certain note for certain beats | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "play note %1", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "NOTE" | ||
} | ||
], | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_playnoteforbeats'] = { | ||
@@ -191,3 +304,3 @@ /** | ||
this.jsonInit({ | ||
"message0": "play note %1 to %2 beats", | ||
"message0": "play note %1 for %2 beats", | ||
"args0": [ | ||
@@ -213,2 +326,202 @@ { | ||
Blockly.Blocks['sound_scales_menu'] = { | ||
/** | ||
* Sound scales drop-down menu. | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit( | ||
{ | ||
"message0": "%1", | ||
"args0": [ | ||
{ | ||
"type": "field_dropdown", | ||
"name": "SCALE", | ||
"options": [ | ||
['major', 'MAJOR'], | ||
['minor', 'MINOR'], | ||
['pentatonic', 'PENTATONIC'], | ||
['chromatic', 'CHROMATIC'] | ||
] | ||
} | ||
], | ||
"inputsInline": true, | ||
"output": "String", | ||
"colour": Blockly.Colours.sounds.secondary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary, | ||
"outputShape": Blockly.OUTPUT_SHAPE_ROUND | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_roots_menu'] = { | ||
/** | ||
* Sound roots drop-down menu. | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit( | ||
{ | ||
"message0": "%1", | ||
"args0": [ | ||
{ | ||
"type": "field_dropdown", | ||
"name": "ROOT", | ||
"options": [ | ||
['C', '0'], | ||
['C#', '1'], | ||
['D', '2'], | ||
['D#', '3'], | ||
['E', '4'], | ||
['F', '5'], | ||
['F#', '6'], | ||
['G', '7'], | ||
['G#', '8'], | ||
['A', '9'], | ||
['A#', '10'], | ||
['B', '11'] | ||
] | ||
} | ||
], | ||
"inputsInline": true, | ||
"output": "String", | ||
"colour": Blockly.Colours.sounds.secondary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary, | ||
"outputShape": Blockly.OUTPUT_SHAPE_ROUND | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_setkey'] = { | ||
/** | ||
* Block to set the musical key and scale for the play note block | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "set key %1 %2", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "ROOT" | ||
}, | ||
{ | ||
"type": "input_value", | ||
"name": "SCALE" | ||
} | ||
], | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_effects_menu'] = { | ||
/** | ||
* Sound effects drop-down menu. | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit( | ||
{ | ||
"message0": "%1", | ||
"args0": [ | ||
{ | ||
"type": "field_dropdown", | ||
"name": "EFFECT", | ||
"options": [ | ||
['echo', 'ECHO'], | ||
['pan left/right', 'PAN'], | ||
['reverb', 'REVERB'], | ||
['pitch', 'PITCH'] | ||
] | ||
} | ||
], | ||
"inputsInline": true, | ||
"output": "String", | ||
"colour": Blockly.Colours.sounds.secondary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary, | ||
"outputShape": Blockly.OUTPUT_SHAPE_ROUND | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_seteffectto'] = { | ||
/** | ||
* Block to set the audio effect | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "set effect %1 to %2", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "EFFECT" | ||
}, | ||
{ | ||
"type": "input_value", | ||
"name": "VALUE" | ||
} | ||
], | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_changeeffectby'] = { | ||
/** | ||
* Block to change the audio effect | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "change effect %1 by %2", | ||
"args0": [ | ||
{ | ||
"type": "input_value", | ||
"name": "EFFECT" | ||
}, | ||
{ | ||
"type": "input_value", | ||
"name": "VALUE" | ||
} | ||
], | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_cleareffects'] = { | ||
/** | ||
* Block to clear audio effects | ||
* @this Blockly.Block | ||
*/ | ||
init: function() { | ||
this.jsonInit({ | ||
"message0": "clear audio effects", | ||
"previousStatement": null, | ||
"nextStatement": null, | ||
"colour": Blockly.Colours.sounds.primary, | ||
"colourSecondary": Blockly.Colours.sounds.secondary, | ||
"colourTertiary": Blockly.Colours.sounds.tertiary | ||
}); | ||
} | ||
}; | ||
Blockly.Blocks['sound_setinstrumentto'] = { | ||
@@ -215,0 +528,0 @@ /** |
{ | ||
"name": "scratch-blocks", | ||
"version": "0.1.0-prerelease.1476378634", | ||
"version": "0.1.0-prerelease.1476381009", | ||
"description": "Scratch Blocks is a library for building creative computing interfaces.", | ||
@@ -11,3 +11,3 @@ "author": "Massachusetts Institute of Technology", | ||
"url": "https://github.com/LLK/scratch-blocks.git", | ||
"sha": "84419c9cb33f398c32f47c72249dd0ffcee43987" | ||
"sha": "b90221cd73754ca06efa78061b83709d9481d4c7" | ||
}, | ||
@@ -14,0 +14,0 @@ "main": "./dist/vertical.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
5672890
54378