43 votes

Just intonation keyboard – play music without knowing music

26 comments

  1. updawg
    Link
    That's really neat. I don't understand it, but it's neat!

    That's really neat. I don't understand it, but it's neat!

    9 votes
  2. [5]
    wirelyre
    Link
    This is really cool! It's a shame keyboards aren't four-dimensional, that way you could have the green keys laid out a little better. They would probably be harder to type on though. This would be...

    This is really cool!

    It's a shame keyboards aren't four-dimensional, that way you could have the green keys laid out a little better. They would probably be harder to type on though.

    This would be bad for the instrument as a performing device, but it would be cool to have a few commas accessible on the purple keys.

    7 votes
    1. [3]
      ad8e
      Link Parent
      I'm guessing what you're thinking of is that there are 4 axes of harmony, for 2, 3, 5, and 7, so the keyboard should have 4 dimensions. But harmony (specifically, lattice tones) actually flattens...

      I'm guessing what you're thinking of is that there are 4 axes of harmony, for 2, 3, 5, and 7, so the keyboard should have 4 dimensions. But harmony (specifically, lattice tones) actually flattens the 4D space by removing a lot of the interaction between axes, which clears out most of the combinations that the 4 axes would produce.

      The "secret logical pattern" is a spine of 1 2 4 8... going up the middle, and then leftward is 5/4 and rightward is 3/4. Thanks to the combinations being cleared out, these are almost all the necessary notes. So at least the center core of buttons has a very logical layout, and then the outer borders become a mess because my keyboard doesn't have enough space.

      6 votes
      1. [2]
        updawg
        Link Parent
        Maybe we could have three keyboards at different heights and then a bunch of toggles that you can push in or pull out to change the sound. That way you'd be able to simulate other instruments....

        Maybe we could have three keyboards at different heights and then a bunch of toggles that you can push in or pull out to change the sound. That way you'd be able to simulate other instruments.

        Sounds too complicated; it's probably impossible.

        1 vote
        1. ThrowdoBaggins
          Link Parent
          Three keyboards? Not enough — I reckon you should add really big keys under the seat so you can play with your feet at the same time.

          Three keyboards? Not enough — I reckon you should add really big keys under the seat so you can play with your feet at the same time.

    2. ad8e
      Link Parent
      I checked the commas accessible to the purple keys, and it is possible to play these fractions in one chord press: 32/35 162/175 25/27 14/15 15/16 20/21 24/25 27/28 35/36 63/64 224/225 1

      I checked the commas accessible to the purple keys, and it is possible to play these fractions in one chord press: 32/35 162/175 25/27 14/15 15/16 20/21 24/25 27/28 35/36 63/64 224/225 1

      1 vote
  3. [10]
    bloup
    Link
    On iPhone, tried Firefox and safari. The buttons respond to my taps but I don’t hear any sound.

    On iPhone, tried Firefox and safari. The buttons respond to my taps but I don’t hear any sound.

    3 votes
    1. [4]
      adorac
      Link Parent
      Works for me if I turn off the mute switch.

      Works for me if I turn off the mute switch.

      5 votes
      1. bloup
        Link Parent
        Hey it worked! That’s not the first time I’ve had the mute notifications switch cause problems.

        Hey it worked! That’s not the first time I’ve had the mute notifications switch cause problems.

        2 votes
      2. ad8e
        Link Parent
        Wow, thanks for the diagnosis. No way I could have figured that out.

        Wow, thanks for the diagnosis. No way I could have figured that out.

        2 votes
      3. gingerbeardman
        Link Parent
        I also fell victim to the mute switch! Thankfully I was able to figure out the solution myself

        I also fell victim to the mute switch! Thankfully I was able to figure out the solution myself

    2. [5]
      ad8e
      Link Parent
      Ah, that is very bad. I have been testing on iOS Safari on a physical device and browserstack, and after the first short tap (which is always silent), it starts working. Long presses appear to not...

      Ah, that is very bad. I have been testing on iOS Safari on a physical device and browserstack, and after the first short tap (which is always silent), it starts working. Long presses appear to not count. Does the green Debussy button below the keyboard work at least? I have little idea what could be causing this, besides muted volume which I assume it's not.

      2 votes
      1. [4]
        bloup
        Link Parent
        The demo button didn’t make noise either. Volume definitely is up, audio plays on other websites. I really like this idea though! I’m excited to hear it.

        The demo button didn’t make noise either. Volume definitely is up, audio plays on other websites. I really like this idea though! I’m excited to hear it.

        1 vote
        1. [3]
          ad8e
          Link Parent
          Sorry about that, and thanks for your help. My current weak guess is that I'm using some HTML feature not supported by your browser. It uses WebAssembly to play sounds, so the minimum iOS version...

          Sorry about that, and thanks for your help. My current weak guess is that I'm using some HTML feature not supported by your browser. It uses WebAssembly to play sounds, so the minimum iOS version is 11, but I haven't been able to get browserstack to launch the older phones to test if there's a higher requirement. If someone else has an idea, I'd be grateful.

          1 vote
          1. [2]
            bloup
            Link Parent
            Something weird, I connected my phone to my car stereo over Bluetooth, and it was able to play the notes! Kind of. It’s extremely distorted, and infinitely sustains. Hope that’s helpful! Also...

            Something weird, I connected my phone to my car stereo over Bluetooth, and it was able to play the notes! Kind of. It’s extremely distorted, and infinitely sustains. Hope that’s helpful! Also don’t worry I am not driving.

            3 votes
            1. ad8e
              Link Parent
              I tested a lot of old phones, and I can reproduce the original problem of the page failing to make sound. I fixed a few issues with old Safari versions (<16), but there are more issues that I can...

              I tested a lot of old phones, and I can reproduce the original problem of the page failing to make sound. I fixed a few issues with old Safari versions (<16), but there are more issues that I can see no solution for, since all the other examples of OscillatorNodes I found also fail. My guess is that it started working on bluetooth because of changes I was making to try to fix the issue you found. Some versions of Safari 15.0-15.6 work, but there is no pattern I found. Safari 16+ seems to always work.

              You can try the page again, or try https://ad8e.pages.dev/keyboarddebug. It may be marginally more likely to work, but it doesn't have the cool player piano. I have no idea what the infinite sustain or distortion are caused by.

              Thanks for your help!

              1 vote
  4. feanne
    Link
    I use an iPad app that has a similar feature - select any chord and you can play the keys randomly, it'll always sound good - http://polychordapp.com/ 💕

    I use an iPad app that has a similar feature - select any chord and you can play the keys randomly, it'll always sound good - http://polychordapp.com/ 💕

    1 vote
  5. [6]
    gpl
    Link
    This is super cool. I know almost nothing about music so I don't "get" it, but it seems very cool. Reading the background info on the page, I do have a question. I have always been confused about...

    This is super cool. I know almost nothing about music so I don't "get" it, but it seems very cool. Reading the background info on the page, I do have a question. I have always been confused about the definitions of consonance and dissonance, in that I cannot tell when people talk about them whether they are objective or subjective qualities of sound. Of course, if I hear a sound I can intuitively tell whether it is consonant or dissonant, but my understanding is that this perception is largely cultural. Other people from different backgrounds may listen to the same sound and not get the sense of dissonance that I would, for example.

    However, on your page you say (for example)

    A musical sound is a sum of sines with distinct frequencies. I define a sound as "locally consonant" if perturbing any of these frequencies makes it more dissonant.

    In this context, I am curious how you are defining dissonant. Is it something that can be quantified based just on the frequencies that I play, i.e. I tell you 2 frequencies of sound and you can tell me how dissonant they are? I'm super curious about this. Anyway, super cool project and research.

    1. [5]
      ad8e
      Link Parent
      Yes, using the frequencies and their volumes, harmonic dissonance can be completely quantified. The reason it's cultural is because there are two separate mechanisms - one with roughness+lattice...

      Yes, using the frequencies and their volumes, harmonic dissonance can be completely quantified.

      The reason it's cultural is because there are two separate mechanisms - one with roughness+lattice tones, and one that is trained. The first one seems to be relatively universal and constant between people. The second is trained by some mechanism I have not figured out, and it depends on the person's musical background; musicians hear tonality strongly and non-musicians do not. The curve of the second mechanism mimics the roughness of sounds with harmonic overtones, but there are systematic deviations from this pattern which make guessing its training mechanism hard. Still, it can be measured for any single person.

      In practice, I expect that this should cause a large difference if you play a one-voice composition with an instrument whose timbre is purely one sine wave, no overtones, rapid decay. Someone with no prior exposure with harmonic overtones (who probably doesn't exist in real life) should hear no harmonic relationships at all. Because the first mechanism, roughness, has been disabled by removing all the harmonics and having only one voice, and the second mechanism has not been trained yet. A song like Bach's Cello Suite No.1, Prelude, should do nicely.

      1 vote
      1. [3]
        thefilmslayer
        Link Parent
        I'm not a musician but I hear tonality just fine. I often hear differences between tones and sounds that other people insist they can't hear.

        I'm not a musician but I hear tonality just fine. I often hear differences between tones and sounds that other people insist they can't hear.

        1. [2]
          ad8e
          Link Parent
          I don't know about the second half, but the first half is perfectly normal. Why musicians and non-musicians test differently in these experiments, I assume, is simply that musicians listen to a...

          I don't know about the second half, but the first half is perfectly normal. Why musicians and non-musicians test differently in these experiments, I assume, is simply that musicians listen to a lot more music. It's likely a correlation rather than causation from playing with an instrument. This hypothesis is just an educated guess from the studies though; it hasn't been tested.

          If by the second half you mean timbres rather than absolute pitch, that could be interesting. I don't know how timbre is learned, and I'm not aware of studies on how training affects timbre encoding and Just Noticeable Differences either, but it is important to theory.

          1. thefilmslayer
            Link Parent
            I listen to a lot of different genres from different cultural backgrounds.

            I listen to a lot of different genres from different cultural backgrounds.

            1 vote
      2. gpl
        Link Parent
        This is incredibly fascinating. Thanks so much for the detail reply. I’m going to read up more on this!

        This is incredibly fascinating. Thanks so much for the detail reply. I’m going to read up more on this!

  6. [3]
    xqz
    Link
    I’ve been trying to find something Google did for an event that had improvised music after the user pressed a few keyboard keys I haven’t had success finding that webpage again. If I recall...

    I’ve been trying to find something Google did for an event that had improvised music after the user pressed a few keyboard keys

    I haven’t had success finding that webpage again. If I recall correctly, someone ripped the app from the website and rehosted it but I can’t find it