Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add More Frequent "RUN LIVE" Links to Music Blocks Programming Guide #3999

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

dubeanant
Copy link
Contributor

@dubeanant dubeanant commented Sep 9, 2024

This pull request improves the Music Blocks Programming Guide by adding more "RUN LIVE" links throughout the document, particularly in sections with step-by-step screenshots. These additions aim to:

  • Increase Interactivity: Provide new users with more opportunities to experiment with Palette buttons and other features
    directly from the guide, similar to the Turtle Blocks guide's approach.
  • Enhance User Experience: Enable users to follow along more easily and tinker with examples as they read, thereby improving
    their learning experience.

Key Changes:

  • Added "RUN LIVE" links in sections where screenshots and descriptions are provided.
  • Ensured that all new links are functional and point to the correct interactive examples.

Commit Messages and Contribution Guidelines:

  • Each commit is clearly labeled and focused on a specific addition or improvement to maintain a clean and organized commit
    history.
  • The PR name directly reflects the content of the changes made.
  • Extensive testing has been conducted to ensure that all links and changes function correctly.
  • The PR description provides a concise summary of what has been addressed and how it improves the guide.
  • This PR is ready for review and merging.

Closes #3843.

guide/README.md Outdated
@@ -1233,6 +1254,7 @@ block. In the example above, the default instrument is set to piano,
so any note that is not inside of a *Set instrument* block will be
played using the piano synthesizer. The first note in this example is
piano; the second note is guitar; and the third is piano.
[RUN LIVE](https://musicblocks.sugarlabs.org/index.html?id=1725869737763127&run=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked at all of these examples, but I did look at this one. The example you generated does not match the text or illustration. Please double check these live examples.

Copy link
Contributor Author

@dubeanant dubeanant Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @walterbender,

I checked the "RUN LIVE" link and found that I am unable to use the "Set Default Instrument" block. Whenever I select it, the block is converted to an "Unknown" block.
Screenshot 2024-09-10 224437

As for the other link, I will double-check it tomorrow and create a pull request again.

Copy link
Contributor Author

@dubeanant dubeanant Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also @walterbender , could you please advise on what to do about this "RUN LIVE" link? I am currently unable to use "set default instrument" block.

https://musicblocks.sugarlabs.org/index.html?id=1725869737763127&run=True

This is my first open-source contribution, so I apologize for any mistakes I may have made. I would greatly appreciate your guidance and support on this journey.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. There seems to be a regression with the set default instrument block. We'll have to sort it out. Maybe leave that example out of your PR, since it is not correct? And maybe you can write up an issue on the broken block?

In general, your PR is very nice. But it is only by chance that I picked up on the errant example. In the future, it would be good to make a note of such discrepancies in your commit message or PR description.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, once you create the issue, maybe try to fix the regression? A quick look at js/blocks/ToneBlocks.js reveals that the macro definition for setdefaultinstrument is using the wrong block name. Should be an easy fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @walterbender ,
I have raised the regression issue, but I'm unable to solve it because I can't open the Music Blocks project on my localhost. I have tried everything but it just load, and it was working two days ago, but now it's not opening. Until this problem is resolved, I don't think I'll be able to contribute to any issues other than documentation.

Screen.Recording.2024-09-12.105305.mp4

Could you please guide me on what to do to open the Music Blocks project on my localhost again?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you trying from a local server or directly from index.html? Can you share any console output? Are you sure that you have the current master on your machine?

Copy link
Contributor Author

@dubeanant dubeanant Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @walterbender , I have tried running it multiple times on my local server, and there are no errors in my console. I also tried the same setup on another laptop, and it worked, but I’m not sure why it's not working on mine.

Additionally, I have added some new links to the documentation and double-checked the other live links, so you can review it again and let me know if there are any issues with my PR this time. I have assigned the regression issue to @omsuneri due to the current problem with my laptop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try running by opening the file (index.html) directly from your browser. You should see errors in the console if it doesn't load properly. (The fact that it worked on another machine makes me think that perhaps the version you are running is not up-to-date with the master branch. What is the last commit on master you are seeing?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running the project by opening the file (index.html) directly from my browser, but I am still having the same problem. One of the main issues is that I cannot open the console while it's loading. The last commit I made on the master branch was today, with the message "Added new RUN LIVE links."
Screenshot 2024-09-12 210005

@walterbender
Copy link
Member

not sure why you cannot open the console. What browser are you using?
In regards to the commit, I am interested in what the last commit was BEFORE you added your changes.git log will help determine that.

@dubeanant
Copy link
Contributor Author

So @walterbender, I think I can solve this problem by creating a new fork of the repository, which will have 0 commits ahead. This should fix the issue of opening the project. Before I do that, please review my current pull request so I can delete this repository. Once it's deleted, I won’t be able to make changes to this PR anymore, so I’d appreciate it if you could review it soon.

Apologies for the delayed response—I was traveling and just got a chance to reply.

@walterbender
Copy link
Member

The PR looks fine but I haven't checked every example.

@dubeanant
Copy link
Contributor Author

@walterbender, I would really like to start contributing to Music Blocks, so could you please check every example a little faster? If you'd like, I can help check the examples to speed up the process. Apologies if I’m being a bit persistent, but I’m eager to contribute to Sugar Labs.

@walterbender walterbender merged commit 2f545e2 into sugarlabs:master Sep 15, 2024
walterbender added a commit that referenced this pull request Sep 24, 2024
* 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 <walter@sorcero.com>

* Fix input boxes (#3927)

* bump version

* enhancement: scale on hover (#3926)

Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>

* 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] <support@github.com>
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 <walter@sugarlabs.org>

* 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

* chore: add textMsg-on-disconnect

* 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

* chore: remove $ operator

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Walter Bender <walter@sorcero.com>
Co-authored-by: Nikhil <154296996+BeNikk@users.noreply.github.com>
Co-authored-by: Anas <141234155+Anas-2357@users.noreply.github.com>
Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Walter Bender <walter@sugarlabs.org>
Co-authored-by: Harshit Verma <therealharshit014@gmail.com>
Co-authored-by: Geeten Parab <147247925+GeetenParab@users.noreply.github.com>
Co-authored-by: akilesh1706 <126157319+akilesh1706@users.noreply.github.com>
Co-authored-by: Khadar vali <124120102+khadar1020@users.noreply.github.com>
Co-authored-by: Muhammad Haroon <104259212+haroon10725@users.noreply.github.com>
Co-authored-by: AnupamGaur <86046454+AnupamGaur@users.noreply.github.com>
Co-authored-by: omsuneri <142336291+omsuneri@users.noreply.github.com>
Co-authored-by: abhijeet <102318826+abhijeetsingh0401@users.noreply.github.com>
Co-authored-by: Mubashir  Shariq <103755591+Mubashirshariq@users.noreply.github.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: dubeanant <147899880+dubeanant@users.noreply.github.com>
walterbender added a commit that referenced this pull request Sep 27, 2024
…nd `Load project from file` events (#4014)

* 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 <walter@sorcero.com>

* Fix input boxes (#3927)

* bump version

* enhancement: scale on hover (#3926)

Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>

* 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] <support@github.com>
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 <walter@sugarlabs.org>

* 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

* feat: add event for exit-collaboration

* feat: add flag to indicate exit of user

* feat: function to remove mouses, set the flag and disconnect

* feat: emit exit-collaboration event on new-project, load-project-from-file

* feat: emit exit-collaboration event on new-project in planet

* feat: listen exit-collaboration event and exit the collaboration

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Walter Bender <walter@sorcero.com>
Co-authored-by: Nikhil <154296996+BeNikk@users.noreply.github.com>
Co-authored-by: Anas <141234155+Anas-2357@users.noreply.github.com>
Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Walter Bender <walter@sugarlabs.org>
Co-authored-by: Harshit Verma <therealharshit014@gmail.com>
Co-authored-by: Geeten Parab <147247925+GeetenParab@users.noreply.github.com>
Co-authored-by: akilesh1706 <126157319+akilesh1706@users.noreply.github.com>
Co-authored-by: Khadar vali <124120102+khadar1020@users.noreply.github.com>
Co-authored-by: Muhammad Haroon <104259212+haroon10725@users.noreply.github.com>
Co-authored-by: AnupamGaur <86046454+AnupamGaur@users.noreply.github.com>
Co-authored-by: omsuneri <142336291+omsuneri@users.noreply.github.com>
Co-authored-by: abhijeet <102318826+abhijeetsingh0401@users.noreply.github.com>
Co-authored-by: Mubashir  Shariq <103755591+Mubashirshariq@users.noreply.github.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: dubeanant <147899880+dubeanant@users.noreply.github.com>
walterbender added a commit that referenced this pull request Oct 13, 2024
* 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 <walter@sorcero.com>

* Fix input boxes (#3927)

* bump version

* enhancement: scale on hover (#3926)

Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>

* 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] <support@github.com>
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 <walter@sugarlabs.org>

* 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 <ibiam@sugarlabs.org>

* Remove other comments

Weblate seems to have issues with parsing them.

Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>

* Revert "Remove line as weblate has issue with parsing it."

This reverts commit 5abca9c.

Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>

* 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 <ibiam@sugarlabs.org>

* 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] <support@github.com>
Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
Co-authored-by: Walter Bender <walter@sorcero.com>
Co-authored-by: Nikhil <154296996+BeNikk@users.noreply.github.com>
Co-authored-by: Anas <141234155+Anas-2357@users.noreply.github.com>
Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Walter Bender <walter@sugarlabs.org>
Co-authored-by: Harshit Verma <therealharshit014@gmail.com>
Co-authored-by: Geeten Parab <147247925+GeetenParab@users.noreply.github.com>
Co-authored-by: akilesh1706 <126157319+akilesh1706@users.noreply.github.com>
Co-authored-by: Khadar vali <124120102+khadar1020@users.noreply.github.com>
Co-authored-by: Muhammad Haroon <104259212+haroon10725@users.noreply.github.com>
Co-authored-by: AnupamGaur <86046454+AnupamGaur@users.noreply.github.com>
Co-authored-by: omsuneri <142336291+omsuneri@users.noreply.github.com>
Co-authored-by: abhijeet <102318826+abhijeetsingh0401@users.noreply.github.com>
Co-authored-by: Mubashir  Shariq <103755591+Mubashirshariq@users.noreply.github.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: dubeanant <147899880+dubeanant@users.noreply.github.com>
Co-authored-by: Soumyaranjan Panda <84384924+soumyaranjan-panda@users.noreply.github.com>
Co-authored-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
Co-authored-by: Ajeet Pratap Singh <ajeetpratapsingh@Ajeets-MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Music Blocks Programming Guide should have more frequent "RUN LIVE" links
2 participants