Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Support notes with arbitrary pitches outside the chromatic scale #343

Closed
daveyarwood opened this issue Nov 22, 2016 · 2 comments
Closed
Labels

Comments

@daveyarwood
Copy link
Member

Moved from #45 / #87.

Ideas/notes from that issue:

  • The idea is that we could build support for quarter tones / microtonal music on top of this.

  • Some great ideas were proposed in this Reddit thread.

  • Since the above Reddit thread and Support quarter tones / microtonal music #45 / Notes with arbitrary pitches #87, we have added inline Clojure code to Alda.

    I think we should leverage this as a way to let the user specify a note with a precise pitch, either in Hz, or (as proposed by @elyisgreat) as a fraction of a MIDI note, e.g. MIDI note 60.5.

    e.g.:

    piano:
      (note (hz 239.6) (duration (note-length 4)))
      (note (midi 60.2))
    

    This is sort of a low-level way of doing it, but I think that's what we want in this case. Plugins could provide syntactic sugar on top of that, and a way to build microtonal systems that are convenient to use.

  • Perhaps we could support .scl format?

  • An open question I have for supporting microtonal music in general is how we will express each note, for scales with more than 7 notes (a-g). It would be ideal if we could continue to express a note as a single character. Currently the Alda parser reserves the letters a-g for notes, and the letter r for rests.

    Some ideas:

    • We could enforce an upper limit of 17 notes for scales, so we could use the letters a-q (since r is off limits, and skipping over r might be confusing)
    • We could use uppercase letters in some way. Or maybe some combination of upper- and lower-case letters.
    • Leverage Alda plugins for the syntax, since it could vary from tuning system to tuning system?
    • For diatonic tunings (e.g. just, well, Pythagorean), can add a tuning attribute which adjusts the tuning of the notes a through g.
  • Food for thought: tonality diamonds.

@daveyarwood
Copy link
Member Author

Opening this issue here instead of alda-core because the first step we'll need to take is to implement support for playing arbitrary pitches outside of standard MIDI tuning.

@crisptrutski started work on this in #84

It's unfortunately pretty challenging to play arbitrary notes on the JVM MIDI Synthesizer. I think it would be worth digging/experimenting a little more to see if there is a robust way to do it. As a last resort, we could punt on this and make it only a feature of non-MIDI (e.g. waveform synth) instruments, once those are implemented.

@daveyarwood daveyarwood changed the title Support quarter tones / microtonal music Support notes with arbitrary pitches outside the chromatic scale Nov 22, 2016
@daveyarwood
Copy link
Member Author

Capturing what I think I know about microtonal music on the JVM:

  • The JVM MIDI implementation offers a couple of different ways to get notes in between semitones: pitch bending and tuning.

  • Pitch bending won't work for our purposes for two reasons:

    1. You can only bend an entire channel, not individual notes.
    2. Apparently the amount of bending isn't precise / sounds weird/unexpected.
  • From what I can tell, it is possible to specify the frequencies of all 128 notes available in the MIDI range; I found example code here: https://stackoverflow.com/a/25548933/2338327

  • I think that approach could work, but a consequence is that we're limited to 128 total notes. For example, if you want to tune the synth to support having 24 notes per octave (i.e. quarter-tones), that reduces the total available range to 64 semitones, which means you have to make a decision about which 2 octaves you want to chop off.

  • It's possible that Alda could analyze the score and try to figure out the best way to tune the 128 notes available to include the frequencies used in the score, as well as frequencies that you might want to use subsequently in the same score (to facilitate live-coding to continue a score). It's pretty complicated, though... would require some careful thought and planning.

@daveyarwood daveyarwood transferred this issue from alda-lang/alda-sound-engine-clj Jan 1, 2021
@alda-lang alda-lang locked and limited conversation to collaborators Oct 7, 2022
@daveyarwood daveyarwood converted this issue into discussion #425 Oct 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant