Jump to content

Zam

Members
  • Posts

    625
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Zam

  1. Welcome here 2hb Protools don't support mackie control or logic control protocol, only HUI which is different... You have to handle it with CC tricks. Two CC to active a function and two CC to turn it off 0xb0 0x0c 0xzz select a zone 0xb0 0x2c 0x0p port ON 0xb0 0x2c 0x4p port OFF let say transport record button is zone 0e and port 5 you should send CC 12(0x0c) value 14(0x0e) followed by CC 44(0x2c) value 5(0x05) to start record and CC 12(0x0c) value 14(0x0e) followed by CC 44(0x2c value 69(0x45) to stop record. Here you will find a pdf with all zone and port definition https://forum.cockos.com/showthread.php?t=101328 Best Zam
  2. Hi all I just want to share a setup and configuration to send full 13 or 14bit CV voltage For a side project (not fully related to audio) I came across a simple way to perform this I use a AOUT_NG, and hook a summing amp at output you need to sum 2 out for 13 bit, or 4 out for 14bit then it's just need map split at NGC. like this (for 14bit) each CV take care of a quarter: MAP11/HWORDI \ 0:0 \ 16383:65535 \ 65535:65535 MAP12/HWORDI \ 0:0 \ 16383:0 \ 32767:65535 \ 65535:65535 MAP13/HWORDI \ 0:0 \ 32767:0 \ 49151:65535 \ 65535:65535 MAP14/HWORDI \ 0:0 \ 49151:0 \ 65535:65535 EVENT_CV hw_id=1 id=1 type=PitchBend chn=1 range=map11 value=0 ports=10000000000000000000 EVENT_CV hw_id=2 id=2 type=PitchBend chn=1 range=map12 value=0 ports=10000000000000000000 EVENT_CV hw_id=3 id=3 type=PitchBend chn=1 range=map13 value=0 ports=10000000000000000000 EVENT_CV hw_id=4 id=4 type=PitchBend chn=1 range=map14 value=0 ports=10000000000000000000 Side note: -increasing definition will give you less output as you see -you need a good layout and proper grounding/0v reference, for a 0-5V CV (my use case) the step is 300uV !!! Best Zam
  3. ok what about no receiver/sender but direct definition for each rgbled (you should define all anyway) event_rgbled id=1 type=NoteOn key=any use_key_number=1 range=0:127 if_equal="your note n°" best Zam
  4. Ok, I should say First define the rgbled ID with fwd_id:rgbled:ID (if you have event_rgbled id=ID....) check in debug mode that the rgbled event receive the value 0 to 127 (according to note n°) now I have a doubt, look like you have more than one rgbled, I have to think more... Best Zam
  5. I'm here I never used use_key_number flag, but I think it's exactly for this kind of purpose You can't define ^value for the fwd_id. By default it forward the receiver value (or note n° in your case) or a fixed value if you add it to the definition (then it act more like a trigger) Here it seems you miss the id of the fwd_id=rgbled:id(:optional fixed value) Hope this help again. Best Zam
  6. Hello Chris Seems you don't define port for your events, which by default is USB1 UART1 and OSC1 If you have core hooked via UART4 you have to define ports=00000001000000000000, UART4 (IN4/OUT4) Best Zam
  7. Hello Yes It's the purpose of the jumper, remove it if you use external power. USB midi or update still work... Best Zam
  8. Hi Will you really consider buying 20 TKD fader for a Ramsa ??? My system use da and ad for every fader, motor driver is pure analogue with pid controller (little more that just a RC circuit...) Despite it's midibox HW compatible, I won't recommand it for your project regarding your skill and the actual analogue console involved. As a start you better use MF_NG with ALPS dual track, and see how it goes in the desk regarding noise. Best Zam
  9. Hello 2hb Welcome here 3 MF_NG + core32 + Din/Dout (according to your led/button count) should work. For what console do you plan to use this? Do you actually want to pass audio in the fader or just DAW remote ? Best Zam
  10. Hi all I want to implement a smart select function for my controler. The goal is simple, let say you have 8 button (and led) in a row, if you push button 3 and 6, led 3,4,5 and 6 is active if you push any button again, only this event is active if you push then button 8 and 4, led 4,5,6,7 and 8 is active etc... Any strategy recommanded to achieve this ? I like to avoid NRG for this function but right now I don't see how to handle this with NGC only. For the moment I have in mid NGR that get first(A) and second(B) value given by button N° set a value(C) according to how many button are involved between, C=(B-A)+1 set a value(D) that give the button offset, D=A-1 then conditional for each event M,N,O...T like if D<1 elsif C>8 set M=on if D<2 elsif C>7 set N=on if D<3 elsif C>6 set O=on .... if D<8 elsif C>5 set T=on I think I will also need a flip in case first button is higher count like If C<0 then C=C-(2C) As a delay (like 500ms) to let the system don't wait forever if only one button is pressed Input welcome Best Zam
  11. Cool But as I suspected, the video you link use TO220 package for "power drive" can't say the transistor ref used here but certainly more than 1A capabilities. Check your solenoid datasheet, there is chance ULN2803 can't drive them safely. Like with motor, spike current can be consequent. Best Zam
  12. By the bay, what do you plane to do with solenoid ?
  13. Hello Yes if you want to drive lot of gate, an array is good idea to gain space/layout, still be careful with current requirement depending of your solenoid/relay need, also flyback diode in your case (inductive load) Best Zam
  14. Hello Phat As a start it's a good idea to test what you say ! Just midi out to audio in (and connection back for playback), maybe with opamp buffer? to scale the 5Vdc, depending of your converter sensitivities, 5Vptp is about 7dBu. I still record my juno60 preset to DAW audio track across real juno audio when saving a project. It work well. In that case the data stream seem low speed, you can almost ear all bit transfer, also my converters are DC coupled which might help for such recording? About code you will certainly slower the baud rate to have a definable data over your converter bit rate (44k1?) (I just check, juno60 is 340baud...baud seem to be one bite) Best Zam
  15. Hello You just need a transistor switching circuit. If isolation is requested use an optocoupler. Best Zam
  16. Hi Never looked at this, tks for the pic, seems like lot of knob design today offer transparent option! Truly interesting ;) but sorry no need for this right now Best Zam
  17. Bonjour Bruno No really need for this now, but for the record I'm curious to know what knob/caps option is available for this ? Best Zam
  18. Hello Welcome here ! Any reason to use LPC17 over STM32F4 for your project ? Best Zam
  19. Hi Chris That's strange...without any Vref it should not work...I don't have a look at 3208 datasheet recently but don't remember any "sens" that use VDD is case Vref is not here ??? You get full range because it is given by Vref ! If Vref=3.3V you get max value when AD input is at 3.3V Definitely thinking your led draw enough current to cheat your 0V. Is the jitter only at the instant you switch led or change color, or it jitter stay as soon as you have led ON ? Again, check for strong as possible GND path from LED pcb to PSU, as AINSER pcb to psu. Do you have pcb design of your new layout? Best Zam
  20. Hi Check also for the LM317L, I don't remember if it have the same spec regarding min Vin against Vout For local regulation, yes, only Vref (and fader/pot +side), chips supply can stay at +5V logical/digital (VDD). 10ohm no longer needed, but you have to take care that Vref don't exceed VDD, or you won't have full scale definition. If you expect voltage drop at VDD, set Vref regulator to be little below worst VDD drop case (all LED on). Best Zam
  21. Hey Chris What is the amount of your voltage drop? one LED on, all LED on, at PSU terminal, PCB power input, somewhere far from PSU, opposite end of 5v trace How is the jitter threshold now, 8bit 9bit 10bit ? Also current "call" from LED can momentary "move" your GND What you have to measure is voltage change between two GND point -AIN 0V pin across common PSU GND -AIN 0V pin across fader 0V pin Also your 5V rail -AIN Vref across fader Vref More generally, try to look how the same trace/signal move within different place, especially long trace. It should give you a clue where instability is. Is the 5V dropping, is the 0V momentary loading a little, etc... Another test because, it could be low cost fader limitation, use two 5k series resistor (or any sum around 10k) in place of fader, "wiper" (at two resistance junction) is now hardly fixed, half Vref voltage (if 2x5k), and check if consistency at this AIN pin is better or not If you really need to keep only one PSU, maybe go for a 9 or 12v, and use different onboard regulation for each section, analog and digital, Like LM317 (should run 5V with 9V input) or LM317L for AIN Vref (low current here) I was tempted to tell you to just add a 317L from 5V to AIN Vref, but you have to check minimum voltage and minimum IO differential at data sheet, If you end over 3V but super stable it can make the trick... it depend of the noise around Hope it help Best Zam
  22. Hey Novski That's what I understand too. Do we still see you around ? you just shift interest to go further with your controller design or you shift whole interest ? I'm short at the moment but if I can in the few next week/month I pay you back to have my PCB returned, as 8 or 16 RSAOK fader with coreless motor Best Zam
  23. Hey Long time I don't look at this, but I'm somehow forced to make the moving fader system natively compatible with protool (HUI only...) I ended today with modification at mbng_event.c alowing NRPN event to handle the dual CC (not in NRPN format) and it work both way, sending end receiving fader data to/from DAW As I'm far from good programmer and C expert here is what I do, input and comment welcome about method I use to achieve this, in case it was completely bad strategy. to send: ///////////////////////////////////////////////////////////////////////////// //! Sends a NRPN event. Skips address bytes if they already have been sent! ///////////////////////////////////////////////////////////////////////////// s32 MBNG_EVENT_SendOptimizedNRPN(mios32_midi_port_t port, mios32_midi_chn_t chn, u16 nrpn_address, u16 nrpn_value, u8 msb_only) { u8 nrpn_address_msb = (nrpn_address >> 7) & 0x7f; u8 nrpn_address_lsb = (nrpn_address >> 0) & 0x7f; u8 nrpn_value_msb = (nrpn_value >> 7) & 0x7f; u8 nrpn_value_lsb = (nrpn_value >> 0) & 0x7f; // create MIDI package mios32_midi_package_t p; p.ALL = 0; p.type = CC; p.event = CC; p.chn = chn; // quick&dirty #if MBNG_EVENT_NRPN_SEND_PORTS_MASK != 0x00f0 # error "Please adapt MBNG_EVENT_SendOptimizedNRPN!" #endif #if MBNG_EVENT_NRPN_SEND_PORTS_OFFSET != 4 # error "Please adapt MBNG_EVENT_SendOptimizedNRPN!" #endif // NRPN special handling for HUI fader data // FADER 1 if( nrpn_address == 0 ) { p.cc_number = 0x00; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x20; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 2 if( nrpn_address == 1 ) { p.cc_number = 0x01; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x21; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 3 if( nrpn_address == 2 ) { p.cc_number = 0x02; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x22; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 4 if( nrpn_address == 3 ) { p.cc_number = 0x03; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x23; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 5 if( nrpn_address == 4 ) { p.cc_number = 0x04; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x24; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 6 if( nrpn_address == 5 ) { p.cc_number = 0x05; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x25; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 7 if( nrpn_address == 6 ) { p.cc_number = 0x06; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x26; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } // FADER 8 if( nrpn_address == 7 ) { p.cc_number = 0x07; // Data MSB p.value = nrpn_value_msb; MIOS32_MIDI_SendPackage(port, p); p.cc_number = 0x27; // Data LSB p.value = nrpn_value_lsb; MIOS32_MIDI_SendPackage(port, p); } return 0; // no error } to receive: // track NRPN event if( port_mask & MBNG_EVENT_NRPN_RECEIVE_PORTS_MASK ) { int port_ix = (port_class | (port & 3)) - MBNG_EVENT_NRPN_RECEIVE_PORTS_OFFSET; if( port_ix >= 0 && port_ix < MBNG_EVENT_NRPN_RECEIVE_PORTS ) { // NRPN special handling for HUI fader data switch( midi_package.cc_number ) { case 0x00: { // Address MSB FADER 1 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 0; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x20: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 0; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x01: { // Address MSB FADER 2 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 1; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x21: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 1; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x02: { // Address MSB FADER 3 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 2; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x22: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 2; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x03: { // Address MSB FADER 4 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 3; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x23: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 3; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x04: { // Address MSB FADER 5 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 4; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x24: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 4; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x05: { // Address MSB FADER 6 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 5; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x25: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 5; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x06: { // Address MSB FADER 7 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 6; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x26: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 6; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; case 0x07: { // Address MSB FADER 8 nrpn_received_value[port_ix][midi_package.chn] &= ~0x3f80; nrpn_received_value[port_ix][midi_package.chn] |= ((midi_package.value << 7) & 0x3f80); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 7; nrpn_msb_only = 1; // for the MsbOnly format #if 0 // MEMO: it's better to update only when LSB has been received if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed midi_learn_nrpn_valid |= 0x04; } #endif } break; case 0x27: { // Address LSB nrpn_received_value[port_ix][midi_package.chn] &= ~0x007f; nrpn_received_value[port_ix][midi_package.chn] |= (midi_package.value & 0x007f); nrpn_value = nrpn_received_value[port_ix][midi_package.chn]; // pass to parser nrpn_address = 7; if( port != midi_learn_nrpn_port || midi_package.chn != (midi_learn_nrpn_chn-1) ) { midi_learn_nrpn_port = port; midi_learn_nrpn_chn = midi_package.chn + 1; midi_learn_nrpn_valid = 0; } else { // only if valid address has been parsed // use same valid flag like Data MSB (complete NRPN is valid with 0x07) midi_learn_nrpn_valid |= 0x04; } } break; } } } Best Zam
×
×
  • Create New...