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

New examples #272

Merged
merged 6 commits into from
Sep 9, 2024
Merged

New examples #272

merged 6 commits into from
Sep 9, 2024

Conversation

tomcombriat
Copy link
Collaborator

Adding two new examples:

  • one on using envelope to control a filter (a few questions on that recently)
  • one to demonstrate how to make a simple RingModulator.

Still work in progress, the former does not sound synthy enough to my taste, and the later is very basic.

@tomcombriat
Copy link
Collaborator Author

(Report jobs are failing because no previous versions of these examples were found to compare the memory, kinda ironic!)

@tomcombriat tomcombriat marked this pull request as ready for review August 25, 2024 10:12
@tomcombriat
Copy link
Collaborator Author

tomcombriat commented Aug 25, 2024

Start to sound good! Here are some demo sounds (recording straight from an UNO R3):

Filter_envelope:

Filter_envelope-converted.mp4

RingModulator

RingModulator-converted.mp4

The Filter envelope does not show in my list of Arduino examples, I do not understand why. The RM does work well, if someone has an idea...

@sensorium
Copy link
Owner

Hi Tom, looking and sounding good. Did you get the Filter showing up in examples yet? I don't see any obvious clues...
Are you happy to merge, @tfry-git ?

@sensorium
Copy link
Owner

It would be good to add them to the examples page on the site, too.

@tomcombriat
Copy link
Collaborator Author

It would be good to add them to the examples page on the site, too.

Yes indeed, I will try to do that!

Copy link
Collaborator

@tfry-git tfry-git left a comment

Choose a reason for hiding this comment

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

Only had a cursory glance. A few very minor comments.

Mozzi is licensed under the GNU Lesser General Public Licence (LGPL) Version 2.1 or later.
*/

#define MOZZI_CONTROL_RATE 64 // Hz, powers of 2 are most reliable; 64 Hz is actually the default, but shown here, for clarity
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest to remove this line for simplicity.

uint8_t ring_mod_amount, smoothed_ring_mod_amount;

UFix<8, 0> notes[4] = { 40 - 12, 52 - 12, 28 - 12, 30 - 12 }; // note played. Because of the ringModulation the oscillator is called *two times*
// hence produces a note which an octave to high, so we compensate for that here (12 midi notes makes an octave).
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing "is"


void setup() {
//Serial.begin(9600); // for Teensy 3.1, beware printout can cause glitches
Serial.begin(115200);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest to remove Serial, here.

}


unsigned int duration, attack, decay, sustain, release_ms;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unused?

@tomcombriat
Copy link
Collaborator Author

Good eye as always @tfry-git! Will correct soon, thanks!

@tomcombriat
Copy link
Collaborator Author

Ok, I implemented the changes. I also renamed the RingModulator example, as, actually, this is not really a RM, but more a self modulator. The two examples shows in the IDE (cause was an hidden file locally).

@sensorium For the website, I have to say I do not have a very clear view how all that is done… Are you using the scripts in extras/devscripts to automate the process of having all the examples copied to the gh-pages and generate the audio samples?

@sensorium
Copy link
Owner

Hi Tom,

yes, I was using those scripts when Mozzi was developing, to check that all the examples worked locally after code changes and keep the pages in sync. But with the checks you and Thomas have set up on Github and the more orderly development process, the scripts don't seem necessary anymore (I wonder whether to remove them to save confusion?). I'd suggest to just edit the markdown for the webpage directly - what do you think?

@tomcombriat
Copy link
Collaborator Author

Yes probably!
I was just wondering about all the examples which are in the website (not the doxygen), that these pages seemed somehow to be generated automatically. Is this in the gh-page workflow or should I add them to this page manually?

@sensorium
Copy link
Owner

I haven't made any Github workflows, if that's what you mean.
Any automation was local just with those scripts. Don't go there!
You probably noticed the duplication of all the example sketches with their recordings. I expect it's out of date and missing a few sketches - maybe I can regenerate it locally, if it looks like too much to update manually. I'd have to set up a few things including hardware for recording, so I'm kind of hoping gradual changes by hand will be OK, but let me know.

@tomcombriat
Copy link
Collaborator Author

Merging. Will add the needed doc soon in another PR!

@tomcombriat tomcombriat merged commit 750685d into sensorium:master Sep 9, 2024
12 of 13 checks passed
@tomcombriat tomcombriat deleted the newExamples branch September 9, 2024 09:29
@tomcombriat
Copy link
Collaborator Author

tomcombriat commented Sep 9, 2024

Just to confirm, the changes made to example-list.markdown for example: d8e44a6 were all done manually recently, or I guess the script extras/devscripts/mozzi_generate_examples_page_buttons.sh can be of good use?

I'll try to use that to regenerate the page, looks like there is nothing depending on the local architecture of the files in this one (which is not the case of extras/devscripts/mozzi_generate_page.sh)

@tfry-git
Copy link
Collaborator

tfry-git commented Sep 9, 2024

Yes, I have used an existing script (and probably it was extras/devscripts/mozzi_generate_examples_page_buttons.sh) for updating the examples page.

@tomcombriat
Copy link
Collaborator Author

Thanks!

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.

3 participants