Sign in to follow this  
Followers 0
Tokolos

CodeBlocks MIDIBOX GUI Simulator for Windows (based on ACSim)

15 posts in this topic

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

Share this post


Link to post
Share on other sites

Great work!!! Awesome!

Love the animated demo too.

Makes me wonder if IUP/SDL is a good framework for a cross-platform sim for mios32 ...

Kickass.

One thing though - I notice it's setup for the old toolchain...

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

coolness,

i've been meaning to make such a thing and now i don't have to...

thanks for sharing.

i'll try it out "soon"

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

That was quick!

Share this post


Link to post
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  ;)

Share this post


Link to post
Share on other sites

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

Agreed. Tokolog, you can PM TK to ask for access, or if you like I'll upload it for you.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Audiocommander,

I wrote your spell and it became alive... Your're a magician!

Thank you a lot!

Pablo

Share this post


Link to post
Share on other sites

good to hear :-)

...yay, I finally managed to break the svn spell and commited the change :D

Cheers,

Michael

Share this post


Link to post
Share on other sites

Has anyone succeeded in porting this for XCode?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0