mirror of
				https://github.com/onyx-and-iris/vmrcli.git
				synced 2025-11-04 07:01:47 +00:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "477267e278f8207d895edde400d525074fc5cc0f" and "61d81b0abf796abc1b0ec4d9eefa232f7e34f771" have entirely different histories.
		
	
	
		
			477267e278
			...
			61d81b0abf
		
	
		
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							@ -13,7 +13,7 @@
 | 
			
		||||
## `Use`
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
.\vmrcli.exe [-h] [-i] [-k] [-D] [-v] [-c] [-m] [-s] <api commands>
 | 
			
		||||
./vmrcli.exe [-h] [-i] [-k] [-D] [-v] [-c] [-m] [-s] <api commands>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Where:
 | 
			
		||||
@ -38,13 +38,13 @@ Examples:
 | 
			
		||||
Launch basic GUI, set log level to INFO, Toggle Strip 0 Mute, print its new value, then decrease Bus 0 Gain by 3.8
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
.\vmrcli.exe -kbasic -D2 !strip[0].mute strip[0].mute bus[0].gain-=3.8
 | 
			
		||||
./vmrcli.exe -kbasic -D2 !strip[0].mute strip[0].mute bus[0].gain-=3.8
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Launch banana GUI, set log level to DEBUG, set Strip 0 label to podmic then print Strip 2 label
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
.\vmrcli.exe -kbanana -D1 strip[0].label=podmic strip[2].label
 | 
			
		||||
./vmrcli.exe -kbanana -D1 strip[0].label=podmic strip[2].label
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## `Interactive Mode`
 | 
			
		||||
@ -52,7 +52,7 @@ Launch banana GUI, set log level to DEBUG, set Strip 0 label to podmic then prin
 | 
			
		||||
Running the following command in Powershell:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
.\vmrcli.exe -i
 | 
			
		||||
./vmrcli.exe -i
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Will open an interactive prompt:
 | 
			
		||||
@ -69,13 +69,7 @@ API commands follow the same rules as listed above. Entering `Q` or `q` will exi
 | 
			
		||||
Scripts can be loaded from text files, for example in Powershell:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
.\vmrcli.exe -D1 $(Get-Content .\example_commands.txt)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You may also pipe a scripts contents to the CLI:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
$(Get-Content .\example_commands.txt) | .\vmrcli.exe -D1 -i
 | 
			
		||||
./vmrcli.exe -D1 $(Get-Content .\example_commands.txt)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Multiple API commands can be in a single line but they should be space separated.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								src/vmrcli.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/vmrcli.c
									
									
									
									
									
								
							@ -15,7 +15,6 @@
 | 
			
		||||
#include <getopt.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include "ivmr.h"
 | 
			
		||||
#include "wrapper.h"
 | 
			
		||||
#include "log.h"
 | 
			
		||||
@ -147,8 +146,6 @@ int main(int argc, char *argv[])
 | 
			
		||||
    {
 | 
			
		||||
        log_info("Profile %s loaded", cvalue);
 | 
			
		||||
        set_parameter_string(vmr, "command.load", cvalue);
 | 
			
		||||
        Sleep(300);
 | 
			
		||||
        clear_dirty(vmr);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (iflag)
 | 
			
		||||
@ -246,12 +243,13 @@ void interactive(PT_VMR vmr)
 | 
			
		||||
    while (fgets(input, MAX_LINE, stdin) != NULL)
 | 
			
		||||
    {
 | 
			
		||||
        input[strcspn(input, "\n")] = 0;
 | 
			
		||||
        if ((len = strlen(input)) == 1 && toupper(input[0]) == 'Q')
 | 
			
		||||
        len = strlen(input);
 | 
			
		||||
        if (len == 1 && toupper(input[0]) == 'Q')
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        parse_input(vmr, input, len);
 | 
			
		||||
 | 
			
		||||
        memset(input, 0, MAX_LINE); /* reset input buffer */
 | 
			
		||||
        memset(input, '\0', MAX_LINE); /* reset input buffer */
 | 
			
		||||
        printf(">> ");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -330,8 +328,7 @@ void parse_command(PT_VMR vmr, char *command)
 | 
			
		||||
            printf("%s: %.1f\n", command, res.val.f);
 | 
			
		||||
            break;
 | 
			
		||||
        case STRING_T:
 | 
			
		||||
            if (res.val.s[0] != '\0')
 | 
			
		||||
                printf("%s: %ls\n", command, res.val.s);
 | 
			
		||||
            printf("%s: %ls\n", command, res.val.s);
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user