Dienstag, 25. November 2014

SonicPi Music Programmierung Sound programmieren


SonicPi Music Programmierung Sound programmieren

Author D.Selzer-McKenzie


Heute zeige ich Ihnen, wie Sie mit dem Windows-Programm (auch Linux) unter SonicPi einen Sound programmieren können. Hören Sie sich im Video den Sound an,

Den Source-Code finden Sie im Forum unter


Hier der SourveCode:

 

define :play_bb do |n|

  sample :drum_heavy_kick

  sample :ambi_drone, rate: [0.25, 0.5, 0.125, 1].choose, amp: 0.25 if rand < 0.125

  sample :ambi_lunar_land, rate: [0.5, 0.125, 1, -1, -0.5].choose, amp: 0.25 if rand < 0.125

  sample :loop_amen, attack: 0, release: 0.05, start: 1 - (1.0 / n), rate: [1,1,1,1,1,1,-1].choose

  sleep sample_duration(:loop_amen) / n

end

loop {play_bb([1,2,4,8,16].choose)}

 

 

with_fx :reverb, mix: 0.5 do

  loop do

    s = synth [:bnoise, :cnoise, :gnoise].choose, amp: rrand(0.5, 1.5), attack: rrand(0, 4), sustain: rrand(0, 2), release: rrand(1, 3), cutoff_slide: rrand(0, 3), cutoff: rrand(60, 80), pan: rrand(-1, 1), pan_slide: 1, amp: rrand(0.5, 1)

    control s, pan: rrand(-1, 1), cutoff: rrand(60, 115)

    sleep rrand(2, 3)

  end

end

 

play 56

loop do

  with_synth :dsaw do

    with_fx(:slicer, phase: [0.25,0.125].choose) do

      with_fx(:reverb, room: 0.5, mix: 0.3) do

        start_note = chord([:b1, :b2, :e1, :e2, :b3, :e3].choose, :minor).choose

        final_note = chord([:b1, :b2, :e1, :e2, :b3, :e3].choose, :minor).choose

 

        p = play start_note, release: 8, note_slide: 4, cutoff: 30, cutoff_slide: 4, detune: rrand(0, 0.2), pan: rrand(-1, 0), pan_slide: rrand(4, 8)

        control p, note: final_note, cutoff: rrand(80, 120), pan: rrand(0, 1)

      end

    end

  end

  sleep 8

end

with_fx :reverb do

  in_thread do

    loop do

      r = [0.5, 1.0/3, 3.0/5].choose

      8.times do

        sample :ambi_choir, rate: r, pan: rrand(-1, 1)

        sleep 0.5

      end

    end

  end

end

 

with_fx :wobble, phase: 2 do |w|

  with_fx :echo, mix: 0.6 do

    loop do

      sample :drum_heavy_kick

      sample :bass_hit_c, rate: 0.8, amp: 0.4

      sleep 1

    end

  end

end

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.