[HN Gopher] Music Mouse
       ___________________________________________________________________
        
       Music Mouse
        
       Author : raldu
       Score  : 352 points
       Date   : 2022-11-19 10:36 UTC (2 days ago)
        
 (HTM) web link (teropa.info)
 (TXT) w3m dump (teropa.info)
        
       | jjarvis wrote:
       | Nice! I expect to see more applications like this with the
       | introduction of Max's RNBO library a few weeks back.
        
       | wantsanagent wrote:
       | Wow, this is probably the most intuitively enjoyable music tool
       | I've ever used.
       | 
       | I'm not a musician and I know very little about what makes music
       | good, but playing with this tool felt like I was hearing a better
       | version of my own imagination. Like those scenes in movies where
       | people can suddenly play music and have no idea how they're doing
       | it.
        
         | dmix wrote:
         | It's rare to have an instrument where anything you do sounds
         | good!
        
           | unglaublich wrote:
           | That's the magic of music theory: it constraints the space of
           | all possible invocations of an instrument to those that are
           | theoretically correct. Our 'random input' is fit upon the
           | closest match that yields a music-theoretical correct
           | outcome.
        
         | rzzzt wrote:
         | PG Music's Band-in-a-Box still exists, but way back in the
         | Windows 3.1 era it already had a "snap to pleasant notes"
         | feature if you wanted to play along a set of chords on a MIDI
         | piano. It could also play chords in the style of famous
         | musicians along with your never-ever-bad notes! I always
         | switched it to the "Erroll Garner" preset and hammered away.
         | 
         | https://en.wikipedia.org/wiki/Band-in-a-Box
        
       | disillusioned wrote:
       | Wow, it's like a Keith Jarrett improv generator!
        
       | dmd wrote:
       | Similar to: https://apps.apple.com/us/app/soundprism/id386833491
        
       | mojifwisi wrote:
       | Nice! That guy also made this interactive version of Terry
       | Riley's "In C": https://teropa.info/in-c/
        
       | drew-y wrote:
       | Is there a way to move the mouse without playing a key? I am
       | using a touchpad, so maybe it can't be done without an actual
       | mouse.
        
       | abruzzi wrote:
       | I played with the original a long time ago. IIRC, back then
       | Laurie Spiegel asked for some kind of credit on music that was
       | generated by it given that the musical output would be bounded by
       | the software design.
       | 
       | Also, if you've never heard her album Unseen Worlds, its
       | definitly worth checking out.
        
       | trynewideas wrote:
       | By total chance, this revealed a flaw with my mouse that's been
       | haunting me for months.
       | 
       | My right mouse button intermittently doesn't bring up context
       | menus, which I seemingly confirmed by recording the screen and
       | visualizing click events in a presentation mode. It would show
       | what looked like one right click, but no context menu, or a
       | context menu that appeared and was immediately dismissed.
       | 
       | But this revealed that it's actually rapidly sending multiple
       | logical clicks per physical click. The logical clicks are fast
       | enough that the screen recordings didn't differentiate them as
       | separate events - which sent me in the wrong direction, making me
       | think the OS was disregarding clicks. But here, the multiple
       | clicks are clearly audible.
       | 
       | So thanks!
        
         | robinsonb5 wrote:
         | I've had this problem on _so_ many mice over the years, going
         | back to the Amiga days. Often it can be fixed by opening the
         | mouse and gluing a tiny bit of thin card to the nub which
         | presses on the microswitch. (Usually the problem is just that
         | the plastic has worn down over the years and no longer pushes
         | the button quite far enough to make a clean contact.)
        
           | isatty wrote:
           | Interesting, I'd expect mice to come with hardware debounce
           | by default.
        
             | cstrahan wrote:
             | There's an article (on modifying mice with hardware
             | debouncing) that talks a bit about this:
             | 
             | https://www.tomshardware.com/reviews/hack-mouse-click-do-
             | it-...
             | 
             | > This is one more example of perfectly good theory not
             | getting used in practice to save pennies per unit and also
             | to perpetuate planned obsolescence. That is, sales would
             | drop if you no longer needed a new mouse every two to four
             | years as a result of glitchy buttons.
             | 
             | FWIW, the [1]Zaunkoenig brand is where I first heard about
             | this. I have their M1K and M2K mice, which are really nice.
             | (I am otherwise unaffiliated with them)
             | 
             | [1]:
             | https://zaunkoenig.co/blogs/blog/zaunkoenig-m1k-firmware
        
       | pigcat wrote:
       | With your hand on the mouse, move it up and down a couple
       | millimetres quickly, like you're scratching an itch. This makes
       | quite a nice song.
        
       | tkam wrote:
       | Nice! One problem: There's digital clipping. I suspect that the
       | four samples are normalized individually, and when playing at the
       | same time the transients add up to over 0dB. On quality
       | headphones (beyerdynamic dt770 for me) it is quite audible. It
       | happens with the piano and the synth sample, but is more audible
       | with the piano sample.
        
         | IAmGraydon wrote:
         | Additive digital clipping would be happening in your device.
         | You should be able to resolve it by turning your OS volume
         | down. This website could use a volume slider for each voice,
         | though.
        
           | vanderZwan wrote:
           | > _You should be able to resolve it by turning your OS volume
           | down._
           | 
           | It doesn't resolve it, the clipping happens in the audio
           | generation before the OS does anything with it.
        
           | breakfastduck wrote:
           | Clipping can occur at any gain stage, not just the final
           | output
        
         | codazoda wrote:
         | Is that the sort of "scratch" or "crunch" I hear from my
         | Sennheiser HD 4.50's or is it something else?
         | 
         | At first, I didn't even notice it, but now I went back to
         | listen more carefully. I'm not sure if my headphones are
         | "quality" or not but they are the most expensive set I've ever
         | owned.
         | 
         | I hear no clipping (like sudden silence) at the end of notes,
         | even if I wait a long time. But, my ears are not tuned.
        
       | neosat wrote:
       | Incredible - loved it! This is what a modern digital music
       | instrument should be like :)
        
       | thriftwy wrote:
       | It does produce quite nice-sounding fragments from random mouse
       | moves. It highlights how much of the actual music composition
       | process is just plain math, which is done by the algorithm in
       | this case.
        
       | throwaway4837 wrote:
       | No matter where I move my cursor, it ends up sounding like an
       | opening theme for a light-hearted anime series. Impressed at how
       | melodic it sounds even though I don't know what I'm doing.
       | 
       | Also please fix the mouse jacking. I was only able to regain
       | control of my mouse after exiting the tab :(
        
         | neosat wrote:
         | Esc worked for me!
        
       | fire wrote:
       | god I clicked in and suddenly an hour went by, this is brilliant
        
       | lioeters wrote:
       | It's a modern Web Audio implementation of this Mac software from
       | 1986 (last updated in 2004).
       | 
       | Music Mouse - An Intelligent Instrument -
       | https://web.archive.org/web/20220629172536fw_/http://retiary...
       | (Archived because the original site is quite slow:
       | http://retiary.org/ls/programs.html)
       | 
       | It was written by Laurie Spiegel, a composer and early pioneer in
       | electronic music.
       | 
       | > Music Mouse is an algorithmic musical composition software
       | developed by Laurie Spiegel. The "intelligent instrument" name
       | refers to the program's built-in knowledge of chord and scale
       | convention and stylistic constraints. Automating these processes
       | allows the user to focus on other aspects of the music in real
       | time.
       | 
       | > In addition to improvisations using this software, Spiegel
       | composed several works for "Music Mouse", including Cavis muris
       | in 1986, Three Sonic Spaces in 1989, and Sound Zones in 1990. She
       | continued to update the program through Macintosh OS 9 and, as of
       | 2021, it remained available for purchase or demo download from
       | her website.
       | 
       | https://en.wikipedia.org/wiki/Laurie_Spiegel
       | 
       | She was featured in the documentary, Sisters with Transistors.
       | https://sisterswithtransistors.com/
        
         | lioeters wrote:
         | > To enable MIDI output, please use a Web MIDI capable web
         | browser. (Chrome or Opera)
         | 
         | It took 10 years, but Firefox finally has Web MIDI!
         | 
         | Bugzilla: Implement the WebMIDI API -
         | https://bugzilla.mozilla.org/show_bug.cgi?id=836897
        
         | dmix wrote:
         | Love that website. Was this sold in stores?
        
         | runlevel1 wrote:
         | Laurie Spiegel is a Bell Labs alum. Bell Labs is the nexus for
         | so many remarkable people.
         | 
         | A bit off-topic, but does anyone know of a book that touches on
         | how Bell Labs managed to recruit and foster so many great
         | minds?
        
           | pushedx wrote:
           | "UNIX: A History and a Memoir" by Kernighan is a really fun
           | read. Just publushed a few years ago as well.
           | 
           | https://www.amazon.com/UNIX-History-Memoir-Brian-
           | Kernighan/d...
        
           | YossarianFrPrez wrote:
           | It's somewhat covered in John Gartner's "The Idea Factory: A
           | History of Bell Labs"
        
       | tabtab wrote:
       | Cool! It's kind of a glorified wind chime.
        
       | geocar wrote:
       | how fun.
       | 
       | maybe the author does not know this, but shift+/ doesn't work on
       | a portuguese keyboard at least in safari; shift-7 is / and
       | shift-' is ?
       | 
       | all of the other keys work.
        
         | tapland wrote:
         | It's the same for a lot of EU keyboard layouts =(
        
         | waltbosz wrote:
         | I wonder if the key mapping was copied from the original Mac
         | program.
         | 
         | It does seem odd to require ctrl/shift to make the changes
         | since it necessitates taking your hand off the mouse.
        
       | mdmglr wrote:
       | Ingenious! Can I record in the app?
       | 
       | How are the tones generated?
        
       | dbg31415 wrote:
       | I had this software when I was a kid on my Macintosh Classic.
       | 
       | This brought back a lot of fond memories -- just doodling with
       | sound.
       | 
       | Thanks!
        
       | franciscop wrote:
       | With the default settings and just scrolling around it really
       | feels like I'm in some sort of badly played Ghibli's OST!
       | 
       | https://www.youtube.com/watch?v=hpfLKbjTWn0
       | 
       | https://www.youtube.com/watch?v=zz68vFJmLKk
       | 
       | https://www.youtube.com/watch?v=tFFy0yEYki0
        
         | johnchristopher wrote:
         | Haha, I thought the same !
        
       | shubhamjain wrote:
       | As a person with no knowledge of music theory, I am amazed how
       | the music produced here, even with completely random mouse
       | movements, still sounds decent--even a bit pleasing, if I may.
       | Certainly better than hitting keys randomly on a piano as an
       | amateur. How does that happen? Is it just about the tempo, and
       | how space between two notes has been programmatically defined?
        
         | rkachowski wrote:
         | when you first open the page it will only use the white keys,
         | this essentially puts everything in the key of C major and
         | prevents clashing of notes.
         | 
         | If you change the setting from "diatonic" to "chromatic" on the
         | top left you'll get the random hitting of keys effect you
         | mention :)
        
           | coldtea wrote:
           | How do you know it's not in A minor? :-)
        
             | reikonomusha wrote:
             | (Somewhat of a half-serious/half-joke answer:) Because it
             | doesn't have any G#, of course!
        
             | rkachowski wrote:
             | plot twist: it was E Phrygian
        
         | exitb wrote:
         | It does keep the tempo, but also limits you to a single scale.
         | So it does sound nice for a bit, but the song doesn't really go
         | anywhere. There are some physical instruments that typically
         | limit you to a single scale too, like a harmonica.
        
           | coldtea wrote:
           | You don't need modulation (going to more than one scale/key)
           | for the song to "go somewhere" or be hella interesting,
           | catchy and touching/emotional.
           | 
           | Tens of thousands of the most known rock and pop songs and
           | hits, from rockers to tearful ballads, are single scale
           | diatonic as well.
           | 
           | You don't even need off-scale passing notes...
           | 
           | The reason this doesn't go anywhere, is not because it's
           | single-scale, but because the melody has no direction and
           | purpose. It's just a "random" pick based on the mouse
           | movements.
        
         | ChadNauseam wrote:
         | Music theory is an amazing subject. You can actually make
         | random notes sound reasonably musical by constraining them to
         | just a few simple rules. Copy/pasting from Dmitri Tymoczko's
         | Music 105 lecture notes:
         | 
         | 1. Conjunct melodic motion. Melodies tend to move by short
         | distances from note to note. Large leaps sound inherently
         | unmelodic.
         | 
         | 2. Harmonic consistency. The chords in a passage of music,
         | whatever they may be, tend to be structurally similar to one
         | another.
         | 
         | 3. Acoustic consonance. Some chords sound intrinsically good or
         | pleasing. These are said to be consonant.
         | 
         | 4. Scales. Over small spans of musical time (say 30 seconds or
         | so), most musical styles tend to use just a few types of notes,
         | between 5 to 8.
         | 
         | 5. Centricity. Over moderate spans of musical time, one tonic
         | note is heard as being more prominent than the others,
         | appearing more frequently and serving as a goal of musical
         | motion.
         | 
         | (Not to say that everything that sounds musical follows these
         | rules, just that if you follow these rules the output is likely
         | to sound musical.)
        
       | DefNotMe wrote:
       | Implementation of something like this in Pong would be brilliant,
       | where the ball is the "mouse"
        
         | dbg31415 wrote:
         | The old bouncy screensaver.
        
       | robinsonb5 wrote:
       | I had low expectations for this when I clicked the link and saw
       | the spinny-rotatey loading ring (which for informational sites
       | usually portends a wasted journey) - but I have to say this is
       | one of the coolest things I've seen in a long time! I think an
       | FPGA-based implementation of this or something similar might end
       | up on my projects list in the not too distant future...
        
       | maxbendick wrote:
       | Always love to see Tero Parviainen's new projects. Big
       | inspiration for my webaudio tinkering.
        
       | PaulDavisThe1st wrote:
       | As the world's most Curmudgeonly and Grumpy Old Man (TM) when it
       | comes to web-based music applications ... THIS IS AMAZING. If I
       | wasn't busy, I'd be implementing a native version of this right
       | now. I know some of Laurie Spiegel's music, but had no idea she
       | had ever designed anything like this. Just amazing.
        
       | cloogshicer wrote:
       | Is the source code available somewhere?
        
       ___________________________________________________________________
       (page generated 2022-11-21 23:01 UTC)