Skip to content

Commit 6e18b1c

Browse files
committed
free time -> no clock; move set key to intervals palette
1 parent 96a1126 commit 6e18b1c

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

js/basicblocks.js

+42-42
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,6 @@ function initBasicProtoBlocks(palettes, blocks) {
720720
bpmBlock.adjustWidthToLabel();
721721
bpmBlock.parameterBlock();
722722

723-
var driftBlock = new ProtoBlock('drift');
724-
driftBlock.palette = palettes.dict['rhythm'];
725-
blocks.protoBlockDict['drift'] = driftBlock;
726-
//.TRANS: don't lock notes to master clock ('run free')
727-
driftBlock.staticLabels.push(_('free time'));
728-
driftBlock.adjustWidthToLabel();
729-
driftBlock.flowClampZeroArgBlock();
730-
731723
var osctimeBlock = new ProtoBlock('osctime');
732724
osctimeBlock.palette = palettes.dict['rhythm'];
733725
blocks.protoBlockDict['osctime'] = osctimeBlock;
@@ -908,6 +900,14 @@ function initBasicProtoBlocks(palettes, blocks) {
908900

909901
// METER PALETTE
910902

903+
var driftBlock = new ProtoBlock('drift');
904+
driftBlock.palette = palettes.dict['meter'];
905+
blocks.protoBlockDict['drift'] = driftBlock;
906+
//.TRANS: don't lock notes to master clock
907+
driftBlock.staticLabels.push(_('no clock'));
908+
driftBlock.adjustWidthToLabel();
909+
driftBlock.flowClampZeroArgBlock();
910+
911911
var offBeatDoBlock = new ProtoBlock('offbeatdo');
912912
offBeatDoBlock.palette = palettes.dict['meter'];
913913
blocks.protoBlockDict['offbeatdo'] = offBeatDoBlock;
@@ -1009,40 +1009,6 @@ function initBasicProtoBlocks(palettes, blocks) {
10091009
slurFactor.adjustWidthToLabel();
10101010
slurFactor.parameterBlock();
10111011

1012-
var keyBlock = new ProtoBlock('key');
1013-
keyBlock.palette = palettes.dict['tone'];
1014-
blocks.protoBlockDict['key'] = keyBlock;
1015-
//.TRANS: the key is a group of pitches with which a music composition is created
1016-
keyBlock.staticLabels.push(_('key'));
1017-
keyBlock.adjustWidthToLabel();
1018-
keyBlock.parameterBlock();
1019-
1020-
// Deprecated
1021-
var setkeyBlock = new ProtoBlock('setkey');
1022-
setkeyBlock.hidden = true;
1023-
setkeyBlock.palette = palettes.dict['tone'];
1024-
blocks.protoBlockDict['setkey'] = setkeyBlock;
1025-
//.TRANS: set the key and mode, e.g. C Major
1026-
setkeyBlock.staticLabels.push(_('set key'));
1027-
setkeyBlock.adjustWidthToLabel();
1028-
setkeyBlock.oneArgBlock();
1029-
setkeyBlock.dockTypes[1] = 'textin';
1030-
setkeyBlock.defaults.push('C');
1031-
1032-
var setkey2Block = new ProtoBlock('setkey2');
1033-
setkey2Block.palette = palettes.dict['tone'];
1034-
blocks.protoBlockDict['setkey2'] = setkey2Block;
1035-
//.TRANS: set the key and mode, e.g. C Major
1036-
setkey2Block.staticLabels.push(_('set key'));
1037-
//.TRANS: key, e.g., C in C Major
1038-
setkey2Block.staticLabels.push(_('key'));
1039-
//.TRANS: mode, e.g., Major in C Major
1040-
setkey2Block.staticLabels.push(_('mode'));
1041-
setkey2Block.adjustWidthToLabel();
1042-
setkey2Block.twoArgBlock();
1043-
setkey2Block.dockTypes[1] = 'anyin';
1044-
setkey2Block.dockTypes[2] = 'anyin';
1045-
10461012
var amSynthBlock = new ProtoBlock('amsynth');
10471013
amSynthBlock.palette = palettes.dict['tone'];
10481014
blocks.protoBlockDict['amsynth'] = amSynthBlock;
@@ -1493,6 +1459,40 @@ function initBasicProtoBlocks(palettes, blocks) {
14931459
intervalBlock.flowClampOneArgBlock();
14941460
intervalBlock.defaults.push(5);
14951461

1462+
var keyBlock = new ProtoBlock('key');
1463+
keyBlock.palette = palettes.dict['intervals'];
1464+
blocks.protoBlockDict['key'] = keyBlock;
1465+
//.TRANS: the key is a group of pitches with which a music composition is created
1466+
keyBlock.staticLabels.push(_('key'));
1467+
keyBlock.adjustWidthToLabel();
1468+
keyBlock.parameterBlock();
1469+
1470+
// Deprecated
1471+
var setkeyBlock = new ProtoBlock('setkey');
1472+
setkeyBlock.hidden = true;
1473+
setkeyBlock.palette = palettes.dict['intervals'];
1474+
blocks.protoBlockDict['setkey'] = setkeyBlock;
1475+
//.TRANS: set the key and mode, e.g. C Major
1476+
setkeyBlock.staticLabels.push(_('set key'));
1477+
setkeyBlock.adjustWidthToLabel();
1478+
setkeyBlock.oneArgBlock();
1479+
setkeyBlock.dockTypes[1] = 'textin';
1480+
setkeyBlock.defaults.push('C');
1481+
1482+
var setkey2Block = new ProtoBlock('setkey2');
1483+
setkey2Block.palette = palettes.dict['intervals'];
1484+
blocks.protoBlockDict['setkey2'] = setkey2Block;
1485+
//.TRANS: set the key and mode, e.g. C Major
1486+
setkey2Block.staticLabels.push(_('set key'));
1487+
//.TRANS: key, e.g., C in C Major
1488+
setkey2Block.staticLabels.push(_('key'));
1489+
//.TRANS: mode, e.g., Major in C Major
1490+
setkey2Block.staticLabels.push(_('mode'));
1491+
setkey2Block.adjustWidthToLabel();
1492+
setkey2Block.twoArgBlock();
1493+
setkey2Block.dockTypes[1] = 'anyin';
1494+
setkey2Block.dockTypes[2] = 'anyin';
1495+
14961496
// DRUM PALETTE
14971497
var drumnameBlock = new ProtoBlock('drumname');
14981498
drumnameBlock.palette = palettes.dict['drum'];

0 commit comments

Comments
 (0)