Coder Social home page Coder Social logo

Comments (6)

daveyarwood avatar daveyarwood commented on June 26, 2024

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:

  1. You could put the chord and the melody in separate voices:
piano:
  V1: o4 d1/f/a/c
  V2: o5 {f4. e4}4
  1. 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.

tmountain avatar tmountain commented on June 26, 2024

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.

daveyarwood avatar daveyarwood commented on June 26, 2024

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.

daveyarwood avatar daveyarwood commented on June 26, 2024

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.

tmountain avatar tmountain commented on June 26, 2024

A few thoughts.

  1. 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.

  2. 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.

daveyarwood avatar daveyarwood commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.