Hola y'all & n00b intro

hi there, new to in_thread. happy to be here. I am a developer and musician. I am working to integrating both focusing on latino sounds.

I have also been testing CHAT GPT and Sonic Pi to see what develops. Nice to meet y’all.

s.

Hiya!

I have been really interested in making some dirty synth cumbia. I’ll keep my eyes out for what you’ve created - I’m working towards better understanding drums to be able to get the rhythms right! haha.

Buena suerteeee

1 Like

that is whats up. :fire: I have started reading through the resources page: Sonic Pi Online Resources. once i get a better understanding of the syntax, i will share my code. OPEN SOURCE 4EVA.

if you are interested – i did ask chatGPT this:

using python package Sonic Pi create a beat.

i wanted to preview results before using Sonic Pi and then once I understand go make edits, a before and after.

Here is the github repo: GitHub - panchaX3000/sonic_pi_beatz: experimenting with Sonic Pi to create music through Live Code

Are these working for you?

I’m not sure if you have a py module that makes this all work, but running it in spi itself it’s broken & polishing up the code a bit… I mean I’d maybe call this some slightly interesting punchis punchis but…

I took out the first few lines as they’re straight python (i.e. import * from…)

# Set the tempo and key
use_bpm(120)

# Define the bassline
bassline = [ :G2, :D2, :F2, :C2 ].ring

# Define the chord progression
chords = [ :G2, :B2, :D3, :F3 ]

# Define the rhythm
rhythm = (ring 1, 1, 2, 3, 4, 4.5, 2, 3)

# Play the bassline and chords
in_thread do
  loop do
    play bassline.tick, release: 0.1, amp: 0.5
    sleep 0.25
  end
end

in_thread do
  loop do
    play_chord chords, release: 0.3, amp: 0.3
    sleep 1
  end
end

# Play the percussion
in_thread do
  loop do
    sample :drum_cymbal_closed, amp: 0.5
    sleep 0.5
  end
end

in_thread do
  loop do
    sample :bd_tek, amp: 2
    sleep rhythm.tick
  end
end

in_thread do
  loop do
    sample :elec_hi_snare, amp: 0.8
    sleep 0.25
    sample :elec_hi_snare, amp: 0.5
    sleep 0.75
  end
end

Let me know if there’s a spi module for py though, because I know python much better than ruby haha.

Also I’d be really happy to collab on trying to put something that sounds good together. I’m not sure how well you know the actual rhythms, but I have a strong enough grasp that if you could help me wrap my head around stuff like the tumbao, derecho, majao, etc. I should easily be able to code it for us.

I’d love to get somewhat close to playing around with sounds similar to Mitu:

absolutely love their music so just dropping it here for anyone who might enjoy some juuuuuicy latin electro! :slight_smile:

Let me know if there’s a spi module for py though, because I know python much better than ruby haha.

code is not working standalone nor in sonic pi - ja. :upside_down_face: this is an experiment for me in testing chatGPT.

i will make adjustments as i am learning the syntax for sonicpi. I know python much better than ruby too.

Yes, let’s work on something together. I know these rhythms well so SIIIIIIIII. i am down.I love MITU! i will follow up with my code.

1 Like

Awesome!

Here’s something I’ve been working on if you’d like to check it out. I was using different samples in a few places so it sounds a little goofy to me in this form, & there’s way cleaner ways to structure a song but I haven’t gotten around to them yet, haha.

My next goal is building out markov chains to control the music, as this tutorial shows: Making Markov Chain Hip Hop with SonicPi | omardelarosa.com

Have fun & whenever you’re ready i’ll be hyped to combine forces!!!

# see https://www.youtube.com/watch?v=5nSnr9ZUEDQ
cells = [
  [2],
  [1,1],
  [1,0.5,0.5],
  [0.5,0.5,1],
  [0.5,0.5,0.5,0.5],
  [0.5,1,0.5],
  [1.5,0.5],
  [0.5,1.5]
]

with_fx :eq do |eq|
  with_fx :krush, mix: 0.1 do |k|
    control eq, low: 0.75, low_q: 0.8, high: 0.2
    live_loop :base do
      control k, mix: doubles(0.1,3).look
      
      sample [:bd_haus, :bd_gas, :drum_heavy_kick, :bd_haus].tick
      sleep 0.25
      density [1,1,3,1,1].look do
        sample :drum_cymbal_pedal, finish: 0.3,
          rate: [1.02,1.02,0.98].look, amp: 0.7
      sleep 0.25 end
    end
