Skip to content

Commit

Permalink
[3851] - chore: cleanup unused library bundles and temporary `Collabo…
Browse files Browse the repository at this point in the history
…ration` button. (#3997)

* 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.

* chore: remove socketio lib bundle

* chore: remove yjs lib bundle

* chore: remove socketio and yjs imports

* chore: remove collaboraion button (ui and logic both)

---------

Signed-off-by: dependabot[bot] <[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]>
  • Loading branch information
17 people authored Sep 10, 2024
1 parent dd3e410 commit 0151970
Show file tree
Hide file tree
Showing 23 changed files with 337 additions and 434 deletions.
Empty file removed ,
Empty file.
14 changes: 0 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
integrity="sha384-2huaZvOR9iDzHqslqwpR87isEmrfxqyWOF7hr7BY6KG0+hVKLoEXMPUJw3ynWuhO"
crossorigin="anonymous"></script>

<script src="lib/yjs.min.js" ></script>

<!-- <script src="lib/socket.io.min.js" ></script> -->

<!-- <script src="js/widgets/musickeyboard.js"></script> -->

<!-- <script src="lib/movieclip-0.7.1.min.js"></script> -->
Expand Down Expand Up @@ -802,16 +798,6 @@
>
<a style="color: transparent;">space&nbsp;&nbsp;&nbsp;</a>
</li>
<li>
<a
id="collaborateIcon"
class="tooltipped"
data-position="bottom"
><i class="material-icons md-48"
>groups</i
></a
>
</li>
<li>
<a
id="restoreIcon"
Expand Down
80 changes: 25 additions & 55 deletions js/abc.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,69 +89,39 @@ const processABCNotes = function(logo, turtle) {
// Also, notes must be lowercase.
// And the octave bounday is at C, not A.

// Convert frequencies here.
if (typeof note === "number") {
const pitchObj = frequencyToPitch(note);
note = pitchObj[0] + pitchObj[1];
}

if (note.indexOf("♯") > -1) {
note = "^" + note.replace("♯", "");
}
// check for double sharp
if (note.indexOf("♯") > -1) {
note = "^" + note.replace(//g, "");
}

if (note.indexOf("♭") > -1) {
note = "_" + note.replace("♭", "");
}
// check for double flat
if (note.indexOf("♭") > -1) {
note = "_" + note.replace(//g, "");
}

if (note.indexOf("10") > -1) {
return note.replace("10", "'''''").toLowerCase();
}

if (note.indexOf("9") > -1) {
return note.replace("9", "''''").toLowerCase();
}

if (note.indexOf("8") > -1) {
return note.replace("8", "'''").toLowerCase();
}

if (note.indexOf("7") > -1) {
return note.replace("7", "''").toLowerCase();
}

if (note.indexOf("6") > -1) {
return note.replace("6", "'").toLowerCase();
}

if (note.indexOf("5") > -1) {
return note.replace("5", "").toLowerCase();
}

if (note.indexOf("4") > -1) {
return note.replace("4", "").toUpperCase();
}

if (note.indexOf("3") > -1) {
return note.replace("3", ",").toUpperCase();
}

if (note.indexOf("2") > -1) {
return note.replace("2", ",,").toUpperCase();
const replacements = {
"♯": "^",
"♭": "_",
"10": "'''''",
"9": "''''",
"8": "'''",
"7": "''",
"6": "'",
"5": "",
"4": "",
"3": ",",
"2": ",,",
"1": ",,,"
};

for (const [key, value] of Object.entries(replacements)) {
if (note.includes(key)) {
note = note.replace(new RegExp(key, 'g'), value);
if (key.length === 1) break;
}
}

if (note.indexOf("1") > -1) {
return note.replace("1", ",,,").toUpperCase();
// Convert to uppercase or lowercase based on the octave
if (note.includes("'''") || note.includes("''") || note.includes("'") || note.includes("")) {
return note.toLowerCase();
} else {
return note.toUpperCase();
}

return note.toUpperCase();
};

let counter = 0;
Expand Down
39 changes: 19 additions & 20 deletions js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class Activity {
document.webL10n.setLanguage(lang);
} else {
lang = navigator.language;
if (lang.indexOf("-") !== -1) {
if (lang.includes("-")) {
lang = lang.slice(0, lang.indexOf("-"));
document.webL10n.setLanguage(lang);
}
Expand Down Expand Up @@ -938,7 +938,7 @@ class Activity {
", " +
this.blocks.blockList[i].container.y +
')">';
if (SPECIALINPUTS.indexOf(this.blocks.blockList[i].name) !== -1) {
if (SPECIALINPUTS.includes(this.blocks.blockList[i].name)) {
for (let p = 1; p < parts.length; p++) {
// FIXME: This is fragile.
if (p === 1) {
Expand Down Expand Up @@ -985,7 +985,7 @@ class Activity {

if (this.blocks.blockList[i].isCollapsible()) {
let y;
if (INLINECOLLAPSIBLES.indexOf(this.blocks.blockList[i].name) !== -1) {
if (INLINECOLLAPSIBLES.includes(this.blocks.blockList[i].name)) {
y = this.blocks.blockList[i].container.y + 4;
} else {
y = this.blocks.blockList[i].container.y + 12;
Expand Down Expand Up @@ -2947,9 +2947,9 @@ class Activity {
}
if (
this.blocks.activeBlock === null ||
SPECIALINPUTS.indexOf(
!SPECIALINPUTS.includes(
this.blocks.blockList[this.blocks.activeBlock].name
) === -1
)
) {
this.logo.runLogoCommands();
}
Expand Down Expand Up @@ -3364,9 +3364,9 @@ class Activity {
for (let b = 0; b < this.blocks.dragGroup.length; b++) {
const me = this.blocks.blockList[this.blocks.dragGroup[b]];
if (
["nameddo", "nameddoArg", "namedcalc", "namedcalcArg"].indexOf(
["nameddo", "nameddoArg", "namedcalc", "namedcalcArg"].includes(
me.name
) !== -1 &&
) &&
me.privateData === oldName
) {
me.privateData = uniqueName;
Expand Down Expand Up @@ -5307,13 +5307,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.trebleSharpBitmap[i].x += dx;
this.trebleSharpBitmap[i].visible = true;
this.trebleSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.trebleFlatBitmap[i].x += dx;
this.trebleFlatBitmap[i].visible = true;
this.trebleFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -5350,13 +5350,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.grandSharpBitmap[i].x += dx;
this.grandSharpBitmap[i].visible = true;
this.grandSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.grandFlatBitmap[i].x += dx;
this.grandFlatBitmap[i].visible = true;
this.grandFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -5391,13 +5391,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.sopranoSharpBitmap[i].x += dx;
this.sopranoSharpBitmap[i].visible = true;
this.sopranoSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.sopranoFlatBitmap[i].x += dx;
this.sopranoFlatBitmap[i].visible = true;
this.sopranoFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -5437,13 +5437,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.altoSharpBitmap[i].x += dx;
this.altoSharpBitmap[i].visible = true;
this.altoSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.altoFlatBitmap[i].x += dx;
this.altoFlatBitmap[i].visible = true;
this.altoFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -5479,13 +5479,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.tenorSharpBitmap[i].x += dx;
this.tenorSharpBitmap[i].visible = true;
this.tenorSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.tenorFlatBitmap[i].x += dx;
this.tenorFlatBitmap[i].visible = true;
this.tenorFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -5522,13 +5522,13 @@ class Activity {
const _flats = ["B" + FLAT, "E" + FLAT, "A" + FLAT, "D" + FLAT, "G" + FLAT, "C" + FLAT, "F" + FLAT];
let dx = 0;
for (let i = 0; i < 7; i++) {
if (scale.indexOf(_sharps[i]) !== -1) {
if (scale.includes(_sharps[i])) {
this.bassSharpBitmap[i].x += dx;
this.bassSharpBitmap[i].visible = true;
this.bassSharpBitmap[i].updateCache();
dx += 15;
}
if (scale.indexOf(_flats[i]) !== -1) {
if (scale.includes(_flats[i])) {
this.bassFlatBitmap[i].x += dx;
this.bassFlatBitmap[i].visible = true;
this.bassFlatBitmap[i].updateCache();
Expand Down Expand Up @@ -6507,7 +6507,6 @@ class Activity {
if (_THIS_IS_MUSIC_BLOCKS_) {
this.toolbar.renderChooseKeyIcon(chooseKeyMenu);
}
this.toolbar.renderCollaborateIcon(initiateCollaboration);
this.toolbar.renderJavaScriptIcon(toggleJSWindow);
this.toolbar.renderLanguageSelectIcon(this.languageBox);
this.toolbar.renderWrapIcon();
Expand Down
5 changes: 1 addition & 4 deletions js/artwork.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0151970

Please sign in to comment.