Old 11-20-2017, 07:25 AM   #121
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

First one isn't a bug. It's, actually, a very handy behaviour.
There is tons of software which minimizes to tray via [x] close button.
fundorin is offline   Reply With Quote
Old 11-20-2017, 08:10 AM   #122
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 10,515
Default

Quote:
Originally Posted by goldenarpharazon View Post
There are a couple of outstanding reliability bugs in OSCII-bot itself too if they could be dealt with as well? Thanks
See
1. https://forum.cockos.com/showthread.php?t=189074 (duplicate of https://forum.cockos.com/showthread.php?t=172325 )
and
2. https://forum.cockos.com/showthread.php?t=172324
Yeah #1 is a feature, and #2 is now fixed in git. Edit: #2 also now fixed in v0.6.

Last edited by Justin; 11-20-2017 at 08:31 AM.
Justin is online now   Reply With Quote
Old 11-20-2017, 08:34 AM   #123
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 10,515
Default

Quote:
Originally Posted by fundorin View Post
Is there a way to run some code on midi port reopen?
In v0.6, just released:
Code:
(tmp = get_device_open_time(dev)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  // ... midisend(dev);
);
Justin is online now   Reply With Quote
Old 11-20-2017, 08:43 AM   #124
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,596
Default

Quote:
Originally Posted by fundorin View Post
First one isn't a bug. It's, actually, a very handy behaviour.
It would be nice if minimizing could be triggered in an unattended system, e.g. via a command line parameter or a line in a script.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-20-2017, 08:53 AM   #125
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

In which section of the script should I put this code?
I want slStartup() function to run on midi port reopen.
When placed in to @init section, code run just once, on start of the oscii-bot, or when "script reload" is pressed.
Am I wrong, thinking that "dev" variable is an alias for device name? Tried leaving it as dev and renaming to my midi device in alias.

Code:
(tmp = get_device_open_time(midi_in)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  slStartup();
  // ... midisend(dev);
);
fundorin is offline   Reply With Quote
Old 11-20-2017, 08:55 AM   #126
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 10,515
Default

Quote:
Originally Posted by fundorin View Post
In which section of the script should I put this code?
I want slStartup() function to run on midi port reopen.
When placed in to @init section, code run just once, on start of the oscii-bot, or when "script reload" is pressed.
Am I wrong, thinking that "dev" variable is an alias for device name? Tried leaving it as dev and renaming to my midi device in alias.

Code:
(tmp = get_device_open_time(midi_in)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  slStartup();
  // ... midisend(dev);
);
@timer preferably
Justin is online now   Reply With Quote
Old 11-20-2017, 10:00 AM   #127
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

-del-
fundorin is offline   Reply With Quote
Old 11-20-2017, 11:42 AM   #128
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 78
Default

Quote:
Originally Posted by mschnell View Post
It would be nice if minimizing could be triggered in an unattended system, e.g. via a command line parameter or a line in a script.

-Michael
Verrei has already given a command line solution to this at
https://forum.cockos.com/showpost.ph...40&postcount=3
One could imagine doing the same with other "windows automation" type tools.
goldenarpharazon is offline   Reply With Quote
Old 11-20-2017, 02:50 PM   #129
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

I'm running nircmd from oscii-bot's folder with "oscii-bot minimized.cmd".
This is what's inside it:
"nircmd.exe exec hide OSCII-bot.exe"
Pretty simple trick.
fundorin is offline   Reply With Quote
Old 11-23-2017, 12:03 PM   #130
zacki
Human being with feelings
 
zacki's Avatar
 
Join Date: Feb 2013
Location: TBB - Germany
Posts: 101
Thumbs up

