User Tools

Site Tools


acsim_console_c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
acsim_console_c [2006/08/01 20:36]
audiocommander created v.0.0.5
acsim_console_c [2007/11/17 16:46] (current)
smashtv Corrected zip file text
Line 3: Line 3:
 [[acsim_console_h|ACSim_console.h]]\\ [[acsim_console_h|ACSim_console.h]]\\
 **[[acsim_console_c|ACSim_console.c]]**\\ **[[acsim_console_c|ACSim_console.c]]**\\
- 
-[[acsim_toolbox_c|ACSim_toolbox.c]]\\ 
  
 [[acsim_mios_h|ACSim_mios.h]]\\ [[acsim_mios_h|ACSim_mios.h]]\\
 [[acsim_mios_c|ACSim_mios.c]]\\ [[acsim_mios_c|ACSim_mios.c]]\\
  
 +[[acsim_toolbox_h|ACSim_toolbox.h]]\\
 +[[acsim_toolbox_c|ACSim_toolbox.c]]\\
 +[[acmididefines|ACMidiDefines.h]]\\
 +\\
 +This code is for viewing only and may not be up to date. You can download the files in a zip file {{acsim:​acsim.zip}}. If you make any updates, please send them to stryd_one and he will update the zip for you.
 +\\
 \\ \\
 <code c> <code c>
 /* /*
  ​* ​ ACSim_console.c  ​* ​ ACSim_console.c
- ​* ​ v 0.0.5+ ​* ​ v 0.0.7
  *  *
  ​* ​ see header for version info and details  ​* ​ see header for version info and details
Line 23: Line 27:
 #import <​stdio.h>​ #import <​stdio.h>​
  
- 
-// OS selection ​            <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<​ SELECT YOUR OS HERE !!!! 
-// You must choose one of the below options to set the correct Operating System for the application 
-#define _DEBUG_OS_WIN 
-//#define _DEBUG_OS_MAC 
  
 #ifdef _DEBUG_OS_MAC #ifdef _DEBUG_OS_MAC
Line 39: Line 38:
 // normally there should be no need to change the content of these files: // normally there should be no need to change the content of these files:
 #import "​ACSim_mios.h"​ #import "​ACSim_mios.h"​
-//#import "​ACSim_mios.c"​+
 // toolbox, handy functions like random number generation, hex-output... // toolbox, handy functions like random number generation, hex-output...
-#import "​ACSim_toolbox.c"+#import "​ACSim_toolbox.h"
  
  
Line 64: Line 63:
  unsigned int value = 0;  unsigned int value = 0;
  unsigned int value2 = 0;  unsigned int value2 = 0;
 + // poll Timer()
 + if(debug_user_timer.TIMER_ENABLED) {
 + Timer();
 + }
 + // poll Tick()
 + Tick();
  // poll LCD_Display  // poll LCD_Display
  DISPLAY_Tick();​  DISPLAY_Tick();​
  // debug info  // debug info
  printf("​\n\nMIOS.ACSim(%i) >> ", loopcount);  printf("​\n\nMIOS.ACSim(%i) >> ", loopcount);
- // poll timer 
- Timer(); 
  // read input  // read input
  fgets(str, 32, stdin); // MAX chars = 32; this is NOT protected against buffer overflows!!!  fgets(str, 32, stdin); // MAX chars = 32; this is NOT protected against buffer overflows!!!
Line 105: Line 108:
  AIN_NotifyChange(pin,​ value);  AIN_NotifyChange(pin,​ value);
  }  }
 + break;
 +
 + case '​b':​ // System Realtime BYTE
 + debug_MIDI_byteNum = 0; // sending single byte, maybe without MIDI_START/​_STOP
 + sscanf(str,​ "​b%i",​ &pin);
 + MPROC_NotifyReceivedByte(pin);​
 + debug_MIDI_byteNum = 0;
  break;  break;
   
Line 111: Line 121:
  // invert value for easier rememberance  // invert value for easier rememberance
  value = value ^ 0x1;  value = value ^ 0x1;
 + debug_din_value[pin] = value;
  DIN_NotifyToggle(pin,​ value);  DIN_NotifyToggle(pin,​ value);
  break;  break;
Line 154: Line 165:
  sscanf(str,​ "​m%i,​%i,​%i",​ &pin, &value, &​value2);​  sscanf(str,​ "​m%i,​%i,​%i",​ &pin, &value, &​value2);​
  MPROC_NotifyReceivedEvnt(pin,​value,​value2);​  MPROC_NotifyReceivedEvnt(pin,​value,​value2);​
 + break;
 +
 + case '​n':​ // send note_on (n noteValue, volume, {channel})
 + sscanf(str,​ "​n%i,​%i,​%i",​ &pin, &value, &​value2);​
 + if((value2 < 1) || (value2 > 16)) { value2 = 1; }
 + MPROC_NotifyReceivedEvnt((143+value2),​pin,​value);​
  break;  break;
   
Line 194: Line 211:
  printf("​(e{opt.})(++)(-) (j)umper(pin) \n");  printf("​(e{opt.})(++)(-) (j)umper(pin) \n");
  printf("​(m)idi(msg),​(argA),​(argB) \n");  printf("​(m)idi(msg),​(argA),​(argB) \n");
 + printf("​(n)ote_on(value),​(velocity),​{channel} \n");
  printf("​(SPACE)OK e(x)it + [ENTER] \n\n"​);​  printf("​(SPACE)OK e(x)it + [ENTER] \n\n"​);​
   
Line 200: Line 218:
   
  // init MIOS  // init MIOS
 + MIOS_BOX_STAT.BS_AVAILABLE = 1;
  Init();  Init();
  DISPLAY_Init();​  DISPLAY_Init();​
- Timer(); +
- +
  printf("​\n"​);​  printf("​\n"​);​
   
acsim_console_c.1154464609.txt.gz · Last modified: 2006/10/15 09:35 (external edit)