News for hackers. Stuff that matters.
Re:Show HN: A JavaScript emulator of the Synthi A synthesizer by fit2rule on Monday June 13, 2016 @05:04AM (#11892503)
Great project! Any chance you could add a virtual keyboard easily enough?
Re:Show HN: A JavaScript emulator of the Synthi A synthesizer by alnis on Monday June 13, 2016 @03:31PM (#11896697)
It's something that I've been thinking about!

It should be relatively straightforward to implement a virtual keyboard. My thought was to model it as an oscillator that only outputs sound for as long as a key is held down and whose frequency instantaneously changes every time a different key is pressed. Each keypress would also call `manualTrigger()` to re-trigger the envelope. (There could also be a mode to output "control voltage" rather than a waveform so that you could use the keyboard to control other oscillators - I believe the EMS DK keyboard had this dual functionality.)

The thing that's been stopping me from implementing it so far has largely been the question of where to put the keyboard! There's not really any space on it in the UI, but I don't like the idea of making it into a modal dialog because people probably would want to be able to turn knobs and work the patchboard while operating the keyboard. So I'm not sure what the best solution is ...

Re:Show HN: A JavaScript emulator of the Synthi A synthesizer by alnis on Monday June 13, 2016 @03:32PM (#11896718)
P.S. Another thing I've had in mind was the ability to connect MIDI keyboards and have them mimic EMS DK keyboard behavior within SYNTHI-JS. I wasn't sure if it was possible to work directly with MIDI devices in JavaScript, but it appears that this library could do the trick: https://github.com/cwilso/WebMIDIAPIShim

It's worth a try, at least.