electro-music.org   Dedicated to experimental electro-acoustic
and electronic music
 
 Front Page  |  Radio  |  Forum  |  Media  |  Playlists  |  Wiki
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 
Coming up on Radio 1 at
Twyndyllyngs live on Chez Mosc
 
 Forum index » DIY Hardware and Software » ChucK programming language
Chuck and Arduino?
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
WeHaveTheTechnology



Joined: Sep 22, 2008
Posts: 4
Location: Bogotá

PostPosted: Mon Sep 22, 2008 4:04 pm    Post subject: Chuck and Arduino?
Subject description: Innitiatives in connecting the physical world and Chuck
Reply with quote  Mark this post and the followings unread

Hallo!

My first unsuccessful experiments in connecting the Arduino board with Chuck consisted in making the microcontroller to send some MIDI messages through the USB port, but when trying the Chuck --probe command to list all the devices attached it doesn't seem to recognize the board at all.

Any other initiatives to build on?

Any suggestions?

Critics?

Tomatoes?

Thanks.

Last edited by WeHaveTheTechnology on Mon Sep 22, 2008 5:46 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
blue hell
Former site admin


Joined: Apr 03, 2004
Posts: 24864
Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320

PostPosted: Mon Sep 22, 2008 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm not into any details re. this, so this could be un-smart easily ... but usually one sends MIDI through a MIDI port and not through an USB port, could that be the issue?

welcome anyway, no tomatoes (sorry, I ate 'm all) Laughing
Back to top
View user's profile Send private message Visit poster's website
WeHaveTheTechnology



Joined: Sep 22, 2008
Posts: 4
Location: Bogotá

PostPosted: Mon Sep 22, 2008 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi Blue Hell and thanks for the quick reply.

I think you're right, but i thought that maybe if i were using the MIDI baud rate even though I was sending the message through the USB port it was going to be enough to trick the machine so it would have said hey, this is a MIDI message! but not.

I was lucky you ate all the tomatoes.
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Sep 22, 2008 7:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

:¬)

I fear you at least need to tell the computer "hi, I'm a MIDI device". ChucK makes things simple but not quite *that* simple. For MIDI devices we depend on the OS so if you can convince the OS your Arduino is a MIDI box you're in business but I think they instead pretend to be a parallel port.

Alternately if you can send those messages anyway, why not send them over a simple wire to a "real" MIDI port? I seem to remember there was a simple implementation online that didn't conform 100% to the spec but is supposed to work

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radarsat1



Joined: Mar 14, 2008
Posts: 85
Location: Montreal

PostPosted: Tue Sep 23, 2008 5:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Doesn't the Arduino show up as a serial port?
I think there's no serial I/O in Chuck, is there?
It might be best to write a little C/Java/Python program that runs on the host, reading serial bytes and converting them to OSC messages.

http://pyserial.wiki.sourceforge.net/pySerial
http://rxtx.qbang.org/wiki/forums.html/Writing_%22Hello_World%22_to_a_USB_to_serial_converter
Back to top
View user's profile Send private message
WeHaveTheTechnology



Joined: Sep 22, 2008
Posts: 4
Location: Bogotá

PostPosted: Tue Sep 23, 2008 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi everyone and thanks very much for the advice

radarsat1,
i have downloaded the Python script and i'm starting to figure out the rest. For the moment i've been able to send messages back and forth to the arduino board and save incoming ones in variables, it seems quiet exciting so far, but no Chucking connection yet. As I'm not too familiar with Python it might take me a while, but I think it's pointing in the right direction.

Could the connection to Chuck be implemented using a socket? Shocked
Any ideas on this?

Last edited by WeHaveTheTechnology on Wed Sep 24, 2008 4:07 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Sep 23, 2008 8:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

radarsat1 wrote:
Doesn't the Arduino show up as a serial port?


Yes, you are right.

Quote:

I think there's no serial I/O in Chuck, is there?


No, though that would be nice. I think Spencer was looking for a Free/Open cross-platform serial library. Would be good for this and for running leds on my joystick sequencer.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radarsat1



Joined: Mar 14, 2008
Posts: 85
Location: Montreal

PostPosted: Wed Sep 24, 2008 7:39 am    Post subject: Reply with quote  Mark this post and the followings unread

WeHaveTheTechnology wrote:

Could the connection to Chuck be implemented using a socket? Shocked
Any ideas on this?


Take a look at SimpleOSC, http://www.ixi-software.net/content/body_backyard_osc.html

Hm, maybe it would be a great idea to include a Python<->Chuck example in the ChucK distribution.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Sep 24, 2008 10:17 am    Post subject: Reply with quote  Mark this post and the followings unread

That's not a bad idea; Python&ChucK seems a relatively popular combination. Processing<->ChucK would be good as well.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
WeHaveTheTechnology



Joined: Sep 22, 2008
Posts: 4
Location: Bogotá

PostPosted: Wed Sep 24, 2008 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
That's not a bad idea; Python&ChucK seems a relatively popular combination. Processing<->ChucK would be good as well.


and also an implementation for the Firmata protocol would be great

but meanwhile...

i'll take a look at the simpleOSC script, thanks radarsat1 BTW
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
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
Log in
Username:     Password:      Log me on automatically each visit    


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2026 by electro-music.org