Piano patch?

    Jul 11 2011 | 8:16 pm
    Hi maxers,
    as a total noob i'm trying to create a patch that represents a piano as best as possible. And that brings me to the first step, where's best to start. Sample based, VST or in Max itzelf? Could somebody push me in the good direction and give me some hints. Thanks!

    • Jul 13 2011 | 2:03 pm
      Hello john - and welcome!
      Your question is very general - i guess that's why there is no answer yet. I.e.: What do you mean with 'representing a piano'? Do you want to build an instrument? In this case all the mentioned approached will lead you to a possible result with different strong and weaker aspects.
      p.s.: starting from max5 on you can't build vst plug-ins anymore. but you can load third-party vst-plugins into a patch.
    • Jul 13 2011 | 8:22 pm
      Hi jan, thanks for taking the time to respond!!
      yes, i want to build an instrument. i just started to learn to play the piano, but i don't have one at home. I only have my midikeyboard and Max. So i thought, also as an project, to make a piano patch so i can practise at home. But just as i mentioned, i don't know where to start. For me it's important that the instrument behaves like a piano. Sound comes second for me (although the notes need to be correct).
      Any help??
    • Jul 13 2011 | 11:43 pm
      Hi john, here is the simples possible version of building an instrument with Max:
      copy the compressed code and paste it into an new patcher. lock the patcher double click the [notein] to select your midi keyboard as an input. double click on [noteout] and select the synth of your operating system (ie Microsoft Synthesizer for Windows) and start playing. If you want it more sophisticated look at this: https://cycling74.com/tutorials/polyphonic-synthesizer-video-tutorial/ and i'd recommend the tutorials in the help files.
    • Jul 14 2011 | 8:28 pm
      I don't understand if you are interested in programming a piano software OR if you just need to have a decent piano sound for practising.
      And I don't understand if you want to have a very realistic acoustic piano (or electric piano, or other) OR if you just want something that behaves somehow like a piano but has a different sound.
      There are a few decent freeware VSTi electric pianos (Rhodes or Wurlitzer). For acoustic pianos I have no idea.
    • Jul 14 2011 | 9:19 pm
      Hi Julien, i understand your confusion. I think i'm kinda confused about it myself. My plan is to make a patch that behaves like a piano and sounds like one. But the thng that i'm most worried about is the way the response of the patch will be, cause a piano behaves on it's own way (hamer / strings). The fastest and easyist way will be to use a VSTi. But i kinda like the challenge and it'l make me learn more.
      Thanks Jan! I'll look into it.
    • Jul 14 2011 | 9:45 pm
      When it comes to programming a piano, there are 3 solutions:
      - sampled piano - synthetic piano - sample/synthesis hybrid
      Actually it is not really possible to sample all resonances so even sampled pianos are hybrids. Usually, all notes are sampled at many different velocities, without the pedal. Alternatively you can sample only a few velocities and use synthetic crossfades or filters to recreate harmonics loss when playing softer. Soundboard resonance is usually done thanks to a convolution with the soundboard impulse response. Resonance amount is function of the sustain pedal depth, which can vary continuously between no pedal and full pedal. Harmonic resonances between strings that correspond to depressed keys are fully synthetic (usually). There is also an AHR envelope for stopping the samples, and most of the times it also triggers releases samples on release (though release samples can be done in synthesis). See the Ivory VSTi for example.
      There are a few fully synthetic pianos, including Pianoteq, the Roland V-Piano and the Yamaha CP-1. It is not that easy to model an acoustic piano. Actually it is one of the most difficult keyboard / percussion instruments to model. Good luck if you choose this solution. I have not studied it myself, perhaps I would start from advanced FM synthesis. On old Yamaha stage pianos, the attack portion is sampled, but the decay is made from a loop of the end of the attack portion. This loop goes through an attenuator and a lowpass filter that are controlled by an envelope generator.
    • Jul 14 2011 | 9:47 pm
      Hi John It sounds like quite a challenge, recreating the sound of an acoustic piano in Max. The three avenues open to you would be: physical modelling; additive synthesis (with resonant filters); sampling.
      It's debatable as to which is the most efficient and accessible route to take; from a purely personal perspective, I would tempted by physical modelling as, for me, the other two would get quite dense. But horses for courses!
      I couldn't find a reference to piano string/soundboard modelling by searching the forum, but look for the "Percolate" collection, and see here for some modelling resources:
      Good luck, Brendan
    • Jul 17 2011 | 9:19 am
      Thank you all for answering! I think this is somewhat more difficult then i anticipated. I think best for me will be to stick with VST for now and when my skills with Max will let me i'll give it a try.
      Thanks. john.
    • Jul 17 2011 | 12:26 pm
      To start with, maybe try to program a new polyphonic keyboard instrument that behaves similarly to a piano but has a different sound.
      For example, you can remark that a piano (either acoustic or electromechanical) has the following very basic characteristics:
      - a rather sharp attack - a long decay that can be interrupted if you release the key - the fundamental frequency lasts a very long time; the higher the harmonics and the shorter they last - if you play harder the sound has more harmonics (spectrum is "richer")
      You can use these simple ideas to build an imaginary, digital "piano", and it will probably not be possible to emulate it by acoustic means
      From a creative point of view I personally think it is more interesting to do this than simulating a piano anyway.
    • Jul 17 2011 | 12:54 pm
      in trying to help you maybe we frightened you away; but julien's advice above is excellent. Build something simple based on your 'goal' concept.
      The additive synthesis tutorial patch in Cycling74/examples/synthesis folder is a good place to start. Then look at my (and others') patch included here:
      which does exactly the kind of thing julien is talking about: very simple and intuitive control over the amplitude/decay of upper harmonics.
      Dave Bessel built a very accessible wood/metal synth patch in Max, which helped me learn about the resonanaces of different materials and it's great fun to hack too:
      And I can send you the simple string model patch I used here if you like:
      Good luck Brendan
    • Jul 18 2011 | 2:21 pm
      Thanks julien and Brendan! I'll give it a go. Checking the info out and getting started on it.
      Brendan could you please send me that patch, sounds great! john.baq[at]hotmail[dot]com.
    • Jul 18 2011 | 3:32 pm
    • Jul 18 2011 | 3:33 pm
      ...sent to the given email address
    • Jul 20 2011 | 10:50 am
      I worked my ass off and this is what I got so far. Trying to crack the whole triggering thing (I integrated the MetalWood patch). Now I'll bend my head around the sound.
    • Jul 20 2011 | 4:25 pm
      Hi some really nice textures here; can I suggest that you put the [preset] object OUTSIDE the [poly~] object - changing a preset only affects the given voice open at the time, and some of the partials envelopes are generating two 'notes' (ie attack, release, then attack again). You might consider placing a few of the more intuitive or general control parameters outside the [poly~] as well. For example, 4 amplitude envelopes per voice X 16 voices = 64 different control parameters - things will get complex quickly.
    • Apr 09 2014 | 10:49 am
      John.Baq - do you have an e-mail address I could contact you on? I am wondering if you would give me permission to use your piano patch on an interactive sound experiment I am doing for university...
    • Apr 24 2014 | 8:54 am
      Hi James, no problem, feel free to use it! john.baq[at]gmail[dot]com
    • Apr 25 2014 | 7:06 am
      Thanks John this is very much appreciated!