I'm just getting started with sending midi, initially to a TR-8 drum machine and a micro-brute synth.
The drum machine uses specific midi notes for each drum sound. I'd like to be able to type the drum name rather than the number, so I can program patterns easier and see what's happening.
At the moment, for example, sending 4 kick drums looks like this
d1 $ n "231*4" # sound "tr8" # midichan 9
What I'd like to be able to do is this:
let BD = 231
d1 $ n "BD*4" # sound "tr8 # midichan 9
... and get the same result.
But not sure how to execute the "let" bit, or why it's not allowing me to do it.
I suspect I'm missing somehting obvious!
Any help gratefully accepted.
It's not obvious, but Haskell can't so easily peek inside the mininotation (the stuff in quotes) to see "variables" there. But you can write a substitution function yourself
Could this be extended to allow variant sounds, like it's done with samples -- bd producing bd:0, but also allowing bd:1 mapped to a different note, and so forth? This would be great for drum machines that offer different sounds per "instrument"; more generally, putting together arbitrary groups of sounds and selecting from them with patterns should be fun.
This works great, and clearly has lots of uses, many thanks!
However, I'm looking for something slightly different .. namely, for a way to select MIDI notes in the same way that n "1 10 3 4" # s "bd hh" plays samples 2 and 11 from a folder named "bd", then 4 and 5 from folder "hh".
Could bd and hh here be redefined to pick from lists of MIDI notes, instead of lists of samples -- allowing numbers to be passed in? Maybe using (abusing?) scale would work, I'll try that
(If this could be combined with inhabit to put a pattern on each position, even better.)
Thanks for asking I have been experimenting with these, and all work pretty well: the Elektron Analog Four synth, using "multimap" to have 128 (drum) sounds available over four channels; with the Groove Agent drum machine that comes with Cubase; and with the Frau Angelico drum machine from Standuino (now Bastl Instruments). All over MIDI.
It's the Analog Four that is the most fun and challenging of these, since there is a lot of sounds to choose from.
(Edit: on a Mac, and using Cubase to monitor and record both midi and audio. A "Blackhole" audio device receives sound from SuperCollider. Eedit: sync doesn't work, but so far it's been OK to align to the timeline after recording.)
cool. yeah, i'm using ableton and i would love to eventually get to that same kind of 128-multimap level with my setup, having just a ton of samples preloaded and use patterns to select them. right now, i'm using combinations of stacked instrument groups or drum racks and then scanning through them by assigning them to macros. it's okay but it seems like a workaround to something more powerful or intuitive.
That sounds a lot more sophisticated than where I'm at so far. But here's a little discovery. With toScalehere, the following introduces "ht" as a scale and plays through five different "hihat tip" sounds in Groove Agent:
let scale = getScale (scaleTable ++ [ ("ht", (map (subtract 60) [76,77,79,81,83])) ])
d1 $ n (scale "ht" "0 [2 1] ~ 3") # s "midi"
The midi notes for the sounds are 76, 77, 79, 81, 83.
It's nice that it works, but it feels kinda wrong.
I am looking for a straight ahead way to give midi note numbers a name and not seeing anything obvious here. I see something about pattern numbers with example numbers that are beyond the midi note number system (231). I see something about assigning one name to a number of notes. How can I just say:
bd = 36, sd = 38, hh = 42