Skip to content

Conversation

Caaz
Copy link

@Caaz Caaz commented Jul 10, 2025

Correct an example snippet. context.time isn't valid, I believe context.pulse_time is intended here. Also moved the .notes bit inside the code formatting. Ran into this while learning, very fun tool!

Correct an example snippet. context.time isn't valid, context.pulse_time is
@emuell
Copy link
Member

emuell commented Jul 10, 2025

Thanks, that's indeed not valid.

It's still a bit confusing and bloated for a quickstart.

Maybe something like this would fit better?

-- TRY THIS: Create notes from a random scale:
-- local notes = scale("c4", ({"major","minor"})[math.random(2)]).notes

@emuell
Copy link
Member

emuell commented Jul 10, 2025

Or even simpler:

-- TRY THIS: Generate notes from a scale: 
--   local notes = scale("C4", "major").notes

Switch to a random scale example
@Caaz
Copy link
Author

Caaz commented Jul 10, 2025

Thanks, that's indeed not valid.

It's still a bit confusing and bloated for a quickstart.

Maybe something like this would fit better?

-- TRY THIS: Create notes from a random scale: -- local notes = scale("c4", ({"major","minor"})[math.random(2)]).notes

You know what I think I like this example better.

To implement the current tip you need to add the line to the inner function with context defined for it to even work, which is a bit more than the line suggests. While both of your examples here are in place, I feel like the math.random usage is reasonable given the other little tips leading up to this point, and scales were already gone over so that alone doesn't offer too much of a thread to pull at while learning.

I do think having context used in depth is worth teaching, this little trip gave me a bit to think about myself, but it's probably deserving its own section under 3.4 Events, I'd agree it's a bit much for the quickstart for sure. I also don't feel I am nearly musically talented enough or familiar with the API just yet to write it myself lol

@emuell
Copy link
Member

emuell commented Jul 11, 2025

I've now fixed this using the simple version here:
#77

, but it's probably deserving its own section under 3.4 Events, I'd agree it's a bit much for the quickstart for sure. I also don't feel I am nearly musically talented enough or familiar with the API just yet to write it myself lol

Indeed would be great to have some more examples here. If you have some ideas, let me know or please open a new PR!

@emuell emuell closed this Jul 11, 2025
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