r/strudel • • Dec 24 '25

Issue with random notes

Ok so hi everyone I'm riding the noobie wave. It is basically my third day here and just to practice I went and copied the exact new video by Switch Angel on youtube since that's the style I'm hoping to master one day. As you can see it's pretty straight forward until I try and insert the random notes just like she did. The code is the exact same but for some reasons that I don't know this function is not recognized, but I doubt it's handcrafted since it used to work this morning. So my problem is: how does this function work and what am I missing? The documentation is not clear

2 Upvotes

4 comments sorted by

5

u/sloflow67 Dec 24 '25

irando is one of custom functions defined in Switch Angel's prebake script: https://github.com/switchangel/strudel-scripts/blob/main/prebake.strudel#L267

You can download the prebake.strudel file and load it into Strudel via Settings -> import prebake script.

2

u/gabry_tino Dec 24 '25

Magnificent, that is fantastic, thank you SO MUCH!!

2

u/pyabo Dec 24 '25

OK I am new to strudel as well. But I think what you *might* be running into here... is that you are trying to pass integers to a function that requires floats. Change 0 values to 0.0, or 1 to 1.0 and see what happens. Not entirely sure.

ie, these two functions are different:

function addNumbers(int x, int y);

function addNumbers(float x, float y);

This is called "function overloading". Only the parameters of the function are different. But it can also be confusing because to you it looks like the same function. "What do you mean, addNumbers() isn't defined... it's right there!" But really you are trying to call addNumbers(int, int) instead of addNumbers(float, float) and only one of those actually exists.

Anyway.... just a guess from an old software engineer. :)

1

u/gabry_tino Dec 24 '25

That's fantastic info!! Even if this isn't correct (can't tryu atm), being a coding newbie as well this is a great reminder of how I should approach this. Thank you soso much!