@@ -1740,10 +1740,39 @@ export default {
1740
1740
var dropdown_note = block .getFieldValue (' note' );
1741
1741
var dropdown_instrument = block .getFieldValue (' instrument' );
1742
1742
var value_duration = Blockly .Python .valueToCode (block, ' duration' , Blockly .Python .ORDER_ATOMIC );
1743
- var code = ' get_music().play_note("' + dropdown_note+ ' ","' + dropdown_instrument+ ' ","' + value_duration+ ' ")\n ' ;
1743
+ var alteration = " none"
1744
+ var code = ' get_music().play_note("' + dropdown_note+ ' ","' + dropdown_instrument+ ' ","' + alteration+ ' ","' + value_duration+ ' ")\n ' ;
1744
1745
return code;
1745
1746
}
1746
1747
1748
+
1749
+ Blockly .Blocks [' coderbot_animal_verse_std' ] = {
1750
+ init : function () {
1751
+ this .appendDummyInput ()
1752
+ .appendField (new Blockly.FieldImage (" /static/images/blocks/animal.png" , 30 , 30 , { alt: " note" , flipRtl: " FALSE" }))
1753
+ .appendField (" nota" )
1754
+ .appendField (new Blockly.FieldDropdown ([[" DO " ," C2" ], [" RE " ," D2" ], [" MI " ," E2" ], [" FA " ," F2" ], [" FA # " ," F#2" ], [" SOL " ," G2" ], [" LA " ," A2" ], [" SI b " ," Bb2" ], [" SI " ," B2" ], [" DO+ " ," C3" ], [" RE+ " ," D3" ], [" PAUSA" ," PAUSE" ]]), " note" );
1755
+ this .appendDummyInput ()
1756
+ .appendField (" animale" )
1757
+ .appendField (new Blockly.FieldDropdown ([[" Gatto" ," cat" ], [" Cane" ," dog" ], [" Dinosaur" ," dinonsaur" ]]), " instrument" );
1758
+ this .appendValueInput (" duration" )
1759
+ .setCheck (" Number" )
1760
+ .setAlign (Blockly .ALIGN_CENTRE )
1761
+ .appendField (" durata" );
1762
+ this .appendDummyInput ()
1763
+ .appendField (" secondi" );
1764
+ this .setInputsInline (true );
1765
+ this .setPreviousStatement (true , null );
1766
+ this .setNextStatement (true , null );
1767
+ this .setColour (345 );
1768
+ this .setTooltip (" " );
1769
+ this .setHelpUrl (" " );
1770
+ }
1771
+ };
1772
+
1773
+
1774
+
1775
+
1747
1776
Blockly .Python [' coderbot_audio_listen' ] = function (block ) {
1748
1777
// Boolean values true and false.
1749
1778
var model = block .getFieldValue (' MODEL' );
0 commit comments