electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Discussion » Composition
Question for those who read music
Post new topic   Reply to topic Moderators: elektro80
Page 1 of 1 [17 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sat Dec 05, 2009 7:47 am    Post subject: Question for those who read music Reply with quote  Mark this post and the followings unread

At present the notation interface for the software I am writing auto-parses note lengths to fit the meter but only down to the level of the beat as in the figure on the left. I could have it parse "all the way down" as in the figure on the right. Which do you prefer and how strong is the preference.

BTW I recognize that horizontal spacing still needs work.


Graphic1.JPG
 Description:
 Filesize:  13.62 KB
 Viewed:  10443 Time(s)

Graphic1.JPG



_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Sat Dec 05, 2009 8:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Neither - IMO it's best to use ties to highlight the half-beats, not obscure them.


to-post.gif
 Description:
 Filesize:  4.71 KB
 Viewed:  10439 Time(s)

to-post.gif



_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Sat Dec 05, 2009 9:28 am    Post subject: Reply with quote  Mark this post and the followings unread

This might be an algorithmically simple way to achieve something sensible:

A note should not start on a boundary more than twice as fine as its length.

So, for example, it's OK for an eighth note to start on an eighth-note boundary or a 16th-note boundary, but not on a 32nd-note boundary that's not also a 16th-note boundary.

This rule is almost surely too simple, but it's a start. As an example of why it's too simple, it fails to account for the notion that in 6/8 time, it's OK to have a measure start with an eighthth note followed by a quarter note, but slikghtly weird for it to start with two quarter notes in a row. The reason, in this case, is that the latter example causes a quarter note to span the middle of the measure.
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sat Dec 05, 2009 11:59 am    Post subject: Reply with quote  Mark this post and the followings unread

dewdrop_world wrote:
Neither - IMO it's best to use ties to highlight the half-beats, not obscure them.


Thanks James that is definitely the way to do it.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sat Dec 05, 2009 12:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

ark wrote:
This might be an algorithmically simple way to achieve something sensible:...


Thanks. My system constructs a detailed model of every meter one defines. So a recursive algorithmic generalization of the proper form James presented should not be too difficult. I'll put it on the to do list Laughing

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Dec 06, 2009 6:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Here's the algorithm I've worked out. Won't know if it's right till I try it Embarassed If any one sees a problem please let me know quick! And thanks again.

START
Find strongest accent in the half open span [ , )

IF that strongest accent is at the start of the span

break span such that the first part is the longest valid note consistent with max dots preference setting

Add note to decomposition list

recurse with remainder if any

ELSE

break span at strongest accent

recurse with first part
recurse with second part
END

The penultimate step is not properly tail recursive and I'll wrestle with that during implementation

A duration is the sum of one or more valid note chronon lengths (here ignoring tuplets for simplicity).

A span refers to a duration with an offset in a meter.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Mon Dec 07, 2009 5:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

It works! Because it is recrusive it should work at all levels of subdivision. And because it is a method of the bar's meter in should work in all meters. I'd say it was elegant except it still isn't properly recursive. But I had an Idea on how to fix that while cleaning stalls today LOL


proper subdivision.jpg
 Description:
 Filesize:  19.53 KB
 Viewed:  10341 Time(s)

proper subdivision.jpg



Code.JPG
 Description:
 Filesize:  41.29 KB
 Viewed:  276 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Code.JPG



_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Wed Dec 09, 2009 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

bachus wrote:
. But I had an Idea on how to fix that while cleaning stalls today LOL

No sin in non-tail-recursive recursion! Maintaining explicit stacks or continuations just makes matters worse. I'm interested to hear how you'll avoid it.

One nice aspect about this sort of "balanced recursion" on large data structures is that, if you have a hardware multithreaded machine, you can spawn a parallel thread to process one side of the partition while using the original thread to process the other, *and* you can apply that strategy recursively. I happen to like this flavor of recursion. Yum!

EDIT: Here is an example of a "balanced recursive" sort function that spawns multiple threads to sort array subpartitions along these lines.

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Fri Dec 11, 2009 10:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Dale. The links look interesting. I'm out of town on family medical business for a week and will look at this more closely when we get back. And thanks again
_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Fri Dec 11, 2009 11:11 am    Post subject: Reply with quote  Mark this post and the followings unread

bachus wrote:
Thanks Dale. The links look interesting. I'm out of town on family medical business for a week and will look at this more closely when we get back. And thanks again

Have safe travels!

Here is one other link that may be useful in helping to think about recursion.
Quote:

Starting at the root of a binary tree, there are three main steps that can be performed and the order in which they are performed defines the traversal type. These steps (in no particular order) are: performing an action on the current node (referred to as "visiting" the node), traversing to the left child node, and traversing to the right child node. Thus the process is most easily described through recursion.

To traverse a non-empty binary tree in preorder, perform the following operations recursively at each node, starting with the root node:

1. Visit the root.
2. Traverse the left subtree.
3. Traverse the right subtree.

(This is also called Depth-first traversal.)

To traverse a non-empty binary tree in inorder, perform the following operations recursively at each node:

1. Traverse the left subtree.
2. Visit the root.
3. Traverse the right subtree.

(This is also called Symmetric traversal.)

To traverse a non-empty binary tree in postorder, perform the following operations recursively at each node:

1. Traverse the left subtree.
2. Traverse the right subtree.
3. Visit the root.

Finally, trees can also be traversed in level-order, where we visit every node on a level before going to a lower level. This is also called Breadth-first traversal.


All of those nested "traverse" calls are recursive calls. Half of them are non-tail-calls.

Take care.

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
ark



Joined: Mar 06, 2008
Posts: 679
Location: New Jersey
Audio files: 13
G2 patch files: 31

PostPosted: Fri Dec 11, 2009 12:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

In my years of teaching, I have found that in order to understand recursion, the trick is first to understand recursion. After that, it's easy.

(This sounds like a stupid remark, but isn't. It is the only way I know to explain the observation that many people seem to snap abruptly from a metal state in which they just don't understand recursion to a state in which they do not understand why they ever thought it was difficult.)
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Fri Dec 11, 2009 1:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

ark wrote:
... It is the only way I know to explain the observation that many people seem to snap abruptly from a metal state in which they just don't understand recursion to a state in which they do not understand why they ever thought it was difficult....



That was my experience many years go when I was first learning scheme.
But I am now so many years from serious programming that my meager skills thin to vanishing.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Fri Dec 11, 2009 2:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Acoustic Interloper wrote:

Here is one other link that may be useful in helping to think about recursion.


Also, recursive proofs are common enough in math, and programming is applied math. Don't let curly brackets on computer screens get in the way of the pure beautiful science of it all.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Fri Dec 18, 2009 12:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nother related question.

Edit:
Ah! Got it. Just slow sometimes.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Dec 20, 2009 9:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Parsing all the way down doesn't work in all cases as shown below:


beamParseIssue.JPG
 Description:
 Filesize:  15.15 KB
 Viewed:  10140 Time(s)

beamParseIssue.JPG



_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Dec 20, 2009 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Now, I can't seem to figure out if the above is as good as it gets or not. Any suggestions welcome.

Edit:

Ah! The beaming is not right.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2922
Location: Up in that tree over there.
Audio files: 5

PostPosted: Fri Dec 25, 2009 12:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

What I've settled on is shown in the screen shot below. I took the easy way out and did the parsing of dotted groups as a "second pass".

EDIT:

As is obvious I have done nothing to address the problems in horizontal spacing. Annoying as that is, next I must finish up accidentals and modes before working on horizontal spacings.


ShowingDottedGroups.JPG
 Description:
 Filesize:  64.63 KB
 Viewed:  183 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ShowingDottedGroups.JPG



_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: elektro80
Page 1 of 1 [17 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Discussion » Composition
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use