Author |
Message |
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
|
Back to top
|
|
|
dewdrop_world
Joined: Aug 28, 2006 Posts: 858 Location: Guangzhou, China
Audio files: 4
|
|
Back to top
|
|
|
ark
Joined: Mar 06, 2008 Posts: 679 Location: New Jersey
Audio files: 13
G2 patch files: 31
|
Posted: Sat Dec 05, 2009 9:28 am Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sat Dec 05, 2009 11:59 am Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sat Dec 05, 2009 12:03 pm Post subject:
|
|
|
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 _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Dec 06, 2009 6:19 am Post subject:
|
|
|
Here's the algorithm I've worked out. Won't know if it's right till I try it 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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Mon Dec 07, 2009 5:32 pm Post subject:
|
|
|
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
Description: |
|
Filesize: |
19.53 KB |
Viewed: |
10341 Time(s) |
|
Description: |
|
Filesize: |
41.29 KB |
Viewed: |
276 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
_________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
|
Acoustic Interloper
Joined: Jul 07, 2007 Posts: 2067 Location: Berks County, PA
Audio files: 89
|
Posted: Wed Dec 09, 2009 1:31 pm Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Fri Dec 11, 2009 10:00 am Post subject:
|
|
|
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
|
|
|
Acoustic Interloper
Joined: Jul 07, 2007 Posts: 2067 Location: Berks County, PA
Audio files: 89
|
Posted: Fri Dec 11, 2009 11:11 am Post subject:
|
|
|
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
|
|
|
ark
Joined: Mar 06, 2008 Posts: 679 Location: New Jersey
Audio files: 13
G2 patch files: 31
|
Posted: Fri Dec 11, 2009 12:18 pm Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Fri Dec 11, 2009 1:22 pm Post subject:
|
|
|
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
|
|
|
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Fri Dec 11, 2009 2:19 pm Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Fri Dec 18, 2009 12:43 pm Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
|
Back to top
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Sun Dec 20, 2009 10:05 am Post subject:
|
|
|
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
|
|
|
bachus
Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
|
Back to top
|
|
|
|