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

beat factor? #2371

Closed
pikurasa opened this issue Jun 21, 2020 · 10 comments
Closed

beat factor? #2371

pikurasa opened this issue Jun 21, 2020 · 10 comments
Labels

Comments

@pikurasa
Copy link
Collaborator

Is beat factor behaving correctly?

I can only seem to produce an output of "1".

Also, there is no help. Nor is there anything in https://github.com/sugarlabs/musicblocks/tree/master/guide#BEAT for this block.

@sksum
Copy link
Member

sksum commented Jun 28, 2020

"beat Factor" changes when we use Dot clamp or the multiply note value clamp ,,, should this change in any other case as well?

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jul 3, 2020

"beat Factor" changes when we use Dot clamp or the multiply note value clamp ,,, should this change in any other case as well?

Please upload an example. Thanks!

@sksum
Copy link
Member

sksum commented Jul 3, 2020

"beat Factor" changes when we use Dot clamp or the multiply note value clamp ,,, should this change in any other case as well?

Please upload an example. Thanks!
::
[[0,["start",{"collapsed":false,"xcor":-160,"ycor":-15,"heading":0,"color":50,"shade":60,"pensize":5,"grey":200}],826,8,[null,28,null]],[1,["newnote",{"collapsed":false}],854,81,[28,2,5,9]],[2,"divide",956,81,[1,3,4]],[3,["number",{"value":1}],1042,81,[2]],[4,["number",{"value":4}],1042,113,[2]],[5,"vspace",868,113,[1,6]],[6,"pitch",868,145,[5,7,8,31]],[7,["solfege",{"value":"sol"}],942,145,[6]],[8,["number",{"value":4}],942,177,[6]],[9,"hidden",854,270,[1,38]],[10,["newnote",{"collapsed":false}],868,302,[38,11,14,18]],[11,"divide",970,302,[10,12,13]],[12,["number",{"value":1}],1056,302,[11]],[13,["number",{"value":4}],1056,334,[11]],[14,"vspace",882,334,[10,43]],[15,"pitch",882,398,[43,16,17,null]],[16,["solfege",{"value":"mi"}],956,398,[15]],[17,["number",{"value":4}],956,430,[15]],[18,"hidden",868,491,[10,33]],[19,["newnote",{"collapsed":false}],882,523,[33,20,23,27]],[20,"divide",984,523,[19,21,22]],[21,["number",{"value":1}],1070,523,[20]],[22,["number",{"value":2}],1070,555,[20]],[23,"vspace",896,555,[19,45]],[24,"pitch",896,619,[45,25,26,null]],[25,["solfege",{"value":"sol"}],970,619,[24]],[26,["number",{"value":4}],970,651,[24]],[27,"hidden",882,712,[19,null]],[28,"rhythmicdot2",840,49,[0,29,1,30]],[29,["number",{"value":1}],942,49,[28]],[30,"hidden",840,805,[28,null]],[31,"print",868,208,[6,32,null]],[32,["beatfactor",{"value":0.6666666666666666}],942,208,[31]],[33,"multiplybeatfactor",868,491,[18,34,19,37]],[34,"divide",1049,491,[33,35,36]],[35,["number",{"value":1}],1135,491,[34]],[36,["number",{"value":2}],1135,523,[34]],[37,"hidden",868,743,[33,null]],[38,"multiplybeatfactor",854,270,[9,39,10,42]],[39,"divide",1035,270,[38,40,41]],[40,["number",{"value":1}],1121,270,[39]],[41,["number",{"value":4}],1121,302,[39]],[42,"hidden",854,774,[38,null]],[43,"print",882,366,[14,44,15]],[44,["beatfactor",{"value":2.6666666666666665}],956,366,[43]],[45,"print",896,587,[23,46,24]],[46,["beatfactor",{"value":5.333333333333333}],970,587,[45]]]

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jul 6, 2020

Multiply Note Value and Dot seem to affect Beat Factor -- thanks for testing.

However, this simple example (created from the default sol,mi,sol) only returns 1 every time:

Screenshot at 2020-07-06 16:07:01 every beat factor is one

@sksum
Copy link
Member

sksum commented Jul 8, 2020

What should be the expected values here ?

@pikurasa
Copy link
Collaborator Author

pikurasa commented Jul 8, 2020

I expect 1, 1, and 2.

@pikurasa
Copy link
Collaborator Author

@sksum any questions about this?

Your example with dots and multiply note value is a little complex. However, I expect the following:

Your code as pseudo code:

dot_1{ sol_4, 1/4, mult-note-value_1/4{mi_4, 1/4}; mult-note-value_1/2{sol_4, 1/4}}}

before dotting, we have:
sol_4, 1/4; mi_4, 1/16; sol_4, 1/32

(which for beat factor in 4/4 meter is 1, 1/4, and 1/8)

dot lengthens everything by half its value

3/2, 3/8, and 3/16 for beat factor in 4/4 meter.

Right now, it is giving us 2/3, 2 2/3, and 5 1/3, which is the inverse of what we want.

Screenshot at 2020-08-18 11:01:15

It is interesting that with dotted and multiple, it is an inversion of what we want, but with regular, unaltered note values we get all 1/1 for beat factor.

Screenshot at 2020-08-18 11:03:45

@walterbender
Copy link
Member

I am a bit confused as to what we want this block to do.

current note value / beat, where beat is specified by the meter block (denominator)?

@walterbender
Copy link
Member

I implemented the above. Please test.

@walterbender walterbender added the WF6-Needs testing Please test label Sep 20, 2020
@pikurasa
Copy link
Collaborator Author

It works as expected -- hurrah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants