Am Fri, 12 Mar 2010 12:57:08 +0100
schrieb Sebastian Moors <[email protected]>: 

> Can you check if it is fixed in trunk?

Trunk still behaves the same for me. I clear any of event/action or both, but 
that actually does not change anything.

> If not, can you send me your 
> hydrogen.conf?

I hope it's OK to have it inline here... it's not too big and I do not know if 
attachments would be blocked:

<?xml version="1.0" encoding="UTF-8"?>
<hydrogen_preferences>
 <version>0.9.5-svn1636</version>
 <restoreLastSong>true</restoreLastSong>
 <patternModePlaysSelected>true</patternModePlaysSelected>
 <useLash>false</useLash>
 <useTimeLine>false</useTimeLine>
 <maxBars>400</maxBars>
 <preDelete>0</preDelete>
 <postDelete>0</postDelete>
 <showDevelWarning>true</showDevelWarning>
 <hearNewNotes>true</hearNewNotes>
 <quantizeEvents>false</quantizeEvents>
 <path_to_rubberband>Path to Rubberband-CLI</path_to_rubberband>
 <recentUsedSongs>
  <song>/data/drumkits/ControlPad.h2song</song>
  <song>/data/drumkits/GMKit.h2song</song>
  <song>/data/drumkits/Untitled Song.h2song</song>
  <song>/data/drumkits/ControlPad.h2song</song>
  <song>/data/drumkits/GMKit.h2song</song>
 </recentUsedSongs>
 <recentlyUsedEffects>
  <FX>DJ EQ</FX>
  <FX>Ringmod with LFO</FX>
  <FX>AM pitchshifter</FX>
  <FX>Simple delay line, cubic spline interpolation</FX>
  <FX>Stereo reverb</FX>
  <FX>TAP Reverberator</FX>
  <FX>DJ EQ</FX>
  <FX>Ringmod with LFO</FX>
  <FX>AM pitchshifter</FX>
  <FX>Simple delay line, cubic spline interpolation</FX>
  <FX>Stereo reverb</FX>
 </recentlyUsedEffects>
 <serverList>
  <server>http://www.hydrogen-music.org/feeds/drumkit_list.php</server>
 </serverList>
 <patternCategories/>
 <lastNews>-</lastNews>
 <audio_engine>
  <audio_driver>Auto</audio_driver>
  <use_metronome>false</use_metronome>
  <metronome_volume>0.5</metronome_volume>
  <maxNotes>64</maxNotes>
  <buffer_size>1024</buffer_size>
  <samplerate>44100</samplerate>
  <oss_driver>
   <ossDevice>/dev/dsp</ossDevice>
  </oss_driver>
  <jack_driver>
   <jack_port_name_1>alsa_pcm:playback_1</jack_port_name_1>
   <jack_port_name_2>alsa_pcm:playback_2</jack_port_name_2>
   <jack_transport_mode>USE_JACK_TRANSPORT</jack_transport_mode>
   <jack_transport_mode_master>NO_JACK_TIME_MASTER</jack_transport_mode_master>
   <jack_connect_defaults>true</jack_connect_defaults>
   <jack_track_output_mode>0</jack_track_output_mode>
   <jack_track_outs>false</jack_track_outs>
  </jack_driver>
  <alsa_audio_driver>
   <alsa_audio_device>hw:0</alsa_audio_device>
  </alsa_audio_driver>
  <midi_driver>
   <driverName>ALSA</driverName>
   <port_name>None</port_name>
   <channel_filter>-1</channel_filter>
   <ignore_note_off>true</ignore_note_off>
   <discard_note_after_action>false</discard_note_after_action>
  </midi_driver>
 </audio_engine>
 <gui>
  <QTStyle>Plastique</QTStyle>
  <application_font_family>Sans Serif</application_font_family>
  <application_font_pointsize>10</application_font_pointsize>
  <mixer_font_family>Sans Serif</mixer_font_family>
  <mixer_font_pointsize>9</mixer_font_pointsize>
  <mixer_falloff_speed>1.1</mixer_falloff_speed>
  <patternEditorGridResolution>16</patternEditorGridResolution>
  <patternEditorGridHeight>16</patternEditorGridHeight>
  <patternEditorGridWidth>3</patternEditorGridWidth>
  <patternEditorUsingTriplets>false</patternEditorUsingTriplets>
  <showInstrumentPeaks>true</showInstrumentPeaks>
  <isFXTabVisible>true</isFXTabVisible>
  <mainForm_properties>
   <visible>true</visible>
   <x>1</x>
   <y>3</y>
   <width>1280</width>
   <height>800</height>
  </mainForm_properties>
  <mixer_properties>
   <visible>true</visible>
   <x>176</x>
   <y>223</y>
   <width>1249</width>
   <height>284</height>
  </mixer_properties>
  <patternEditor_properties>
   <visible>true</visible>
   <x>0</x>
   <y>0</y>
   <width>985</width>
   <height>504</height>
  </patternEditor_properties>
  <songEditor_properties>
   <visible>true</visible>
   <x>0</x>
   <y>0</y>
   <width>1280</width>
   <height>207</height>
  </songEditor_properties>
  <drumkitManager_properties>
   <visible>true</visible>
   <x>500</x>
   <y>20</y>
   <width>526</width>
   <height>437</height>
  </drumkitManager_properties>
  <audioEngineInfo_properties>
   <visible>false</visible>
   <x>720</x>
   <y>120</y>
   <width>0</width>
   <height>0</height>
  </audioEngineInfo_properties>
  <ladspaFX_properties0>
   <visible>false</visible>
   <x>56</x>
   <y>136</y>
   <width>0</width>
   <height>0</height>
  </ladspaFX_properties0>
  <ladspaFX_properties1>
   <visible>false</visible>
   <x>2</x>
   <y>20</y>
   <width>0</width>
   <height>0</height>
  </ladspaFX_properties1>
  <ladspaFX_properties2>
   <visible>false</visible>
   <x>2</x>
   <y>20</y>
   <width>0</width>
   <height>0</height>
  </ladspaFX_properties2>
  <ladspaFX_properties3>
   <visible>false</visible>
   <x>2</x>
   <y>20</y>
   <width>0</width>
   <height>0</height>
  </ladspaFX_properties3>
  <followPlayhead>true</followPlayhead>
  <bc>BC_OFF</bc>
  <setplay>SET_PLAY_OFF</setplay>
  <countoffset>0</countoffset>
  <playoffset>0</playoffset>
  <expandSongItem>false</expandSongItem>
  <expandPatternItem>false</expandPatternItem>
  <UI_Style>
   <songEditor>
    <backgroundColor>95,101,117</backgroundColor>
    <alternateRowColor>128,134,152</alternateRowColor>
    <selectedRowColor>128,134,152</selectedRowColor>
    <lineColor>72,76,88</lineColor>
    <textColor>196,201,214</textColor>
    <pattern1Color>97,167,251</pattern1Color>
   </songEditor>
   <patternEditor>
    <backgroundColor>201,207,225</backgroundColor>
    <alternateRowColor>242,245,255</alternateRowColor>
    <selectedRowColor>99,160,233</selectedRowColor>
    <textColor>40,40,40</textColor>
    <noteColor>40,40,40</noteColor>
    <noteoffColor>100,100,200</noteoffColor>
    <lineColor>150,150,150</lineColor>
    <line1Color>100,100,100</line1Color>
    <line2Color>130,130,130</line2Color>
    <line3Color>160,160,160</line3Color>
    <line4Color>190,190,190</line4Color>
    <line5Color>190,190,190</line5Color>
   </patternEditor>
  </UI_Style>
 </gui>
 <files>
  <lastSongFilename>/data/drumkits/ControlPad.h2song</lastSongFilename>
  <defaulteditor></defaulteditor>
 </files>
 <midiEventMap>
  <midiEvent>
   <mmcEvent>MMC_PAUSE</mmcEvent>
   <action>PLAY_TOGGLE</action>
   <parameter>0</parameter>
  </midiEvent>
  <midiEvent>
   <ccEvent>CC</ccEvent>
   <eventParameter>0</eventParameter>
   <action>EFFECT3_LEVEL_ABSOLUTE</action>
   <parameter>0</parameter>
  </midiEvent>
  <midiEvent>
   <ccEvent>CC</ccEvent>
   <eventParameter>4</eventParameter>
   <action>PLAY_TOGGLE</action>
   <parameter>0</parameter>
  </midiEvent>
  <midiEvent>
   <ccEvent>CC</ccEvent>
   <eventParameter>5</eventParameter>
   <action>PLAY_TOGGLE</action>
   <parameter>0</parameter>
  </midiEvent>
  <midiEvent>
   <ccEvent>CC</ccEvent>
   <eventParameter>125</eventParameter>
   <action>PLAY_TOGGLE</action>
   <parameter>0</parameter>
  </midiEvent>
  <midiEvent>
   <ccEvent>CC</ccEvent>
   <eventParameter>127</eventParameter>
   <action>PLAY_TOGGLE</action>
   <parameter>0</parameter>
  </midiEvent>
 </midiEventMap>
