On 03/12/2010 01:22 PM, Gabriel M. Beddingfield wrote: > > Hi Thomas, > > On Fri, 12 Mar 2010, Thomas Orgis wrote: > >>> If you want to do a mapping inside of hydrogen, do it in midi_input.cpp. >>> Look at line 143 for the takes CC message handling. You may also want to >>> introduce a std::map or something for the NoteOn messages in >>> MidiInput::handleNoteOnMessage. >> >> That looks really useful... I think what I want is just a >> bit of added magic on line 201: >> >> int nInstrument = nNote - 36; >> >> depending on some lookup table in MidiInput, that is >> modified when CC messages come in, or I really just skip >> the CC part and set the mapping on note on/off of the >> hihat pedal. As long as there is no real hihat controller >> with more levels of openness, this mode would be more >> useful, even. >> >> I don't see much difficulty in adding this in the source, >> perhaps adding config file settings, too ... it might be > [snip]
Support for CC hihat controllers is great; I'm glad you're doing it. > If I understand this correctly... then a simple way to > implement this in Hydrogen would be: I like this approach, and I've got a couple of comments below. > * 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. > * The MidiInput class would need to handle > CC#4, changing pedal_state state as it gets > MIDI data. > > * 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. > * This will ONLY work for a GM-compliant drum > kit. For anything else, this is just wrong > or you'll need to find a way to configure it. > Hydrogen currently does not have an sort of > metadata to determine if a kit is GM. > An experimental idea: > > * When the state changes from OPEN to CLOSED, > generate a note #44 with a low velocity > to mimic the sound of the cymbols coming > together. I would expect drum brains to emit this note by themselves when the pedal hits fully closed, and generate the velocity based on how fast the pedal was depressed, so we'd want to have the ability to disable the generation from within Hydrogen to avoid duplicate notes. Since we'd have the entire CC message stream, we could generate velocity on the speed of change as well. > Note: The standard CC#4 is a generic "foot pedal" > controller. That is, it's intended to be used for generic > expression pedals. This controller is not dedicated for > hi-hats... so make sure that you can disable this > functionality. > > Thanks, > Gabriel > > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/hydrogen-devel ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
