User Tools

Site Tools


nomades:tuto_sonic-pi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

nomades:tuto_sonic-pi [2017/09/16 15:04] – created - external edit 127.0.0.1nomades:tuto_sonic-pi [2024/03/17 19:24] (current) julien
Line 436: Line 436:
 end end
 </code> </code>
 +
 +faire une boite à rythme sans utiliser des samples (générateur only!)
 +<code>
 +define :create_kick do |note|
 +  use_synth :sine
 +  with_fx :distortion, distort: 0.2 do
 +    play note, attack: 0, sustain: 0, release: 0.2, amp: 3, pitch: -15
 +    sleep 0.4
 +  end
 +end
 +
 +live_loop :kick_drum do
 +  create_kick 40 # Joue un kick à la note MIDI 40
 +end
 +
 +define :create_snare do
 +  use_synth :noise
 +  play 60, attack: 0.05, sustain: 0.1, release: 0.05, amp: 0.5
 +  use_synth :fm
 +  play 60, attack: 0.002, sustain: 0, release: 0.2, amp: 2, pitch: -12
 +  sleep 1
 +end
 +
 +live_loop :snare_drum do
 +  create_snare # Joue un snare à intervalles réguliers
 +end
 +
 +define :create_hihat do
 +  use_synth :noise
 +  with_fx :hpf, cutoff: 120 do # Utilisation d'un filtre passe-haut pour simuler le son d'un charleston
 +    play 70, attack: 0.01, sustain: 0, release: 0.05, amp: 2
 +  end
 +end
 +
 +live_loop :hihat_loop do
 +  sleep 0.25 # Ajustez ce timing pour créer différents rythmes de charleston
 +  create_hihat
 +end
 +</code>
 +
nomades/tuto_sonic-pi.txt · Last modified: 2024/03/17 19:24 by julien