Skip to content

Commit 60113f0

Browse files
apsinghdevwalterbenderBeNikkAnas-2357dependabot[bot]
authored
docs: add documentation for collaboration functionality (#4034)
* fixes #3913 * fix:resolves grid position on hamburger opening(#3914) (#3924) * fix:resolves hamburger opening(#3914) * fix:fixes #3914(suggested changes done) * adjust size of grid element repositioning when using aux toolbar --------- Co-authored-by: Walter Bender <[email protected]> * Fix input boxes (#3927) * bump version * enhancement: scale on hover (#3926) Co-authored-by: anas2357 <[email protected]> * calculate frequencies from ratio * Add close button to extended-menu pie menu (fixes #3933) (#3934) * Bump braces and gulp (#3903) Bumps [braces](https://github.com/micromatch/braces) to 3.0.3 and updates ancestor dependency [gulp](https://github.com/gulpjs/gulp). These dependencies need to be updated together. Updates `braces` from 2.3.2 to 3.0.3 - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/commits/3.0.3) Updates `gulp` from 4.0.2 to 5.0.0 - [Release notes](https://github.com/gulpjs/gulp/releases) - [Changelog](https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md) - [Commits](gulpjs/gulp@v4.0.2...v5.0.0) --- updated-dependencies: - dependency-name: braces dependency-type: indirect - dependency-name: gulp dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add support for solfege accidentals in phrasemaker * Add support for cents (#3937) * add support for cents through semi-tone transposition * add 50 cents macro * add cents example * add output frequencies * fix issue with ratio cents * add a ratio-cents example * Ratio transpose and Ratio interval (#3936) * use processPitch for all pitch types * Add support for cents (#3937) * add support for cents through semi-tone transposition * add 50 cents macro * add cents example * add output frequencies * fix issue with ratio cents * add a ratio-cents example * use processPitch for all pitch types * convert freq to note before scalar step * fix note convert * remove extra comma throwing off indexing * Hyperscore link update (#3939) (#3947) * Update Hyperscore example link in guide.html (#3944) * Update README.md (#3943) * left_and_back_images (#3950) * Updated Dockerfile (#3949) * Update README.md * Update dockerfile * remove yjs and socket.io dependecies * Fixed #3956 Auto increasing and decreasing input block (#3957) * fixes #3941 * fixes #3958 * Fixes collapsed state of note block (#3961) * fixes issue with extra line number in JavaScript Editor (#3962) * fixes sample block duplication issue (#3965) * fixes sample block duplication issue * changed error message * updated error message * updated planet image on documentation (#3971) * updated planet image on documentation fixes issue number: 3968 * updated images * removed overlap between two images * fix 1MB file size limit on audio sample imports (#3976) * enforce 1MB limit on audio sample imports * update sampler.js * updated error msg * update wheelnav.js (#3977) * Fixes #3972 Highlight should not activate when code is being run (#3975) * Fixes #3972 Highlight should not activate when code is being run * optimized the code by using existing flag * optimized the code by using existing flag * fixes #3972 * removed extra code (#3980) * Fixes #3973 Right click menu only opens in the advanced mode (#3978) * Contextmenu only opens in advanced mode * Added indentation and changed the if condition * FIXES ISSUE #3895 Add alphabet "G" as a block found in easy mode (#3979) * FIXES ISSUE #3895 Add alphabet "G" as a block found in easy mode The requirement of this bug is to add the pitch G4 nad Alphabet G block in pitch menu of the beginner mode. * FIXES ISSUE #3895 Add alphabet "G" and Sol as a block found in easy mode It adds the sol pitch block in the pitch menu of beginner's mode * AI BLOCK and Documentation on How to add widget in MB (#3964) * clean code , added comments * added abc lib * added debug statement * fix : Formatting , Function method & method Func * add function description * added AI BLOCKS and DOCS * change canvas to editor text * changed canvas to edit text,added hint * Fix: suggestion in AI Block & AI block structure * added groq api * Added midi support to MB (#3904) * added midi support * made corrections * added note approximations * added action blocks to start block * added action block to start blk * made corrections * break also into multiple action block when noteblock count exceeds 24 * added break statement in case of no of tracks more than 1 * added start blocks corresponding each track * added meter and tempo information * added scaling factor and load as midi feture * added default timesignatures * added drum mapper * removed set instrument in case of percussion * added an extra condtion when the new note start is less than previous note * added minor changes * removed the scaling factor earlier added * added names to start blocks * modifications for clarity * add abacus example * Rhythm block doesn't repeat issue update (#3982) * Rhythm block doesn't repeat issue update * removed console log messages * added console log message for testing * fixes #3931 Rhythm block doesn't repeat when outside of PhraseMaker * add more steps to new palette instructions * fix: remove redundant code to achieve DRY consistency (#3988) * removed extra code * update block.js * update block.js (#3989) * refactor: Simplify note processing logic, remove an empty file (#3991) * Update drum block setup to make it more compact (#3992) * refactor: update indexOf () === -1 to ! includes (#3993) * update activity.js * update block.js * update activity.js * Revert "update activity.js" This reverts commit c61110f. * update activity.js * update blocks.js * update piemenu.js * update musicutils.js * update blockfactory.js * update turtle-singer.js * update lilypond.js * update logo.js * update macros.js * update palette.js * update notation.js * update DrumBlocks.js * update GraphicsBlocks.js * update PenBlocks.js * used regex to shrink code (#3996) * introduced a setupFunctions array to group all the setup function call, add uses export statements for BACKWARDCOMPATIBILIYDICT and initBasicProtoBlocks, instead of comments to indicate exports (#3994) * Revert "introduced a setupFunctions array to group all the setup function call, add uses export statements for BACKWARDCOMPATIBILIYDICT and initBasicProtoBlocks, instead of comments to indicate exports (#3994)" This reverts commit a6f3514. * move all saved state into a single object (#3998) * move all saved state into a single object, remove unnecessarya variable declarations * re-add some variable names to avoid breaking code, and remove singer.notesPlayed * refactor: update indexOf () === -1 to ! includes (#4001) * update PitchBlocks.js * update ProgramBlocks.js * update VolumeBlocks.js * update WidgetBlocks.js * update IntervalsActions.js * update PitchActions.js * update RhythmActions.js * update ToneActions.js * update VolumeActions.js * update utils.js * update arpeggio.js * update musickeyboards.js * update phrasemaker.js * update rhythmruler.js * update generate.js * update interface.js * update mathutils.js * update synthutils.js * update help.js * update helper.js * ABC to MB Parser (#3925) * clean code , added comments * added abc lib * added debug statement * fix : Formatting , Function method & method Func * add function description --------- Co-authored-by: Walter Bender <[email protected]> * clean up javascript formatting * Feat/add record button and playback button in sampler widget (#3813) * added recording and playback button * upd * added recording started,completed msg and button disabled when no url * updated icons * added sample for waveform * upd * added the required changes,play sample pitch,create sample with setinstrument * FIXES ISSUE #4000 Regression: 'Set Default Instrument' Block Converts to 'Unknown' Block (#4006) By this commit the set default instrument block is working fine. * Add More Frequent "RUN LIVE" Links to Music Blocks Programming Guide (#3999) * Added RUN LIVE option * Added RUN LIVE option * Added new RUN LIVE links * use object lookup for convertDuration instead of switch (#4003) * Streamline Drumname for early return of drum post http match, use object lookup (#4008) * drum returns quicker post http match, use object lookup instead of a for loop * add value matches * FIXES ISSUE #3921 Reexamine our default temperament list (#4010) * Updating musicutils.js in order to change the name of the temperament name list FIXES ISSUE #3921 Reexamine our default temperament list * Updating piemenus.js FIXES ISSUE #3921 Reexamine our default temperament list In order to fix all the names perfectly in the menu i increased the size of the basic pie menu for the temperament name block * new strings * string repair * new strings * add missing translation * cleanup * reuse strings * update sampler.js (#4013) * fix all lint + Base64Encode errors (#4015) * revert part of 4015 * Fixed mouse event malfunctioning (#4021) * FIXME: Implement pickup measures and multi-voice support in abc.js (#4020) * fix the pickup todo in abc notation * remove todo * Fix search box hover behavior replacing input text (#4027) * Fix search box hover behavior replacing input text * Fix hover behavior and improve scrolling for search box * Remove line as weblate has issue with parsing it. Signed-off-by: Chihurumnaya Ibiam <[email protected]> * Remove other comments Weblate seems to have issues with parsing them. Signed-off-by: Chihurumnaya Ibiam <[email protected]> * Revert "Remove line as weblate has issue with parsing it." This reverts commit 5abca9c. Signed-off-by: Chihurumnaya Ibiam <[email protected]> * Weblate now parses po files. Adding msgstr and msgid at the top of the files makes it easy for weblate to parse. Signed-off-by: Chihurumnaya Ibiam <[email protected]> * FIXES ISSUE #4018 More default EDOs for temperament (#4022) By these changes user can experience some of the most common Equal temperaments Equal 5EDO Equal 7EDO Equal 19EDO Equal 31EDO * new strings * new strings * add missing header strings * FIXES ISSUE #4018 More default EDOs for temperament (#4029) changes the define temperament block's frequency selection from division to exponential format * fix all eslint errors along with base64encode error (#4030) * fix eslint & renderLanguageSelectIcon logic (#4031) * docs: add documentation for collaboration --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Chihurumnaya Ibiam <[email protected]> Co-authored-by: Walter Bender <[email protected]> Co-authored-by: Nikhil <[email protected]> Co-authored-by: Anas <[email protected]> Co-authored-by: anas2357 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Walter Bender <[email protected]> Co-authored-by: Harshit Verma <[email protected]> Co-authored-by: Geeten Parab <[email protected]> Co-authored-by: akilesh1706 <[email protected]> Co-authored-by: Khadar vali <[email protected]> Co-authored-by: Muhammad Haroon <[email protected]> Co-authored-by: AnupamGaur <[email protected]> Co-authored-by: omsuneri <[email protected]> Co-authored-by: abhijeet <[email protected]> Co-authored-by: Mubashir Shariq <[email protected]> Co-authored-by: amrit <[email protected]> Co-authored-by: dubeanant <[email protected]> Co-authored-by: Soumyaranjan Panda <[email protected]> Co-authored-by: Chihurumnaya Ibiam <[email protected]> Co-authored-by: Ajeet Pratap Singh <[email protected]>
1 parent e0b0517 commit 60113f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+90903
-88614
lines changed

css/activities.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
transition: width 0.4s ease-in-out;
6262
font-size: 24px;
6363
color: black;
64+
max-width: 100%;
6465
}
6566

