# Just a piano music nothing much

**URL:** <https://in-thread.sonic-pi.net/t/just-a-piano-music-nothing-much/7696>\
**Category:** Development \[obsolete\]\
**Created:** [March 27, 2023, 12:58pm UTC](https://in-thread.sonic-pi.net/t/just-a-piano-music-nothing-much/7696 "2023-03-27T12:58:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KuntalSardar098](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@KuntalSardar098](https://in-thread.sonic-pi.net/u/KuntalSardar098)\
**Post date:** [March 27, 2023, 12:58pm UTC](https://in-thread.sonic-pi.net/t/just-a-piano-music-nothing-much/7696/1 "2023-03-27T12:58:05Z")

</div>

use\_bpm 80

# define the chords

chord1 = chord(:C3, :minor)  
chord2 = chord(:A3, :minor)  
chord3 = chord(:D3, :minor)  
chord4 = chord(:G3, :minor)

# define the melody notes

notes = [:C4, :B3, :A3, :G3, :F3, :E3, :D3]

# play the chords and melody in a sad sequence

4.times do  
play\_pattern\_timed chord1, 1  
sleep 0.5  
play\_pattern\_timed notes, 0.25  
play\_pattern\_timed chord2, 1  
sleep 0.5  
play\_pattern\_timed notes.reverse, 0.25  
play\_pattern\_timed chord3, 1  
sleep 0.5  
play\_pattern\_timed notes, 0.25  
play\_pattern\_timed chord4, 1  
sleep 0.5  
play\_pattern\_timed notes.reverse, 0.25  
end

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [March 27, 2023, 5:10pm UTC](https://in-thread.sonic-pi.net/t/just-a-piano-music-nothing-much/7696/2 "2023-03-27T17:10:55Z")

</div>

Hi Kuntal. Welcome to in-thread Nice first piece. You might like to put your code inside three reverse ticks ```  
on the line before the code and another three on the line after. That way it is easier for users to copy the code directly to their Sonic Pi. I show it below, with # symbols before the lines describing your code.  
I also tried a different synth. There’s so much experimenting and fun you can have with Sonic Pi

```ruby
use_bpm 80
use_synth :tri

#define the chords
chord1 = chord(:C3, :minor)
chord2 = chord(:A3, :minor)
chord3 = chord(:D3, :minor)
chord4 = chord(:G3, :minor)

#define the melody notes
notes = [:C4, :B3, :A3, :G3, :F3, :E3, :D3]

#play the chords and melody in a sad sequence
4.times do
  play_pattern_timed chord1, 1
  sleep 0.5
  play_pattern_timed notes, 0.25
  play_pattern_timed chord2, 1
  sleep 0.5
  play_pattern_timed notes.reverse, 0.25
  play_pattern_timed chord3, 1
  sleep 0.5
  play_pattern_timed notes, 0.25
  play_pattern_timed chord4, 1
  sleep 0.5
  play_pattern_timed notes.reverse, 0.25
end

```
