0
\$\begingroup\$

I know somehow it combines different harmonics to synthesize notes, but I don't exactly know how this is implemented.

\$\endgroup\$
3
  • \$\begingroup\$ You're asking us how to build a digital musical instrument. That's far too broad to be answered like that! You can rescue your question by explaining what you've researched so far, what you've implemented in software (this is all really easy to try out e.g. with Python), and what specific question you need help with. \$\endgroup\$ Aug 5, 2020 at 12:36
  • \$\begingroup\$ Not even close to a half guess. \$\endgroup\$
    – Andy aka
    Aug 5, 2020 at 12:54
  • \$\begingroup\$ Some use samples of real pianos for every note, others use samples for other one octave and scale the pitch of those samples for other octaves, others use math try to simulate the physics of a real piano to synthesize and actual products are proprietary (i.e. secret). It sounds like you did zero research of your own before coming here. First few google result showed this: hal.inria.fr/hal-01894219/file/hal.pdf and pdfs.semanticscholar.org/1e60/… This is some advanced PhD stuff \$\endgroup\$
    – DKNguyen
    Aug 5, 2020 at 13:11

1 Answer 1

2
\$\begingroup\$

Electronically speaking a digital piano does not necessarily work by combining different harmonics to synthesize a specific note. Most digital pianos work by playing pre-recorded samples that are generally stored as audio files on some internal memory. They keyboard loads the specific note's audio files (stored as digital data,) runs that through a DAC (digital to analog converter) which is then played out as an analog note.

Analog synthesizers are what I beleive you are asking about generally use VCO (voltage controlled oscilators) that often come in IC packages like down below:

enter image description here

With a setup using a VCO key presses generally translate into various voltages that the VCO circuit translates into a type of signal (sine, square, triangle).

Circuit Digest explain this in more detail at the link below.

https://circuitdigest.com/tutorial/voltage-controlled-oscillator-vco

The general system architecture of a synth would looks like this,

enter image description here

  1. The keyboard generates voltages dependant on the note pressed.
  2. VCO (voltage controlled oscillator) generate a note signal proportional to the keyboard voltage.
  3. VCF (voltage controlled filter) would filter the VCO signal proportional to the filter controls voltage.
  4. ADSR (attack, decay, sustain, release) this would affect the shape of the signal, how quick the note appears, how long it takes to roll off.
  5. Noise, some synths will have the option to distort the signals with a noise generator.
  6. If the synth is polyphonic it will combine the signal of the various oscillators before outputting.

Different types of synths use different methods and different types of oscillators, they could also include multiple VCO, filters, delay and any number of other audio effects to generate more interesting sounds.

@DKNguyen good point, some synths use a DSP (digital signal processor) to generate signals, these effectually use programs designed using mathematical formulas to calculate the desired signals. After the DSP stage these types of keyboards work in the same way as a standard 'sample' digital keyboard with a DAC and amplifier to a speaker.

This was quite a vague questions and this is a massive subject, I hope this give you a basic idea of the concept, please do a bit more googling if you want to find out more details.

\$\endgroup\$
2
  • \$\begingroup\$ The voltage from the key doesn't specify the waveshape (triangle, square, sine, etc.) The voltage in that type of synthsizer specifies either the frequency of the note played or the volume. \$\endgroup\$
    – JRE
    Aug 5, 2020 at 13:52
  • \$\begingroup\$ Yeah, most synths with multiple wave shapes have a separate toggle switch or something to select the shape for each VCO. They keyboard generate the voltage for pitch & sometimes velocity (To represent how hard the key was pressed) \$\endgroup\$ Aug 5, 2020 at 13:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.