6667
#search:focus {
@@ -75,6 +76,8 @@
7576
position: relative;
7677
background-color: rgba(255, 255, 255, 1);
7778
max-width: 396px;
79+
max-height: 200px;
80+
overflow-y: auto;
7881
font-size: 18px;
7982
border: 2px solid #87cefa;
8083
list-style-type: none;

js/abc.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const processABCNotes = function(logo, turtle) {
8686

8787
for (const [key, value] of Object.entries(replacements)) {
8888
if (note.includes(key)) {
89-
note = note.replace(new RegExp(key, 'g'), value);
89+
note = note.replace(new RegExp(key, "g"), value);
9090
if (key.length === 1) break;
9191
}
9292
}
@@ -153,15 +153,28 @@ const processABCNotes = function(logo, turtle) {
153153
i += 2;
154154
break;
155155
case "pickup":
156-
// FIXME: how does one define pickup in ABC notation?
157-
i += 1;
156+
{
157+
// Handle pickup measure
158+
const pickupDuration = logo.notation.notationStaging[turtle][i + 1];
159+
logo.notationNotes[turtle] += `K: pickup=${pickupDuration}\n`;
160+
i += 1;
161+
} // <- made a seperate block for this since js doesnt allow declaration of variables using let or const directly inside a case block
158162
break;
159163
case "voice one":
164+
logo.notationNotes[turtle] += "V:1\n";
165+
break;
160166
case "voice two":
167+
logo.notationNotes[turtle] += "V:2\n";
168+
break;
161169
case "voice three":
170+
logo.notationNotes[turtle] += "V:3\n";
171+
break;
162172
case "voice four":
173+
logo.notationNotes[turtle] += "V:4\n";
174+
break;
163175
case "one voice":
164-
// FIXME: how does one define multi-voice in ABC notation?
176+
// Return to a single voice
177+
logo.notationNotes[turtle] += "V:1\n";
165178
break;
166179
default:
167180
logo.notationNotes[turtle] += obj;
@@ -223,7 +236,7 @@ const processABCNotes = function(logo, turtle) {
223236
}
224237
}
225238

226-
/**
239+
/**
227240
* Processes an incomplete tuplet and appends the corresponding ABC notation to the notation string.
228241
* @param {object} logo - The logo object containing notation information.
229242
* @param {string} turtle - The identifier for the turtle.
@@ -424,4 +437,4 @@ const saveAbcOutput = function(activity) {
424437

425438
activity.logo.notationOutput += "\n";
426439
return activity.logo.notationOutput;
427-
};
440+
};

js/activity.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,27 +2427,27 @@ class Activity {
24272427
that.doSearch();
24282428
if (event.keyCode === 13) this.searchWidget.style.visibility = "visible";
24292429
},
2430-
focus: (event, ui) => {
2430+
focus: (event) => {
24312431
event.preventDefault();
2432-
that.searchWidget.value = ui.item.label;
24332432
}
24342433
});
24352434

2436-
$j("#search").autocomplete("widget").addClass("scrollSearch");
2437-
24382435
$j("#search").autocomplete("instance")._renderItem = (ul, item) => {
24392436
return $j("<li></li>")
24402437
.data("item.autocomplete", item)
24412438
.append(
24422439
'<img src="' +
24432440
item.artwork +
2444-
'" height = "20px">' +
2445-
"<a>" +
2446-
" " +
2441+
'" height="20px">' +
2442+
"<a> " +
24472443
item.label +
24482444
"</a>"
24492445
)
2450-
.appendTo(ul.css("z-index", 9999));
2446+
.appendTo(ul.css({
2447+
"z-index": 9999,
2448+
"max-height": "200px",
2449+
"overflow-y": "auto"
2450+
}));
24512451
};
24522452
const searchInput = this.searchWidget.idInput_custom;
24532453
if (!searchInput || searchInput.length <= 0) return;
@@ -6166,7 +6166,7 @@ class Activity {
61666166

61676167
document.addEventListener("mousemove", (event) => {
61686168
this.hasMouseMoved = true;
6169-
event.preventDefault();
6169+
// event.preventDefault();
61706170
// this.selectedBlocks = [];
61716171
if (this.isDragging){
61726172
this.currentX = event.clientX;

js/block.js

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
DISABLEDFILLCOLOR, DISABLEDSTROKECOLOR, docById, DOUBLEFLAT,
2323
DOUBLESHARP, DRUMNAMES, EASTINDIANSOLFNOTES, EFFECTSNAMES,
2424
EXPANDBUTTON, FILTERTYPES, FLAT, getDrumName, getDrumSynthName,
25-
getModeNumbers, getNoiseName, getNoiseSynthName, getTemperament,
26-
getTemperamentKeys, getTemperamentsList, getTextWidth,
27-
getVoiceSynthName, hideDOMLabel, HIGHLIGHTSTROKECOLORS,
25+
getModeNumbers, getNoiseName, getTemperament, getTemperamentKeys,
26+
getTemperamentsList, getTextWidth, hideDOMLabel, HIGHLIGHTSTROKECOLORS,
2827
i18nSolfege, INVERTMODES, isCustomTemperament, last, MEDIASAFEAREA,
2928
NATURAL, NOISENAMES, NSYMBOLS, NUMBERBLOCKDEFAULT, OSCTYPES,
3029
PALETTEFILLCOLORS, PALETTEHIGHLIGHTCOLORS, PALETTESTROKECOLORS,
@@ -966,8 +965,7 @@ class Block {
966965

967966
if (this.image.search("xmlns") !== -1) {
968967
image.src =
969-
"data:image/svg+xml;base64," +
970-
window.btoa(base64Encode(this.image));
968+
"data:image/svg+xml;base64," + window.btoa(window.base64Encode(this.image));
971969
} else {
972970
image.src = this.image;
973971
}
@@ -1518,8 +1516,7 @@ class Block {
15181516
};
15191517

15201518
image.src =
1521-
"data:image/svg+xml;base64," +
1522-
window.btoa(base64Encode(COLLAPSEBUTTON));
1519+
"data:image/svg+xml;base64," + window.btoa(base64Encode(COLLAPSEBUTTON));
15231520
};
15241521

15251522
/**
@@ -1551,8 +1548,7 @@ class Block {
15511548
};
15521549

15531550
image.src =
1554-
"data:image/svg+xml;base64," +
1555-
window.btoa(base64Encode(EXPANDBUTTON));
1551+
"data:image/svg+xml;base64," + window.btoa(base64Encode(EXPANDBUTTON));
15561552
};
15571553

15581554
/**
@@ -2942,9 +2938,9 @@ class Block {
29422938
if (
29432939
that?.name === "vspace" &&
29442940
that.blocks.blockList[that.connections[1]]?.name === "rest2"
2945-
) {
2941+
) {
29462942
return;
2947-
}
2943+
}
29482944

29492945
// Do not allow a stack of blocks to be dragged if the stack contains a silence block.
29502946
let block = that.blocks.blockList[that.connections[1]];
@@ -3382,21 +3378,20 @@ class Block {
33823378

33833379
const labelElem = docById("labelDiv");
33843380

3385-
var safetext = function(text){
3381+
const safetext = (text) => {
33863382
// Best to avoid using these special characters in text strings
33873383
// without first converting them to their "safe" form.
3388-
var table = {
3389-
'<': 'lt',
3390-
'>': 'gt',
3391-
'"': 'quot',
3392-
'\'': 'apos',
3393-
'&': 'amp',
3394-
'\r': '#10',
3395-
'\n': '#13'
3384+
const table = {
3385+
"<": "lt",
3386+
">": "gt",
3387+
'"': "quot",
3388+
"'": "apos",
3389+
"&": "amp",
3390+
"\r": "#10",
3391+
"\n": "#13"
33963392
};
3397-
3398-
return text.toString().replace(/[<>"'\r\n&]/g, function(chr){
3399-
return '&' + table[chr] + ';';
3393+
return text.toString().replace(/[<>"'\r\n&]/g, (chr) => {
3394+
return "&" + table[chr] + ";";
34003395
});
34013396
};
34023397

js/collaboration/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)