Comments (6)
Hi, thanks for reporting this!
I think the challenging thing here is that a chord is represented as a structure that includes 2 or more notes. Octave and other attribute changes are also allowed, e.g.:
piano:
o4 c1/e/g/>c
o4 (ff) c1 / (mf) e / (mp) g / > (p) c
And rests are also allowed, in order to support entwining a melody with a chord, as described here:
piano:
c1/e/g/r4 b e g
This works because the next note/rest following a chord is placed after the shortest note/rest in the chord.
But I don't know if I want to allow things like cram expressions or event sequences (which are conceptually similar to cram expressions) to be allowed as part of a chord, because it would make the idea of a chord in Alda a little too complex. I like that at the moment, (even though we also technically allow rests and attribute changes), we can conceptualize a chord in Alda as essentially "2 or more notes, played at the same time."
I can think of a couple of workarounds that I think would be equivalent to your example:
- You could put the chord and the melody in separate voices:
piano:
V1: o4 d1/f/a/c
V2: o5 {f4. e4}4
- You could calculate the length of the melodic notes as hypothetical standard music notation lengths:
piano: o4 d1/f/a/c/>f10. e10
In this case, it's a "dotted 10th note" followed by a "10th note." (Real musicians would look at you funny if you started talking about "10th notes", but mathematically, they make as much sense as 8th notes or any other fraction you can think of!)
from alda.
Hi,
Thanks for the quick reply. I actually think expressing the chords and melody as separate voices is okay, as it separates concerns (harmony vs melody); however, it is counter intuitive as a guitarist, as I frequently co-mingle melodic lines with shell chords in a single performance. This doesn't cause a problem at the moment, as your solution allows me to express my idea using Alda; however, I'm wondering if it might cause confusion when exporting to MusicXML is finished, as I might want to write (and listen to) a series of lines in a swing rhythm, and look at that on a single staff.
Honestly, if there were just a simple way to specify that the player should swing eighth notes, it would eliminate the need for using cram notation (and simplify Alda notation as well). Clearly, the playback engine can support this since cram notation provides the desired result: {f4. e4}4. Maybe some kind of macro expansion when in swing mode would help solve it.
Anyway, this program is really really cool. I'm loving using it to prototype little harmonic/melodic ideas, and it really fills a great niche. Being able to produce written notation would be a god send. Closing the issue, as you've solved my issue. Thank you!
from alda.
I'm interested in adding "swing" support if we can, but I think it might be challenging because Alda doesn't have any notion of where the downbeats are -- see my comments here. It might be possible to work around that for the common case, because it would be a useful feature for sure.
from alda.
I think perhaps the "Alda way" (for now, at least) is to use non-standard note lengths. You can get a 2/3 swing (i.e. triplet quarter+eighth) feel by using 6th and 12th notes:
piano: c6 d12 e6 f12 g6 a12 b6 > c12
But I understand that this is cumbersome when, as a jazz musician, you want to think in terms of eighth notes:
piano: c8 d e f g a b > c
(and that's a lot easier / faster to write, too)
from alda.
A few thoughts.
-
I understand the issue with knowing where the downbeats are; however, I think you can leave that to the transcriber. Meaning--just assume that they want pairs of eighth notes to be treated like {c4. d4}4 without having to write that. Assuming that the composition starts on the one beat, they can add pairs of eight notes (and rests, etc) in a way that their composition flows with rhythm of the song.
-
Regarding using non-standard note lengths, I'll be honest. I hate that. In my mind, a project like Alda exists to bridge the gap between musician and programmer. Changing note values to non-standard lengths feels like "reinventing" music, and I think that's a bridge too far. Swinging eighth notes is a very standard thing, and it's well understood across the world. I wouldn't drive towards a solution that deviates from what a musician would typically expect.
That said, I really appreciate the thought you guys are putting into trying to help solve this problem, so consider point #2 to be friendly constructive criticism.
from alda.
I appreciate your perspective on that, and I agree! I'll keep thinking about ways that we could implement swinging as a first-class feature.
from alda.
Related Issues (20)
- player processes get stuck HOT 14
- How to make Pedal On and Off in Alda HOT 4
- Alda REPL: "Play right away" offset calculation doesn't work with voices HOT 1
- Alda REPL server sometimes "claims" more than 1 player on startup
- Exiting Alda REPL in "server only" mode kills all player processes
- Alda REPL "skips" rests at the end of a line
- open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory HOT 6
- Are there any PORTABLE version of alda that can run without java? HOT 1
- Time to play is too long HOT 15
- can I see debug messages while the player is running? HOT 4
- `pitch` behavior changed from Alda 1 to Alda 2 HOT 4
- Lisp function `part` got deleted in Alda 2 HOT 1
- No way to download Alda 2 HOT 4
- `exec java` resolving to the wrong path HOT 4
- cannot run alda HOT 3
- No Sound HOT 5
- client/parser/scanner.go: invalid rune quoting HOT 9
- Can i generate an mp3 with my code? HOT 3
- [BUG] MIDI failure in JVM on fresh install cause alda and alda-player to both fail HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alda.