Generate music/sound from current note

I think this could be very interesting… The way I’d probably approach it would be to focus on a more ambient sound with a few different oscillators. Off the top of my head, I would probably suggest:

  • One consistent key for the entire vault. Perhaps set as an option.
  • We can easily convert from any numerical value (including hashes) to a note within a given scale using a modulus to index into a scale array. This could be just 7, or higher if we want specific octaves.
  • One main “drone” oscillator that sets the current root note. This shouldn’t change too frequently – perhaps it should be based on a hash of the full note name?
  • Another, higher “melody” oscillator which changes more frequently, but still slowly – perhaps current line number?
  • Perhaps a more rhythmic arpeggio could come in based on a chord (generated from the root note + the melody?), with its volume/velocity tied to your current pace of typing – in other words, the more quickly you’re generating content, the more present it is in the mix.
2 Likes