</hydrogen_preferences>

> > Suppose I want to hack that in in some quick and dirty way:
> >
> > 1. Can hydrogen actually recognize CC04 messages with different values?
> >    
> Hydrogen can do it, the midi dialag does it behind the scenes.. The 
> second paramter is (for example) used to set the volume if you use those 
> actions which set the volume of a mixer strip ( first param selects the 
> number of the strip).

I must admit that you lost me there... I am already stumbling over the face 
that a CC message has two parameters, yet the dialog shows only one (I suppose 
the first paramter is for the event). Then the action has another parameter...
I don't really grok the whole dialog, that situation is not helped by the 
widget set limiting the preferences window to a certain size, resulting in the 
fields in the action column being cut short (with ... in the middle) ... ah, 
one can manually resize the column... OK, but still I have to guess a bit on 
what the actions mean.
But they might be documented someplace, I did not really search for that.

> > 2. If I do not care about fixing up the GUI for this, even hardcoding some 
> > setting... like, swapping two instruments in the drum kit on said control 
> > message. Would that also need more than a night of hacking?
> >    
> 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 harder to work this out on the hydrogen GUI. 
I'm not so experienced with GUI programming. And I must admit, I already 
preferred direct editing of my drumkit.xml to add additional 
samples/layers/instruments, instead of using the hydrogen GUI for that...

> > Before I rampage on a search engine spree: Do you know such a program that 
> > I could hook up to trigger hydrogen with modified MIDI events?
> >    
> Hm no, but i think other people can help you here. Maybe you should ask 
> this question at the Linux audio developers mailing list!

I found qmidicontrol so far, from the Alsa Module Synth project... it can remap 
MIDI events, but I think it would need hacking to support changing its mapping 
on MIDI messages. Not totally sure, though. I think I'll go down on hydrogen 
first because it promises fastest result -- when the code is so neatly 
structured as its appearance suggests (so, nInstrument really is the only thing 
I have to change). That should be done in some idle hour this weekend... you'll 
see a patch;-)


Alrighty then,

Thomas.

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to