sugarlabs / musicblocks

Music Blocks -- A musical microworld

Home Page:https://musicblocks.sugarlabs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

print current interval

pikurasa opened this issue · comments

It would be nice to be able to "print current interval".

There seems to be no way to display such information.

For example, I would like to add "print current interval" to the following code:

Screenshot at 2020-04-07 15:36:46 scale with stable pitch -- oblique motion

The result would be to print the following on the screen:

Perfect Unison
Major Second
Major Third
Perfect Fourth
Perfect Fifth
Major Sixth
Major Seventh
Perfect Octave

For chords with more than two notes, we may try to concatenate information (e.g. "Major Third and Minor Third and Perfect Fifth" for Do, Mi, Sol). Obviously more complex chords would have too much information.

**As for Status widget, we have an opportunity to display the information in a more intuitive way. We could display the information 2D geometrically. I will sketch that out later, but basically it would have points for each played pitch with lines connecting all simultaneous pitches and labels on those lines for the resulting intervals.

(At the top, we could display the chord name too, I suppose, but that could get tricky since the naming has a lot to do with the chord's function within the progression.)

Please assign this issue to me

commented

"Print" as in print in console?

@abdul7oss @vivekvc14

Basically, we want something like this to work:

Screenshot at 2023-02-02 19:45:52

@walterbender is this still a "good first issue?"

commented

Is this issue still open, if so i would like to be assigned to work on it.

@Faizan711 Perhaps you can find Devin and me on Matrix and we can discuss the details? (Much of the glue is in place, but the actual calculation of the interval in the current implementation is not what Devin needs.

commented

I didn't understand what do you mean by "find me and devin on Matrix"??

I would like to work on this issue , if it is not assigned yet can you please assign it to me

@Simran180 we don't assign issues, but we do accept PRs.

From what I have understood, in this issue we basically need to create a block "print current interval" similar to "print interval number" just here we need it to print the name of the interval instead of interval number. For eg. print current interval will print "Minor third" when print interval number prints "3". Can I get an example of how chords with more than 2 notes are implemented in music blocks. And what is needed to be done with status widget?

The problem with the current implementation is that it doesn't calculate the interval properly. (Well it does, if you use an interval block, but not if you define the interval with multiple pitch blocks.)
I think it should return a number, not the name. We can convert the number to a name in a separate step.

I think it should return a number, not the name. We can convert the number to a name in a separate step.

I agree that we can start with the number first.

In the above example, the results would be:

0,2,4,5,7,9,11,12

...which, as written above, would be put in musical terminology as:

Perfect Unison
Major Second
Major Third
Perfect Fourth
Perfect Fifth
Major Sixth
Major Seventh
Perfect Octave

This terminology describes intervals as: Quality, Interval, which gives someone enough information to figure out the pitches regardless of whether they have been given the name of the key/mode.