Skip to content

Conversation

@AnvitaPrasad
Copy link
Contributor

Added tuner functionality and manual cent adjustment feature to the sampler widget.
Code cleanup and refinement in progress.

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

synthutils.test.js

@walterbender
Copy link
Member

Could you please rebase to master so that unrelated changes are removed? It is a bit confusing otherwise.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@AnvitaPrasad AnvitaPrasad marked this pull request as ready for review August 11, 2025 09:18
@walterbender
Copy link
Member

A minor tweak is needed to fix the paths to the svgs.

Screenshot From 2025-08-11 16-50-36

Please remove the ../ at the start of the paths for the flat and sharp icons.


// Assert
expect(instruments[turtle][instrumentName].start).toHaveBeenCalled();
// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

Just remove the test and make sure the commit message says this. No need to say it in a comment.

// Assert
expect(instruments[turtle][instrumentName].triggerAttackRelease)
.toHaveBeenCalledWith("C4", 1, expect.any(Number));
// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

same here

}).not.toThrow();
expect(consoleSpy).toHaveBeenCalled();

// Skip the console spy check as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

same here

expect(instruments[0]["electronic synth"].triggerAttackRelease)
.toHaveBeenCalledWith("G4", 1 / 4, expect.any(Number));

// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

and here

expect(instruments[0]["electronic synth"].triggerAttackRelease)
.toHaveBeenCalledWith("G4", 1 / 4, expect.any(Number));

// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

here

instance._performNotes(mockSynth, notes, 1, null, null, false, 0);

expect(mockSynth.triggerAttackRelease).toHaveBeenCalledWith(notes, 1, 0);
// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

here


// Assert
expect(mockSynth.triggerAttackRelease).toHaveBeenCalledWith(notes, beatValue, 0);
// Skip this test as the implementation has changed
Copy link
Member

Choose a reason for hiding this comment

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

here

}).not.toThrow();


// Skip this test as it's likely incompatible with the new implementation
Copy link
Member

Choose a reason for hiding this comment

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

and here... I think that is all of them

@walterbender
Copy link
Member

Also, your contributions to synthutils, sampler, and tuner are significant enough that you should add your name to the copyright notices at the top of those files.

tunerOn = true;

const samplerCanvas = docByClass("samplerCanvas")[0];
samplerCanvas.style.display = "none";
Copy link
Member

Choose a reason for hiding this comment

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

please fix indent

}

const accidetalFlat = document.createElement("img");
accidetalFlat.setAttribute("src", "../header-icons/accidental-flat.svg");
Copy link
Member

Choose a reason for hiding this comment

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

please remove ../

tunerContainer.appendChild(tunerSvg);

const sharpSymbol = document.createElement("img");
sharpSymbol.setAttribute("src", "../header-icons/sharp.svg");
Copy link
Member

Choose a reason for hiding this comment

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

please remove ../

@walterbender
Copy link
Member

One more change please: be consistent with the names of your new svg files. In one case you use "accidental-flat.svg" and in the other, just "sharp.svg"

…ate copyright notices

- Remove test cases with outdated implementation expectations
- Fix SVG icon paths by removing ../ prefix in sampler.js
- Fix indentation for samplerCanvas code
- Add Anvita Prasad DMP'25 to copyright notices in synthutils, sampler, and tuner files
@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

synthutils.test.js

tunerContainer.appendChild(tunerSvg);

const sharpSymbol = document.createElement("img");
sharpSymbol.setAttribute("src", "header-icons/sharp.svg");
Copy link
Member

Choose a reason for hiding this comment

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

Please rename to accidental-sharp.svg for consistency (also rename the file).

- Fix trailing spaces and indentation
- Change single quotes to double quotes
- Rename sharp.svg to accidental-sharp.svg for consistency
- Remove empty test describe block that was causing failures
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Member

Still a few more liniting issues

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Member

The lint error is unrelated. Merging.

@walterbender walterbender merged commit 1f8af11 into sugarlabs:master Aug 25, 2025
4 of 6 checks passed
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.

2 participants