On 03/12/2010 05:58 PM, Gabriel M. Beddingfield wrote: > > Hi Dave, > > On Fri, 12 Mar 2010, Dave Allan wrote: > >>> * Implement some variable that maintains state >>> (e.g. an enum with OPEN and CLOSED). We'll >>> call it pedal_state. The variable needs to >>> be accessible to the MidiInput class. >> >> It'd need to be 128 steps to support continuous hihat control, I think. > > IIRC, the OP said the foot-pedal sends only 0 and 127... > that's why I suggested a boolean-like enum. Are there > hi-hat controllers that send 128 steps?
The OP did say 0 and 127, but others do send more fine grained messages. The spec says 0 - 127 is valid: http://www.midi.org/techspecs/midimessages.php#3 >>> * When Hydrogen gets a MIDI Note On for Notes >>> 42 (Closed Hi-Hat), or 46 (Open Hi-Hat), it >>> needs to re-direct them both based on the >>> current value of pedal_state. (Redirect >>> to #42 if CLOSED, #46 if OPEN.) >> >> This raises an interesting question: what note do most brains generate >> when the pedal is half open? I would expect open hihat with the actual >> sound played by the sampler depending on the hihat state as determined >> by the CC messages, but we should make this behavior somewhat >> configurable unless we know that all brains behave the same way. > > I'm not sure what other sampler/synths are doing. I was just wondering if most triggers send note 42 or 46 for a hit on the hihat when the controller pedal is half depressed. It doesn't really matter, though--Hydrogen's instrument map can be set up for either way. > To get similar sort of behavior from Hydrogen, you would > probably need to implement sort of a 2D-layered instrument > (select sample based on velocity and a 0.0-1.0 controller > value). The controller value can be mapped to anything > (like CC#4). Currently Hydrogen only has 1D-layered > instruments (select sample based on velocity). I think that's right. It's probably only really relevant for hihat at this point, but I don't see any reason to limit it to hihat in the code. I'd expect most kits simply to implement one dimension (velocity) for samples other than hihat. My kit (most kits?) generate note 44 when the controller becomes fully closed with the velocity based on how quickly the pedal was depressed, so a 2D layered instrument on note 46 in a mute group with note 44 and 42 would work beautifully. I'm going to be the studio in about two weeks. I'll get 2D of hihat samples for a test kit, even if they don't sound all that great. Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Hydrogen-devel mailing list Hydrogen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hydrogen-devel