Jump to content

CodeBlocks MIDIBOX GUI Simulator for Windows (based on ACSim)


Tokolos

Recommended Posts

I would like to give back to the community a tool I developed based on ACSim that allows me to visually simulate my custom Midibox(s). I call it GUISim.

GUISim Brief Description:

GUISim graphically simulates a MIDIBox with core, input controls and visual outputs. It uses SDL and UIP to create the midibox module simulations. I have used the great work audiocommander has done with ACSim and want to give him credit here for allowing use of his work for modification or functionality expanding.This proof of concept version is fully functional for my own prototyping and I am continually adding to it as I need to simulate additional modules.:

Simulated MIDIboxOutput Modules

Link to comment
Share on other sites

Thanks for the compliment stryd_one.

Yes, I have used the original toolchain I downloaded and need to update to the latest. (Do not want to loose out on any enhancements or bug fixes  ;) ).

I am in process of switching all my pc's over to Ubuntu Linux (love it) and will convert this tool also to Linux as a result.

Having looked at various platforms I have decided on SDL and IUP (notice I spelled it correct this time..) as they both do support several platforms.

Why SDL for graphical output handling?

Most other graphic options I looked at either used OpenGL (which I believe is a overkill for what I wanted to do, or are based on DirectX which would forever tie into Windows and is also an overkill). So SDL it was.

SDL is that it provides only the very basic graphical support and you need to add what you need to it based on your functional requirement. I just had to add the freetype library to handle fonts. So that was very simple and a good logical choice for me.

Why IUP for Input handling

Similar to the graphics requirement I needed a simple and easy to use platform to handle dialogs that are cross-platform supported. Although possible to do with SDL (with a LOT of work), it would not have justified the effort.

I chose IUP because it can be easily programmed in C, but as an added benefit it allows you to define what your layout should look like outside of the C program in a configuration file (look at the the file InputSurface.led in the template for example). This has the benefit to play around and proto-type your layout without having to re-compile the program everytime. Once you are satisfied you can choose to compile the .led file into regular C code and include into yout program, or you can just distribute the .led file as part of the template (as I have done).

In summary: SDL supports Linux, Windows , Mac and others where IUP supports GTK+, Motif and Microsoft Windows, so that will be all goodness for us Midiboxers that want to standardize on Linux , while still being able to support the other platforms also (Midiboxers, is that what we are called?).

Regards

Link to comment
Share on other sites

Wow, bugfight even crawled out of his lab to reply, you must have impressed! :D

Great to hear there's a linux port on the way. I think it's safe to say that the majority of development these days is happening on OSX and Linux. Several devs are bailing out on windows at the moment ;) Thanks for sharing, it sounds like you had suitable objectives in mind when you selected the GUI libs.

And yes, we be midiboxers :)

Link to comment
Share on other sites

Hi Tokolos!

that's great work! :D

...and exactly what I hoped for would happen -

And we should definitely give this project a folder on the midibox svn server...

Thanks for sharing!

Best,

Michael

Edit:

whoops, the new toolchain fix was really fast...

btw: a temporary job/project of mine will hopefully end after this winter term (march/april 09). I'll surely add a Mac-OS / Cocoa GUI module to this one  ;)

Link to comment
Share on other sites

  • 6 months later...

Hi!

I'm having trouble using MClock_Timer(); in GUISim.

Something as simple as:

void Timer(void) __wparam

{

      ++counter; 

}

doesn't work in guisim, but it does in the midibox..

Is there something I have to set especially for timer to work on guisim?

Thanx a lot

Pablo

Link to comment
Share on other sites

Hi,

I haven't used GUISim, but as far as I can see the timer routine isn't implemented in the main runloop, though it's already in the underlying code.

This should fix it:

Open GUISIM_windows.c and add the following code to the function [tt]void LCD_SDL_RUN(void)[/tt], near the end inside the [tt]while(!LCD_SDL_stop_program)[/tt] loop:

	// poll Timer()
	if(debug_user_timer.TIMER_ENABLED) {
		Timer();
	}

I'd put it after the Tick(); and before DISPLAY_Tick();

This should hopefully do the trick ;-)

Hope that helps,

best,

Michael

Link to comment
Share on other sites

  • 3 months later...

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...