Hi Oriol,

we're getting there, slowly but surely. The code that produces 01 instead of 7f is in the MIDI-LED stuff. Apply the attached patch to fix that. You should also change the threshold back to 0.5, that was fine.

I can now vaguely remember me changing my driver code to react to anything higher than 00 to turn the LEDs on, just because Mixxx kept sending 01 instead of 7f as I was expecting.

Adam, I'm sending this message to the list as well. If you agree that it's generally a good idea to transmit the max possible value 7f instead of the lowest non-zero value in the midiled code, you're welcome to commit.

Haven't got time to test this, yet. I hope there aren't any typos.

- Ján

Hi again,

I just saw you added a debug line to

void MidiObjectALSASeq::sendShortMsg(unsigned int word) {

so I uncommented it and I can see now what message is being sent. The configuration I have now is:

<lights>
    <light>
        <group>[Channel1]</group>
        <key>play</key>
        <status>0xB0</status>
        <midino>0x12</midino>
        <threshold>0.5</threshold>
    </light>
</lights>

When I press play (and a song starts playing on deck 1), I get the following message on the console:

Debug: MIDI message send via alsa seq: b0 12 01
Debug: MIDI message send via alsa seq: b0 12 01

According to the BCD3000 manual, I should send a value 64 or higher in order to turn on the led, but I don't really understand what this threshold tag means. I tried  putting 40 in the threshold tag (which is 64 in decimal base), but the result is:

Debug: MIDI message send via alsa seq: b0 12 00
Debug: MIDI message send via alsa seq: b0 12 00

and the led stays off, of course.

Concerning my opinion of the BCD3000, first of all a disclaimer: I have no idea of mixing, I've just tried some days at a friend's house who's got 2 CD-DJ and I found it quite fun, so I wanted a cheap way to try at home. For this purpose the BCD3000 is perfect, I have 2 good quality audio outputs (1 for the headphones and the other one for main), and independent controls for controlling the main functions of mixxx (or tracktor in windows). However, it's true that it feels a bit plasticky, the tact of the sliders is really far from my friend's mixing table, and I can't imagine anyone scratching using the small wheels. In conclusion, it works fine but it hasn't a pro feeling at all. I recommend that you touch a real one before buying to see if it fits your needs.


2008/3/7, Oriol Puigbó <[EMAIL PROTECTED]>:
Thanks Ján, but it doesn't seem to work. Is there a way I can see what command is mixxx sending to the BCD3000? I'll give you my opinion about the BCD3000 tomorrow, now I have to leave...

Extract from the BCD3000 manual:
                                                                
             6.3 Receiving MIDI commands
                                                                 
The reception of MIDI data also allows for transmitting commands 
from third-party DJ software to your BCD3000. Although this
function is not necessary to control the device from the software,
you can still display the switching status of button LEDs, which
enables you to work more intuitively.
                                                                                         
All button LEDs receive MIDI control change data (on/off). If the
controller value transmitted is between 0 and 63, this value
corresponds to the switched-off status (LED off). If the value is
64 or higher (max. 127), the LED illuminates.


2008/3/7, Jan Jockusch <[EMAIL PROTECTED]>:
Hi Oriol,

try changing <midino>0x127F</midino> back into <midino>0x12</midino> in
your config file and see if that fixes the problem. The MIDI output
routine decides on the 0x7f or 0x00 value itself based on the threshold
setting, so that doesn't need to go in the config file.

The amidi sequence looks good to me (normal CC setting). I think that
must be the solution.

What's your opinion on the BCD 3000, by the way? Ben thinks it's not
very sturdy hardware (he dislikes the faders and the small jogwheels).
How about you? (I ask because some time ago I was thinking of getting
one myself.)

- Ján

>
> However, I can turn it on using the following command:
>
> $ amidi -p hw:1,0,0 -S 'B0 12 7F'
>
> and I can turn it off by using:
>
> $ amidi -p hw:1,0,0 -S 'B0 12 00'
>
> However, with the following code in the xml file nothing happens:
>
> <lights>
>     <light>
>         <group>[Channel1]</group>
>         <key>play</key>
>         <status>0xB0</status>
>         <midino>0x127F</midino>
>         <threshold>0.5</threshold>
>     </light>
> </lights>
>
> Any idea?
>
>


Index: mixxx/src/midiledhandler.cpp
===================================================================
--- mixxx/src/midiledhandler.cpp	(revision 1874)
+++ mixxx/src/midiledhandler.cpp	(working copy)
@@ -21,7 +21,7 @@
 
 void MidiLedHandler::controlChanged(double value) {
     unsigned char m_byte2 = 0x00;
-    if (value >= m_threshold) { m_byte2 = 0x01; }
+    if (value >= m_threshold) { m_byte2 = 0x7f; }
 
     m_midi->sendShortMsg(m_status, m_byte1, m_byte2);
 }
Index: mixxx/src/midiobjectalsaseq.cpp
===================================================================
--- mixxx/src/midiobjectalsaseq.cpp	(revision 1874)
+++ mixxx/src/midiobjectalsaseq.cpp	(working copy)
@@ -326,10 +326,11 @@
     switch ((byte1 & 0xf0)) {
     case 0x90:
         snd_seq_ev_set_noteon(&ev, byte1&0xf, byte2, byte3);
+	snd_seq_event_output_direct(m_handle, &ev);
 	break;
     case 0xb0:
 	snd_seq_ev_set_controller(&ev, byte1&0xf, byte2, byte3);
+	snd_seq_event_output_direct(m_handle, &ev);
 	break;
     }
-    snd_seq_event_output_direct(m_handle, &ev);
 }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to