end end


with_fx :echo, mix: 0.25,
pre_mix: 0.25 do
  with_fx :distortion do
    with_fx :eq, high: -0.5 do
      sleep 4
      live_loop :sner do
        use_sample_defaults rate: knit(-1,1, 1,5).tick
        sample :elec_snare, finish: 0.75
        sleep 1.75
        sample :elec_hi_snare, finish: 0.1
        sleep 0.25
        sample :elec_snare, finish: 0.5
        sleep 0.75
        sample :elec_hi_snare, finish: 0.3
        sleep 1.25
      end
end end end


with_fx :bitcrusher do |b|
  with_fx :flanger do
    with_fx :slicer, mix: 0 do |s|
      with_fx :eq, mid: 0.2 do
        live_loop :ch do
          
          # see https://www.youtube.com/watch?v=QeDm_8r1-bQ
          dg = knit(:i,4, :vi,4, :ii,4, :v,4)
          
          4.times do # full cycle thru degreez = 16*0.5 = 8 beets
            4.times do
              use_random_seed 420
              play chord_degree(
              dg.tick, :db4,:major,4, invert: [0,dice(3),0].look)
              sleep 0.5
              
              control s, mix: [1,0].choose,
                phase_delay: [0.25,0.1].choose, phase: 0.05*dice
            end
            
          end
        end
end end end end


with_fx :eq, low: 0.15 do
  with_fx :slicer, wave: 3 do |sl|
    with_fx :gverb, mix: 0.3 do |g|
      use_synth :fm
      use_synth_defaults sustain: 0.1, decay: 0.4, release: 0.1
      control g,  ref_level: 0.1, tail_level: 0.75, mix: 0.2
      
      live_loop :bass do
        4.times do
          control sl, mix: [0,0.5,0].look, amp_min: halves(0.25,5).look,
            phase: choose([0.75,[0.25, 0.1, rrand(0.1,0.5)].look]),
            phase_slide: 1, invert_wave: 0
          dg = ring(:i, :vi, :ii, :v)
          density [1,2,1].tick do
          play_pattern_timed chord_degree(dg.look, :db2, :major, 4), 0.5 end
        end
      end
end end end

#i know this is a clusterfuck
live_loop :snapes do
  6.times do
    cells[tick%4].length.times do
      sample :elec_tick
      sleep cells[look%4].look
    end
  end
  2.times do
    sleep 0.75
    density 2 do
      sample :perc_snap2, amp: 3
    sleep 0.3 end
    sleep 0.2
    with_fx :echo do
      sample [:elec_blip2,:elec_blip,
              :elec_triangle,:elec_cymbal].choose
  sleep 0.75 end end
  4.times do
    cells[4+tick%4].length.times do
      sample :perc_snap, rate: [0.8,1,-0.5].choose, amp: [1.25,0.5].look
      sleep cells[4+look%4].look
    end
  end
  2.times do
    cells[tick%4].length.times do
      density knit(2,3,1,2,3,1).look do
        sample :elec_tick
        sample :elec_snare, rate: 1.3, finish: 0.1
        sample :tabla_te_ne, amp: 0.4
      sleep cells[look%4].look end
    end
  end
end


with_fx :bitcrusher, bits: 8, sample_rate: 25000 do
  with_fx :rlpf, res: 0.9 do |f|
    with_fx :ixi_techno, phase: 7 do |ix|
      with_fx :slicer, wave: 0, phase: 0.125 do |sl|
        sleep 16
        live_loop :str do
          
          use_synth :blade
          
          4.times do
            control sl, mix: 0, wave: range(0,3,1).look
            n= play :db, sustain: 8, decay: [1,1,1,18].look, attack: 0.2
            use_synth_defaults vibrato_rate: [6,3].look,
              vibrato_rate_slide: 2, vibrato_depth: 0.22
            n
            
            3.times do
              sleep 1.75
              control sl, mix: [0,1,rrand(0,1)].look,
                phase: [0.25,0.1 * dice].look
              control n, note: [:bb, :eb, :ab].tick,
                note_slide: [0.25,0.5].look,
                pan: rrand(-1,1, step: 0.5), pan_slide: 0.5
              sleep 0.25
              
              use_transpose knit(0,4, -12,4, -24,2).look
              
            end
            sleep 2
          end
          
      end end
end end end
1 Like