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

Add setting for scale/mode for MIDI note table #281

Open
eethann opened this issue May 11, 2022 · 5 comments
Open

Add setting for scale/mode for MIDI note table #281

eethann opened this issue May 11, 2022 · 5 comments

Comments

@eethann
Copy link

eethann commented May 11, 2022

I'm finding myself needing to devote a good deal of real estate to defining and retrieving scale degree systems in my grids. I've been using T but that approach isn't ideal as it loses the octave information when transposing across a G/A boundary.

I think this could be addressed quite straightforwardly with a setting for MIDI scale degrees. The default would be chromatic: AaBbCcDdEFfGg or 0123456789ab with a root setting of A (I think I like the latter). One could define standard 7 note scales using a form like 024579b or such, and could also change the root note (say to 0 for easier computation).

I can try to mock this up in a PR, curious others' thoughts.

@neauoire
Copy link
Member

Hi Eethann,

You should use Q instead of T for this :)

@eethann
Copy link
Author

eethann commented May 12, 2022

Interesting. The key feature of T is that it has the implicit modulo of the index, which allows for a pseudo-transposition that wraps around from the end of the scale degrees back to the start. Is there a similarly easy way to do that with Q?

My aim has been to transpose a given note by a given scale degree.

This generally looks something like the grid below, with lots of similar QGT combinations referring to the same scale in comments. The approach makes it easy to switch the mode for the entire grid, but takes up space and time calculating the offsets. Making a "mode" for midi that used scale degrees instead of chromatic notes could simplify this a lot, and open up some nice possibilities (easy modulation across the entire grid, etc.). Apologies if I'm too dense in not seeing the equivalent approach using Q.

.......0a7Q........
847GabcdEfg........
...a.....aaa.......
.....12C4..........
....wC304T0546.....
.....0Y0A0.........
......D207TabcdEfg.
.......:02af1......
...................
...................
..........#abcdEfg#
..........#used.by#
..........#many.Qs#

@neauoire
Copy link
Member

neauoire commented May 12, 2022

I'm not super familiar with what scales are, so this is a bit beyond me at the moment, but I can show you how to do modulo on-demand:

1X..
6I4.

The reason I suggested Q was that you can have Octave-Note ports, which might help carrying over B. But it might be too much legwork here.

In my local copy of orca(uxn), I have a hexadecimal operator which I use for controlling lights on stage when I do shows, but you could make yourself an operator that works in a similar way, so you could have ~3a(A3#). Alternatively, you could do an operator that uses 2 x base36 ports and generate a midi value between 0-72 that could be more easily operated on.

If none of this works, you could make yourself a little midi pre-processor script that offsets the midi notes.

@eethann
Copy link
Author

eethann commented May 12, 2022

Thanks for all of that. Re the modulo, thanks for clarifying that. I'd been working at it and know it's in some of the docs, sorry to have missed it here.

If it's helpful context, the trick with scales is that the offset isn't consistent. E.g. if the notes in a scale are the minor scale ABCDEFG, +2 gets you from A to B, but it only takes +1 to get from B to C. If you want to transpose a note 2 scale degrees consistently, you need to change the amount you add depending on what note you're transposing and to where. If the MIDI implementation has some sense of scales inbuilt, it simplifies this. You just add the number of scale degrees you want to transpose by, and don't need to worry about the variations in # of chromatic steps.

Thanks for the idea of the midi preprocessor, I've been thinking about something along those lines for a few things. I might still give a go at an implementation in my branch, just to test out the concept.

@sense-amr
Copy link

hoi niccco!

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

No branches or pull requests

3 participants