Been using Sam’s “Sonic Minecraft” code example as part of my participation in a couple of events with kids and other curious people. Also been using MIDI controllers to drive synths on another Pi, running MODEP. The FAQ (though not that frequent, still important enough): “So, you (can) use your instrument to put blocks in Minecraft?” Hadn’t set it up this way, but it does make sense.
So, here’s my attempt at this point. It’s still not ideal, which is why suggestions would be much appreciated:
live_loop :mc_note_blocks do mc_message "This is Sonic Minecraft" with_fx :reverb do with_fx :echo, phase: 0.125, reps: 32 do tick x = (range 30, 90, step: 0.1).look y = 20 z = -12 mc_teleport x, y, z ns = (scale :e3, :minor_pentatonic) n = ns.shuffle.choose nota=get[:nb] noteb=(scale 0, :chromatic)[nota] bs = (knit :glass, 3, :sand, 1) b = bs.look bb=mc_block_ids[noteb] synth :beep, note: n, release: 0.1 mc_set_block b, x+20, n-60+y, z+10 mc_set_block b, x+20, n-60+y, z-10 mc_set_block bb, x+noteb, noteb+y, z-3 sleep 0.25 end end end live_loop :sax do nt, vel=sync "/midi/pisound_midi_ps-233vayb/1/1/note_on" set :nb, nt end live_loop :drum_beats do sample :bd_haus, cutoff: 100 sleep 0.5 end
Part of the issue is in choosing block types. Sounds like some fire blocks are just taking over, regardless of which notes are played (the idea was that the note would select the block type). Also, since the blocks appear on the side, it’s less obvious what’s going on. Not to mention that the latency is pretty high, which might have to do with my device.
Eventually, might connect the two pisound HATs through a MIDI cable (and filter the wind controller’s MIDI signal, as it’s full of
active_sensing messages). Hoping the latency won’t be worse and even hoping it could be better.