Jump to content

Recommended Posts

Posted

It would help me to complete the Memorised setup if I could manipulate the pin and pin_value variables.

The pin (Din) values are stored and one way to complete the design would be to effectively alter the Din values in a simulated momentary action manner.

ie from a 1, momentarily to a 0, the back to a 1. I suppose to realistically simulate my PB's a few 10's of mS of "press" would be correct but I think much smaller values would do.

Thanks in advance.

Robin

Posted

Hi Robin,

have you already considered to call the DIN_NotifyToggle(pin, pin_value) function, like MIOS would do when a button is pressed?

Best Regards, Thorsten.

Posted

Hi Thorsten

Thanks for the tip.

I have incorporated the line in my case statement 2 the following.

case (2) ://Read EEprom dependent on Memory pin selected. Set Memory Led in Radio Button Mode. For each stored group change to EEprom value. //Trigger SetLed_No Dump or SetLed_SendDump as appropriate. Read section of EEprom dependent on Memory Buttom pressed.

{

r =(pin-1<< 5) + 10;// determines the memory location which is dependent on Memory pin.

DIN_NotifyToggle((MIOS_EEPROM_Read ®), 0);//1st location, pedal group

DIN_NotifyToggle((MIOS_EEPROM_Read ®), 1); //this was a trial to see if it was necessary to release pin ... made no difference

DIN_NotifyToggle((MIOS_EEPROM_Read (r+1)), 0);//2nd location causes system resets in Midi_ox.

SendNote(0xB0, 0x02,MIOS_EEPROM_Read(r+1));//test

//SendNote(0xB0, 0x03,0x24); test

//////following is the code to set Memory group Led's when Record button not pressed.

//stored_pin = memory_group_stored_pin;// change value of stored pin to the memory group stored value

//stored_pin = SetLed_NoDump(1, 5, 9, stored_pin, pin, pin_value); //function, set pin_low to 0, pin_high to 5, canc_pin to 9

//memory_group_stored_pin = stored_pin;//resets the variable for this group to the current stored pin after the function above.

        }

break;

On it's own the first Din_Toggle works to a large extent.  However this is only the pedal group and I need to send a total of 12 similar Din_Toggles.  When the second Din_Toggle is added the system generates repeated System resets.

I am conscious that the sending of sysex messages is quite long (in my case) and that there needs to be more control.  In other words I do not know what I'm doing!

Please give me another pointer.

Regards Robin

Since sending this query I wonder whether there is a basic problem in calling a function from within the same function.  This is what I am attempting.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...