Arabseque No. 1 modified

I have made a modification to Claude Debussy’s Arabesque No. 1.
Arabesque No. 1 is done in E major and C Major scales.
Some of the notes in scales are exchanged between themselves.

E Major scale : [‘E4’, ‘Fs4’, ‘Gs4’, ‘A4’, ‘B4’, ‘Cs5’, ‘Ds5’, ‘E5’]
some 3 notes are exchanged with other three notes randomly.
say [‘E4’, ‘Fs4’, ‘Gs4’] → [‘Cs5’, ‘Ds5’, ‘E5’] respectively.

Related post of mine : Claude Debussy - Arabesque No. 1 - Piano

Here is the source code:

Hmm Just had a look at your code and tried to play it. Unfortunately all of the loops in the form for i in 0 … n appear to have the value of n one larger that it should be, causing Sonic Pi to stop with an error as it tried to play a non existent element in the input lists.
eg the section starting in line 33

``````n3 = [:r,:Gs5,:r,:Gs5]
d3 = [1.0,0.15729166666666675,8.642281333333335,0.29228042500000073]
amps3 = [0,0.3858267716535433,0,0.7086614173228346]
for i in 0..4
play n3[i],amp:amps3[i]
sleep d3[i]
end
end

``````

the loop iterates with i having values 0,1,2,3,4 and the last value causes an error as there are only values n3[0] … n3[3] in the input list of notes, and the same for the durations and amps values. The values that i takes is shown in the loop below

``````for i in 0..4
puts i
end
``````

gives the output in the log:

``````{run: 7, time: 0.0}
├─ 0
├─ 1
├─ 2
├─ 3
└─ 4
``````

So I reckon there are 424 values that need to be reduced by 1!

1 Like

I have corrected the code:

It now runs and produces sound
Interesting music!
Have you thought about tweaking the sound design slightly? changing the synth envelope, adding dynamics, or fx? What are your thoughts on it?

1 Like

Sounds good now. Produces an interesting variation on the original. BTW I would be interested in seeing the code you use for converting midi to SP code in the first version. I have used a couple of scripts myself but they each have different limitations.

1 Like

I know the sound is different from the sound created by real pianist.
Can you suggest some tutorial to learn this sound design.
In Sonic Pi - Tutorial, I have found how to use the " changing the synth envelope, adding dynamics, or fx".
Any basic (with or without sonic pi) sound design tutorials you wish to suggest.

I know the sound is different from the sound created by real pianist.

Just to clarify, it still sounds good! My thought was merely that if you were interested, it might be a fun experiment to tweak things in little ways to see how it affects the sound - not necessarily to make it sound like a ‘real pianist’ - maybe even just by adding some small fx, or changing the volume of notes or whole phrases over time, things like that!

Can you suggest some tutorial to learn this sound design.
In Sonic Pi - Tutorial, I have found how to use the " changing the synth envelope, adding dynamics, or fx".

Oh, are you saying you have already found these kinds of topics in the Sonic Pi tutorial? That was pretty much still going to be my first recommendation (see below:)

Sonic Pi’s tutorial is still a fine start
There’s ‘Duration with envelopes’ - useful if it’s interesting to make notes individually fade in or out over time, or do things like make them staccato notes (notes that are short, sharp and detached from others), etc: (Keeping in mind that you cannot lengthen notes made with the `:piano` synth, only shorten them)
https://sonic-pi.net/tutorial#section-2-4

See ‘Additive Synthesis’ and ‘Subtractive Synthesis’, useful if you want to add extra layers of frequencies into each note, or muffle various frequencies, to change the quality of their sound - (basically by playing several synths at the same time to mix their sound, or wrapping synths in one or more filter fx to cut some of their frequencies out):
https://sonic-pi.net/tutorial#section-A-18
https://sonic-pi.net/tutorial#section-A-19

There’s also things like using `control` to change the sound of a synth (or an fx that you might have wrapped around it) while it is still running: (say if you wanted to change the volume of a section of notes like you were performing a crescendo etc):
https://sonic-pi.net/tutorial#section-7

For more general, non-Sonic Pi sound design tutorials - an interesting and interactive one, based around synthesiser sounds, and a great one that starts from the complete basics and works its way up, is Learning Synths: