Zam Posted January 17, 2016 Report Share Posted January 17, 2016 Hi Just an idea, not a real need (but it can be fun, and i will use it for sure) something like a led_mode=blink for .NGC with associate parameter blink:on:100:off:300 for time in ms for each led state? or defined time with 2 value map or just 3 "blink" predefined mod, blink_slow, blink_mid, blink_fast Anyway, the idea is to have a blinking led function when led is on, because a NGR script (set led and delay) is stopped a soon as another section is called Best Zam Quote Link to comment Share on other sites More sharing options...
Zam Posted March 15, 2016 Author Report Share Posted March 15, 2016 Hi, I come back with this. Nobody interested? Or I miss some NG strategy already available to perform this? I'm just thinking out loud, but maybe it's possible to use the dimmed= with very slow PWM setting, if the frequency is not locked by the sr clock ? Best Zam Quote Link to comment Share on other sites More sharing options...
tago Posted March 18, 2017 Report Share Posted March 18, 2017 Hi @Zam I'm intrested in something like that too. I'd like to indicate the speed of a lfo or arp/seq via smooth pulsating (fade in/out). Hard blinking would be useful for other things. Quote Link to comment Share on other sites More sharing options...
Zam Posted April 5, 2018 Author Report Share Posted April 5, 2018 Hi I'm still interested for such blink led function If anyone have an idea ? Best Zam Quote Link to comment Share on other sites More sharing options...
gerald.wert Posted April 5, 2018 Report Share Posted April 5, 2018 The leds do that on the matrix in the midi box sid. Maybe you could look in the code there for inspiration. Also there is the beat led on the midi box sequencer to look at as example. Quote Link to comment Share on other sites More sharing options...
Zam Posted April 5, 2018 Author Report Share Posted April 5, 2018 Hi Gerald Tks for info, I'm not aware of that, I only use NG with my custom controller/fader I'll look at it ! Best Zam Quote Link to comment Share on other sites More sharing options...
gerald.wert Posted April 6, 2018 Report Share Posted April 6, 2018 My programming is very beginner level or I would help out more. Good luck with it! Quote Link to comment Share on other sites More sharing options...
FantomXR Posted April 7, 2018 Report Share Posted April 7, 2018 (edited) I created some metas by myself already. So aren't you able to create a meta, that switches an LED (which is part of the meta-event) on and off with a delay of x-ms? I don't see why this shouldn't work... but I never tried it by myself... you could even add the delay to the meta-message. It's very easy to set up. You just have to edit the mios32_event.c and .h. You can use an already existing meta as example. Edited April 7, 2018 by FantomXR Quote Link to comment Share on other sites More sharing options...
Zam Posted April 7, 2018 Author Report Share Posted April 7, 2018 My C skill is not that good, but that's a good idea, I'll give a try asap Best Zam Quote Link to comment Share on other sites More sharing options...
FantomXR Posted April 7, 2018 Report Share Posted April 7, 2018 I can do some tests today evening... I'll let you know! Quote Link to comment Share on other sites More sharing options...
Zam Posted April 7, 2018 Author Report Share Posted April 7, 2018 Can't say no :) Best Zam Quote Link to comment Share on other sites More sharing options...
Zam Posted April 7, 2018 Author Report Share Posted April 7, 2018 side note I just have a look, Also at mbng_dout.c , maybe another route is to have a non static value for DIM function or to add a condition at LED set for a specific value ? I'm thinking out loud... Best Zam Quote Link to comment Share on other sites More sharing options...
FantomXR Posted April 7, 2018 Report Share Posted April 7, 2018 I tried it and I had no success. The first problem I ran into was, that the MIOS32_DELAY_Wait_uS only allows values up to 65535us.... not much. I will do some more tests. Quote Link to comment Share on other sites More sharing options...
Zam Posted April 7, 2018 Author Report Share Posted April 7, 2018 For sure 65ms period for blinking led is fast... I'll see what I can try too Maybe TK will chime in and give us some clue Best Zam Quote Link to comment Share on other sites More sharing options...
Zam Posted April 8, 2018 Author Report Share Posted April 8, 2018 Hi At mios32_timestamp.c does this can be used ? ///////////////////////////////////////////////////////////////////////////// //! Use this function to get the delay which has passed between a given and //! and current timestamp. //! //! Usage Example: //! \code //! u32 captured_timestamp = MIOS32_TIMESTAMP_GetDelay(); //! // ... //! // ... do something ... //! // ... //! u32 delay_in_ms = MIOS32_TIMESTAMP_GetDelay(captured_timestamp); //! MIOS32_MIDI_SendDebugMessage("Delay: %d mS\n", delay_in_ms); //! \endcode //! \return the delay between the given and the current timestamp ///////////////////////////////////////////////////////////////////////////// s32 MIOS32_TIMESTAMP_GetDelay(u32 captured_timestamp) { // will automatically roll over: // e.g. 0x00000010 - 0xfffffff0 = 0x00000020 return timestamp - captured_timestamp; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.