electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Instruments and Equipment » Chameleon
programming the Chameleon help me on the way
Post new topic   Reply to topic
Page 2 of 2 [30 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
arpeggio



Joined: Jan 05, 2010
Posts: 24
Location: the Netherlands

PostPosted: Tue Oct 20, 2015 5:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Hello, got the code to proces without the errors i mentioned,
it got to do with the PLACE where i putted the MidiSetRcvAlarm
Thanks, Dian
Back to top
View user's profile Send private message
arpeggio



Joined: Jan 05, 2010
Posts: 24
Location: the Netherlands

PostPosted: Fri Oct 23, 2015 3:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Hello, the initialize_midi is a function to start/use midi in the code.
So it is used in the main loop, so it is initialized every time to loop loops.
In Arduino code there is a setup where one does that, initialise things is it nesesary to initialise the midi handdle thing every once the loop occurs or can it be don once here in the Chameleon software
Thanks, Dian
Back to top
View user's profile Send private message
DrJustice



Joined: Sep 13, 2004
Posts: 2114
Location: Morokulien
Audio files: 4

PostPosted: Fri Oct 23, 2015 7:07 am    Post subject: Reply with quote  Mark this post and the followings unread

The initialize_midi() function should be called only once when the program starts. I.e. calling it from rtems_main() is the typical thing to do. It should not be called repeatedly from a loop.
Back to top
View user's profile Send private message Visit poster's website
arpeggio



Joined: Jan 05, 2010
Posts: 24
Location: the Netherlands

PostPosted: Sat Oct 24, 2015 4:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Hello, for my own clarity of coding things, is the rtems_main called once, or does it run further on (while) loops, for the panel and dsp tasks,
Couse you put the initialize inside the rtems_main loop, i asume this is a loop,
isn't it.

When you get a grasp of every programming detail, and understand i fully,
then you can program everything.

Thanks again, Dian
Back to top
View user's profile Send private message
DrJustice



Joined: Sep 13, 2004
Posts: 2114
Location: Morokulien
Audio files: 4

PostPosted: Sat Oct 24, 2015 12:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, rtems_main() is called automatically one single time when the program starts. It's the entry point to your program. In plain C/C++ the entry point is just called main(). Since the RTEMS operating system in the Chameleon is in charge of things, it does a few internal things at startup, then it calls rtems_main() to start your program.

In this program, rtems_main() starts the DSP, initializes MidiShare and then it starts the two task we're using. Finally it deletes the initial thread that it (rtems_main()) runs in, since this is no longer needed. The two threads we created (the panel task and the level meter task) continue to run. As you know, those two threads runs concurrently, and this is where we have the loops that drive things along.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic
Page 2 of 2 [30 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Instruments and Equipment » Chameleon
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use