Quote:
Originally Posted by Justin View Post
Receiving SysEx: @midimsg, msg1/msg2/msg3 will be 0, oscstr will be set to the SysEx data (oscstr will be -1 if it's not a sysex)

Sending SysEx: use midisend_str(device,#sysexdata_as_string);
Thank you sooo much for implementing SysEx into OSCII-bot! I’ve been looking for so long on a way of building a gateway between a Yamaha 01V96 and an OSC-Device. So far my first tests with a script were very pleasing. Just for fun and for learning to better coding. Keep up the good work

__________________
Some of my favourite posts: 1 2 3 --- to be continued...

Last edited by zacki; 11-23-2017 at 12:28 PM. Reason: added gif
zacki is offline   Reply With Quote
Old 12-05-2017, 07:50 AM   #131
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,596
Default

Great !
The "OSC Dialogue" feature works perfectly for me, too.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 12-06-2017, 01:20 AM   #132
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

How can one map ranges in EEL2?

My encoder sends values 1-24, when rotated clockwise and values 64-80 for counter clockwise.
I need the script to convert 1-24 range to 0.1-1 and 64-80 to minus 0.1-1, so that it would be possible to use acceleration of the encoder.

UPD. Solved with a straightforward method: take away 63 from the number in range 64-80, divide the result by 24 and change the sign to minus.
Anyway, r/scrub action doesn't support acceleration, and "Transport: Scrub/jog (MIDI CC relative/absolute only)" action isn't reacting properly, though I'm sending the values right. Does this action support values, other than 1?

UPD2. The following settings solved my issue with r/scrub action sensitivity. Though the jog function is absent, I can now simply divide value by greater numbers to get the needed sensitivity for the jog mode of the encoder.
https://i.imgur.com/XiZ7Uxa.png

UPD3. Aaaand it doesn't work like it should. I don't understand the behavior. It seems like faster rotation of the encoder gives more precise scrubbing/jogging. According to Reaper's log, lower values move cursor faster.
I'm going to read the manual about scrub/jog settings, cause this logic doesn't seem right to me.

UPD4. Seems like this scrub issue is more than three years old - https://forum.cockos.com/showthread.php?t=139051
Another issue from 2012 (post #33) - https://forum.cockos.com/showthread.php?t=98673

Last edited by fundorin; 12-06-2017 at 01:55 PM.
fundorin is offline   Reply With Quote
Old 12-07-2017, 05:49 AM   #133
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 78
Default

Anything to be learnt from Banned's Peavey StudioMix script or its users?

Banned tries a scrub approach in EEL2 code that maybe wasn't functionally what was wanted (perhaps the issues you are finding or similar?) then "avoiding the scrubbing function altogether, using a set of REAPER actions to move the playback cursor"
goldenarpharazon is offline   Reply With Quote
Old 12-07-2017, 05:54 AM   #134
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

Tried to solve acceleration issue with the following workaround:
1. Get value from encoder (1+ clockwise, 65+ counter clockwise, depending on rotation speed).
2. Check the direction and store it, so CCW will give -1 argument to /r/scroll and CW will give positive argument.
3. Divide 64 out of CCW value, so that both directions would give 1+ values.
4. Check if the value is higher that 12, cause, otherwise, the cursor would jump across the project like crazy.
5. Run loop for osc action /r/scroll with positive or negative argument, based on direction of rotation. Do it as many times as the CC "times", but not more than 12 times.
6. Done.

The problem is that it's not working. According to Reaper's log, osc command is sent only once per encoder's click.

Here's the code (pic and text):
https://i.imgur.com/fG7f319.png
http://pastebin.ru/rwGkCCbD

oscii-bot log shows that printing in loop works both when "times" argument is set as an integer or taken from CC value:
https://i.imgur.com/2JsEAqV.png
Is it some kind of oscsend protection that doesn't allow multiple similar osc messages to be generated?

Last edited by fundorin; 12-07-2017 at 06:05 AM.
fundorin is offline   Reply With Quote
Old 12-07-2017, 05:56 AM   #135
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

Quote:
Originally Posted by goldenarpharazon View Post
Anything to be learnt from Banned's Peavey StudioMix script or its users?

Banned tries a scrub approach in EEL2 code that maybe wasn't functionally what was wanted (perhaps the issues you are finding or similar?) then "avoiding the scrubbing function altogether, using a set of REAPER actions to move the playback cursor"
I've seen that he failed with acceleration and that part of the code is commented in the script. See my previous message for a workaround that should work, once I'll figure out, what's wrong with my code.

Last edited by fundorin; 12-07-2017 at 06:14 AM.
fundorin is offline   Reply With Quote
Old 12-08-2017, 02:04 AM   #136
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default Solved

Code:



Video: https://i.imgur.com/POE5uBj.gifv
fundorin is offline   Reply With Quote
Old 12-08-2017, 06:30 AM   #137
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,596
Default

What is the purpose of posting the code and the video ?

Do you want to donate it or do you suggest there are errors ?

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 12-08-2017, 09:26 AM   #138
fundorin
Human being with feelings
 
fundorin's Avatar
 
Join Date: Feb 2014
Location: Russia
Posts: 272
Default

Quote:
Originally Posted by mschnell View Post
Do you want to donate it or do you suggest there are errors ?
What?

I had an issue (see my previous messages), while trying to accelerate jog movement of the cursor via encoder on the console in my script.
I've failed in achieving the goal yesterday, as well as Banned with his MIDIMIX script, but then I found a way to make cursor faster, depending on the encoder's rotation speed. The video shows the result and the code shows how it was done. I thought that it would be nice to share, in case if someone else would want to have similar functionality in their code.
fundorin is offline   Reply With Quote
Old 12-08-2017, 09:56 AM   #139
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,596
Default

Great !
Thanks !
Please pardon my ignorance.
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.