Skip to content

Conversation

@RakinduM
Copy link
Contributor

🎡 Summary of Changes

Implemented dsp cmajor code for maracas and added the maracas sound for testing

🏷️ Type of Change

  • πŸ› Bug fix
  • πŸ₯ New drum sound/instrument
  • 🎚️ Improvement to existing sound/instrument
  • ✨ Feature enhancement
  • πŸ“– Documentation update
  • πŸ”§ Code refactoring
  • πŸ§ͺ Test improvements
  • 🎨 UI/View improvements

πŸ’‘ Motivation/Reason

As a developer with a passion for music, I find this project is really interesting. Instead of Tweaking knobs, hitting keys n pads and messing with Ableton, this time I wanted to create a realistic maracas sound in the code. Not an expert of sound designing, but I gave it a shot.

πŸ§ͺ Testing Done

  • πŸ—οΈ Built view successfully (npm run build)
  • 🎧 Tested with Cmajor: Run patch command
  • βœ… No breaking changes to existing functionality
  • πŸ”Š Audio output sounds correct (for audio changes)
  • πŸ“± UI works as expected (for view changes)

πŸ”— Related Issues

Fixes #43

πŸ“ Additional Notes

Created sample - maracas-sample.mp3
Please Ignore background noises, I was outside when recording it :)

πŸ“‹ Checklist

  • πŸ“– I have read the contributing guidelines
  • 🌿 My code follows the project conventions
  • πŸ’¬ I have written clear commit messages
  • 🎯 This PR focuses on a single change

@lilyvanoekel
Copy link
Owner

I love the effect playing around with the panning, I hadn't thought to try anything like that. Maybe the clap sound can be improved with something similar!

For the Maracas themselves, could you experiment with it a little bit more?

I used a single "hit" of a Maracas from this video as reference when listening to your drum sound and to me it sounds like:

  • The maracas sound should be a little faster/quicker, both in terms of lasting less long and having noise bursts closer together
  • The maracas in the video sound a little bit higher pitched
  • I think we might also want to play with a global envelope for the sound as a whole

@RakinduM
Copy link
Contributor Author

Ohh I see. Yea I'll try to get it sound much as closer to the video.

- reduce to a shorter burst time
- Slightly rasied the pitch
@RakinduM
Copy link
Contributor Author

RakinduM commented Oct 23, 2025

Hi @lilyvanoekel, I have done some improvements on the sound, let me know your feedback

@lilyvanoekel
Copy link
Owner

thanks @RakinduM ! I'll have a look over the weekend!

}

float jitter = (noise.out * 0.0003f);
int silentSamples = int((burstSpacing + jitter) * 44100.0f);
Copy link
Owner

Choose a reason for hiding this comment

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

We should avoid hardcoding a sample rate, we can use float(processor.frequency). But also, I'm curious what this is for? Silent samples are already handled by the loop above:

while (triggerVelocity == 0)
                        advance();

Copy link
Owner

Choose a reason for hiding this comment

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

Sorry I read this wrong initially, we do need it, but we should replace 44100.0f with float(processor.frequency)

Copy link
Contributor Author

@RakinduM RakinduM Oct 25, 2025

Choose a reason for hiding this comment

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

Ohh yes i'll replace it, my bad

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 have refactored it to float(processor.frequency). Let me know if there are any thing to be changed

@lilyvanoekel lilyvanoekel merged commit 01ea485 into lilyvanoekel:main Oct 26, 2025
1 check passed
@lilyvanoekel
Copy link
Owner

Thank you for all of your contributions @RakinduM , you even inspired another PR by someone else πŸ˜„

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement DSP/Cmajor code for 'Maracas' (Midi note 70)

2 participants