Hi eli,
that´s almost identical to my code and i kind of love that workflow with sonic pi its so intuitiv.
Oh except that i plan on using severel samples in one line of code like this
tick
samps = (ring 0,1,2,3).look
play "Path" samps
the rest would be the same, either with if one_in / if spread / bools
Only midi notes, I have heard of the whole MIDI clock thing, but I believe the MIDI protocol hndles the clock on it’s own. So just send midi notes with the function called (wait for it) … midi. You can feed it notes like :C4 but in the standard MIDI drum arrangement you start at midi note 35 (or :B0).
And again, remember to send the data through channel 10. here’s how you do that:
with_midi_defaults port: "find your port name on sonic pi prefences, I/O", channel: 10 do
live_loop :kick do
midi 35
sleep 1
end
end
One thing I tried out before I discovered my Roland JV 1010 also has drums and that you can try out if you don’t have hardware to get drum sounds you can just route your midi from sonic pi to your favorite music software (or digital audio workstation or DAW for short). I use ableton Live and I made a drum rack, that is essentially a sampler you can trigger with midi. I use LoopMIDI on windows to create a virtual MIDI connection between sonic pi and Live because windows lacks MIDI routing while macOS does have routing software and I believe Linux can use jack to accomplish this…but don’t quote me on that one xD
So yeah If you don’t have hardware you can just use a DAW to trigger samples from sonic pi. I prefer triggering samples from a DAW instead of triggering them right from sonic pi because I can apply fx and so some EQ on a GUI with a DAw, and i find it easier than in sonic pi.
I would recomed you also explore some software stuff alongside hardware because it can get expensive super quick. I recomed talking a look at pure data, it’s a visual programing environment for music and it can do synthesis. Meaning you can create your own synthesizers.
There is also Supercollider, sonic pi uses spuercollider already but you can use it to also create your own syths and add them directly to sonic pi. But pure date is way easier than SC You can sue all sorts of synthesis techniques to create your own drum samples and then use them in sonic pi.
You can get easy visual synths like Helm instead of creating your own and use sonic pi to trigger Helm to make all softs of sounds. Another cool software is VCV rack, it emulates real life hardware from modular synthesizers. I really dig how you can get away with making all your tracks completely with software, hardware is cool but it gets expensive.
True. I got deeply into VCV Rack before Sonic Pi and currently I’m using them together for what will be a live act, but also now for recording. It’s a lovely marriage! I put a fair bit of effort working out how to use them together, which isn’t a given.
Musically I can do everything I want currently with these two (and a DAW for recording, mixing, mastering) - but just for emotional reasons I fancy incorporating some hardware - no logic to it Something around not always using a computer, you know?
If Eurorack was a quarter of the price it is I might get into that but it’s way to expensve. I’m thinking a Korg Volca or Arturia Microfreak. The problem as I see it is how to use them in combo, which includes the sync question.
That said, thank you for the Pure Data tip - I’ll have a look at that.
PureData - yes looks fascinating and possibly a practical sound source. I got it running easily off SPi. Looks like a whole new learning curve. I’ll have to weigh up. I like the minimalist interface - one of the prices to pay with VCV Rack is that the (excellent) GUI does use a lot of resources. But on the other hand it’s the closest to having a real modular that us mortals will get.
Hmmm, either hours learning a new thing and it’s another thing-on-computer. Or spend some money, get a thing-not-on-computer and hours working out how to integrate it. For live work, twiddling some knobs is a nice thing.
If u want to look into pure data i would suggest to use it with “Automatonism”, its basicly vcv rack in pure data, i am doing osc synthesis there, but how do i transmit pure data in real time to sonic pi?^^
i am just throwing in that question while i try to figure it out
Aaaagh another thing Seriously, though thanks for the tip!
Re routing sound around - I’m not putting anything back through SPi. I’m running SPi and Rack side-by-side (or PureData for that matter) and putting the output through WASAPI so it’s all mixed by that, using the Windows mixer. Alternatively, running on two separate computers and the two outputs into a traditional mixer.
Whatever setup, I’ll be aiming to use SPI as the ‘conductor’ because of it’s solid timing model.
Thanks, I defo recognise modular there. Two sides to this - exploring the tech and making music. I have to be careful not to lose site of the music while diving into the tech.
Someone’s put up a PD Moog subharmonicon patch, which I couldn’t actually get to work right off but that’s a side issue. If I could run that on another RPi, triggered from SPi that sounds like a nice thing. I mean, the real thing is 800 quid or something.
Maybe if I put the RPi in a cardboard box, with the moog controls printed on…put it at the back of the stage with the right lighting, what do you think???
i know what u mean, i just tried to repeat what i did on this patch in vcv but couldnt get the same result with the same settings, i would suggest rebuild this patch i postet and see if u like it, it doesnt have to be much more complicated for some cool sounds
A PD patch? Where is it, did I miss it, I certainly would like to try it, than you
I just had a quick go on Rpi, installed no probs but it doesn’t see my midi keyboard. And I’m not sure how I’d get SPi to trigger it - there isn’t the loopMidi available on RPi, maybe there is something else. So more work needed
…whereas this w/e I ‘built’ a three-voice Rack synth in a few mins, each one on a different midi channel, all voices played from OSC commands from SPi loops. Very nice.
Implementing that idea in PD on a RPi would be great
True that we have such a privilegie to choose between amazing software and hardware options. Is just that I get the impression that many people who want to get into more experimental electronic music think they have to go with hardware synths and get an eurorack but I can’t help but stress that some of the most experimental and groundbreaking music like Autechre’s is made with software and you don’t need to be left out if you don’t have the money. That’s what I love about sonic pi!
@alexesc I agree. And there’s lots of downside to hardware besides the cost - like it can break or get stolen, which is a real issue for gigging musicians. Always getting kit nicked. For a lot of people a computer is a sunk cost.
For me, since the virus I’m really missing the physicality of playing out. Well, not lugging a drum kit round but the playing. It was time not spent at the computer, which was a plus. I’m thinking a bit of kit might be good in that regard.
Bui the ‘not too much money on kit’ vibe is one of the reasons I’d like to use Raspberry Pi as much as possible rather than a high end PC. I’ve had a start look at PureData - my question is have you got that working from SPi?
And here’s my final word on the OP (until the next final word) incorporating all the goodness I’ve picked from here last few days.
It strikes a perfect balance between a drummer’s view of the world where you carefully place hits on beats, and the electronic world of random beats ha ha ha. I’ve put in an XOR on each instrument and each beat using the lovely one_in() function. A value of 0 means it’s as written, unchanged (my world) - a large value gives bit of random - a low value gives chaos (your world)
#General purpose drum kit
use_bpm 120
live_loop :main do
sleep 4
cue :bar
end
live_loop :drumkit do
sync :bar
#Instrument Probs
p1=[0,0,0,0,0,0] #Threshold for playing bar 0=always 6=never
p2=[6,6,6,6,6,0] #Prob on each beat 0=no change, 1=lots, 100=little
v =[5,4,3,3,1,5] #Volume
a =0.5
perc = "x---------------"
open = "---------------x"
hihat = "xxxxxxxxxxxxxxxx"
pedal = "----x-----------"
snare = "------------x---"
kick = "x---x---x---x-x-"
inst = [kick, snare, pedal, hihat, open, perc]
samp = [:bd_fat,
:sn_zome,
:drum_cymbal_pedal,
:drum_cymbal_soft,
:drum_cymbal_open,
:perc_bell]
with_fx :reverb, mix: 0.2 do
with_fx :echo, mix: 0.1 do
i=0
6.times do
if dice(6)>p1[i] then
in_thread do
j=i
16.times do
sample samp[j], amp: a*v[j] if (inst[j][tick]=="x") ^ one_in(p2[j])
sleep 0.25
end
end
end
i+=1
end
end #echo
end #verb
end #drumkit