Help looking for Sonic Pi coder to help create some tunes

:grinning: this is why I love sonic pi - its allowed me to make music and imagine what could be. However this brings with it limitations and in my case i have zero music background nor training nor can I hold a tune :upside_down_face: this is why i started this chat to get help and assistance to produce something that has the ability to keep the generated music within the realms of enjoyable listenable music and not get lost in chaotic random sounds, which is what is happening with my attempts so far with sonic pi. these samples so far have been great and helping me to understand a bit more as I go along. so please any help in getting the above to keep its upbeat tone would help as its really coming together nicely.

You could always share some of this with us, if you have questions about how you could change it. Piecing together fragments of other folk’s shared code is ok, but it’s incredibly helpful to the learning process to examine your own work too! :slight_smile:

1 Like

yes I get that - Ive been at this for awhile and just getting chaos, as I mentioned I dont have any music background and my post here was about getting someone to assist me getting a harmonious upbeat tune going. like i posted above.
I also want to use an external midi to add in notes to sync with this using n,v=sync “/midi*/note_on” - I have set this up and it works but again Im at a loss on how to play some decent notes while using either hitsware or robin’s songs in a way that harmonizes with the current loop.

Sure, I understood everything you said above, and I get the main point of this topic. I’m glad that some of the subsequent examples have so far helped you to at least get closer to what you were thinking of :grinning_face_with_smiling_eyes:

If you are also interested in the possibility of knowing how to reduce some of the apparent chaos in your own attempts with Sonic Pi, I’m sure there are folks willing to help with this too :slightly_smiling_face:

Perhaps start with a rudimentary loop of your own
and proceed by ear ( if , as you say , Your musical
training is nil ) ?

thanks really appreciate this and the help on this forum :+1: Ill post some of my attempts and see how we go from there


on this thread please can anyone show me how to insert samples sounds in a sync manner and also overlay these samples with notes that i will play from my external midi device using n,v=sync “/midi*/note_on” - :smiley:

It may help to elaborate a little more about what you mean by ‘insert samples sounds in a sync manner’ :slight_smile:

It’s a bit easier to work with an existing code example we can add to or suggest changes for -
Have you an existing loop or two we can work with? :sweat_smile:

Hi Ethan - thanks for picking up on this.
I came across this code which Im posting a sample of here which I want to have the midi notes overlayed to when the buffer:

Welcome to Sonic Pi

Sonic Pi 2.11

set_volume! 1

##| Link to the samples folder:
samples_dir = “C:/Program Files/Sonic Pi/etc/samples/”
##| There is 99.9999% chance that your link is different. Change it to point to your dir…

use_synth_defaults pulse_width: 0.99, coef: 0.45

-------------------- CONTROL --------------------

in_thread do
1.times {cue :drums; sleep 4}
16.times {cue :part1; sleep 4}
8.times {cue :chorus; sleep 4}
16.times {cue :part2; sleep 4}
8.times {cue :chorus; sleep 4}
16.times {cue :drums2; sleep 4}
16.times {cue :chorus; sleep 4}

-------------------- :drums --------------------


in_thread do
with_fx :reverb, room: 1 do
with_fx :reverb, room: 1 do
with_fx :rbpf, res: 0, mix: 0.7 do
##| with_fx :gverb, mix: 0.2, room: 0.7 do
loop do
sync :drums
sample :loop_safari, amp: 1, finish: 0.5, pan: 0.5

-------------------- :drums2 --------------------


in_thread do
with_fx :rbpf, res: 0, mix: 0.5 do
with_fx :reverb, room: 1, damp: 0.9 do
loop do
sync :drums2
sample :loop_safari, amp: 2, finish: 0.5

1 Like

another example I would like to see is how to play a full sample song wav file, and while that is playing introduce the midi notes - again in a synchronized way .

Sure. My point is, it’s not clear what you are trying to sync with :slight_smile:

This bit at least should be no different to playing any other sample, provided the length of the song is of course a sane time length (not hours and hours :wink: ).

its to sync the incoming midi notes from the midi device that are played at random times

again im asking on how to introduce these external midi notes at random times overlayed onto the sample being played in the background

Sure - my confusion was whether you were talking about wanting the sounds triggered by MIDI to be synchronised with other existing sounds, which I gather now is not the case. Sonic Pi - Tutorial shows how to play a Sonic Pi synth via external MIDI, does that get you closer to your goal?

nope - I know how to play a Sonic Pi synth via external MIDI. thats not the issue.
In fact it what I want is the sounds triggered by MIDI to be synchronised with other existing sounds

Ok. So if you’re talking about Sonic Pi just capturing the events, and delaying triggering a synth with the MIDI values until some other sound happens some time in the future, maybe you’ll need to store these note & velocity values from the MIDI event in Time State using set(:n, n) and set(:v, v) for example.
That way you can use get(:n) and get(:v) at the point in your code when you want to actually trigger a sound. (Since you’ll be wanting to have the code that triggers the sound in a separate loop to the one that syncs on the MIDI events).

As it happens, it’s possible the following may provide some useful reading regarding your particular goal - it may be similar:

seems similar not sure but I am looking for examples here on how to achieve as per question - no idea what "quantized after ‘recording’"means

Quantising is basically taking notes that have undesired timing variations, and aligning their timing with a particular ‘grid’. Not as important in this case, so ignore that concept here.

Anyway, there is an example that may be similar to what you are interested in, described in that topic, by Robin - with video and a link to code. Have a look and see if it’s closer to what you’re thinking.