How can I get this kind of piano sound

Here is an mp3 of a sweet nice piano sound:

Claude Debussy’s Première arabesque - MP3 file

taken from here:

How can I generate this kind of sound using sonic pi given the notes.
which use_synth I must use to get this kind of sound.
Or is there any other way?

Hi,
to me you will waste your time :slight_smile:. Of course you can translate every note of this score to be played in sonic pi but it’s a hard work and not very very funny. And even you get there, you may use the piano synth of sonic pi, you won’t reach the level of a real pianist.
but before Debussy, you can practice with a more small tune. Frère Jacques to see how sonic pi is working.
@robin.newman made the job (Frere Jaques with processing visualisation) so if i keep only the notes part, this should work

nf=[:c4,:d4,:e4,:c4]*2+[:e4,:f4,:g4]*2+[:g4,:a4,:g4,:f4,:e4,:c4]*2+[:c4,:g3,:c4]*2
df=[1,1,1,1,1,1,1,1,1,1,2,1,1,2,0.5,0.5,0.5,0.5,1,1,0.5,0.5,0.5,0.5,1,1,1,1,2,1,1,2]
use_bpm 180
with_fx :reverb,room: 0.8,mix: 0.6 do #add reverb for interest

live_loop :notes do #first part
    use_synth :pulse #differnt synth for each part
    use_bpm 180
    nv = nf.ring.tick #select each note in turn
    rel=df.ring.look #select corresponding duration
    play nv,release: rel,amp: 0.2 #play note with release set by duration
    sleep df.ring.look #sleep for duration of note
  end
end

have fun !

1 Like

Yes, I agree with that. But if you want to do it, then Sonic Pi does have a piano synth, and you could add some reverb fx to it too. It won’t sound like a real piano or a real pianist - with all the dynamics and expression a pianist would put in. Sonic Pi plays very regularly so particularly with something like Debussy it’ll be a bit wooden.

If you wanted a more authentic piano sound, you could have the notes in Sonic Pi and play them out through a sampler VST for which you can get real piano samples, which do respond to variations in key velocity.

I still don’t think the end result would sound anywhere near a real piano being played, but it depends what you want. As an exercise it would really be something.

Compared with the alternative of studying the piano for years, and buying a nice piano, Sonic Pi does start to look like a good option :smiley:

1 Like

Hi,

if you don’t mind using midi output of Sonic Pi you can try

which, supposedly, will sound fairly decent.

Qsynth is available for windows too but an older version https://github.com/JoshuaPrzyborowski/Qsynth-Windows-Builds. I used it Midi_cc to select bank and qsynth

but again no software can play as a realistic pianist even the worst pianists :-). You can record a real pianist playing via a midi keyboard and get the result into a midi score. But Sonic Pi is not made for that.
So @vinodv i encourage you to start learning piano ! it’s a lot of fun and work but you may one day play Debussy and be proud of yourself. There are some electronic piano around 600 € to begin if you can’ afford a piano.

I agree with @nlb that it is difficult to play romantic piano music on Sonic Pi, but it is possible to play a midi file in Sonic Pi using its internal synths with some success: it does miss some notes, as I show in my experimental midi Player Program. I tweaked this slightly so that it is compatible with the latest 3.3beta of Sonic Pi and here is a rendition of part of Debussy’s Arabesque, using both the piano and pluck synths. The midi file is sent from MidiplayerX on a mac direct to Sonic Pi. I also use TouchOSC to control synth settings, as per the article.

2 Likes

well done @robin.newman !
i did not think about this solution. Use an external midi player.
At the end, it sounds pretty good. So i was wrong :slight_smile:

Well, just to add my two cents: You can get a decent piano sound but the level of expression, subtleties of dynamics and timing an interpretation has/can have played by an experienced piano player is a totally different story. But I am pretty sure, that @vinodv is aware or that…

1 Like

That is pretty remarkable in fact

SP’s ‘piano’ synth is actually quite versatile, if you use the
vel: and hard: options.

This is not my code, but I’ve ‘twiddled’ it a bit to show
what I mean…

use_bpm 90

live_loop :intro do
  
  # harmonisation de i-iV-V-i-N-V7-i en do mineur
  use_synth :piano
  x = rrand_i(1, 10)
  
  force = rand(0.25..0.4)
  fade = rand(1..2)
  vel = rand(0.25..0.4)
  
  if x > 3
    play [:C2, :Ef3,:C4] ,decay:2 ,hard:force # i
    sleep 2
  else
    play [:Af2, :Ef3, :Af3,:C4] ,vel: vel, decay:fade ,hard:force#VI substitution
    sleep 2
  end
  play [:F2, :F3, :Af3,:C4] ,vel: vel, decay:fade ,hard:force# iv
  sleep 2
  play [:G2, :D3, :G3,:B3] ,vel: vel, decay:fade ,hard:force# V
  sleep 2
  if x > 5
    play [:C3, :Ef3, :G3,:C4] ,vel: vel/2, decay:fade ,hard:force # i
    sleep 2
  else
    play [:C3, :Ef3, :Af3,:C4] ,vel: vel/2, decay:fade ,hard:force # VI substitution
    sleep 2
  end
  play [:F2, :F3, :Af3,:Df4] ,vel: vel, decay:fade # N sixte napolitaine
  sleep 2
  if x > 4
    play [:G2, :F3, :B3,:D4] ,vel: vel, decay:fade # V7
    sleep 2
  else
    play [:Af2, :F3, :B3,:Df4] ,vel: vel, decay:fade # Substitution par Triton Db7
    sleep 2
  end
  play [:C2, :G3,:C4] ,vel: vel, decay:4 # i
  sleep 4
  
  
end

Eli…

2 Likes