electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks GalleryGallery 
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Question about PC keyboard
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
jig



Joined: Mar 28, 2008
Posts: 3
Location: Nagano

PostPosted: Fri Mar 28, 2008 7:56 pm    Post subject:  Question about PC keyboard
Subject description: on the program examples/event/kb.ck
Reply with quote  Mark this post and the followings unread

Hello. I'm a new comer to ChucK form Japan.
I have a question. Please help me!

I want to use keyboard to control music. And I found the program examples/event/kb.ck.
But I cannot see any character on the window when I press any key.

Please teach me about this!!

===================================
// the event
KBHit kb;

// time-loop
while( true )
{
// wait on kbhit event
kb => now;

// potentially more than 1 key at a time
while( kb.more() )
{
// print key value
<<< "ascii: ", kb.getchar() >>>;
}
}
Back to top
View user's profile Send private message
Inventor



Joined: Oct 13, 2007
Posts: 1700
Location: Florida, USA
Audio files: 67

PostPosted: Fri Mar 28, 2008 8:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Are you using the miniAudicle? I couldn't get kb.ck to work on the mini audicle. Try the keyboard examples under the HID section of the examples which are here:

http://chuck.cs.princeton.edu/doc/examples/

Welcome aboard and hope you have fun ChucKing.

_________________
For those about to ChucK, we salute you! - Ge Wang
Let's make noise for peace! - kijjaz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jig



Joined: Mar 28, 2008
Posts: 3
Location: Nagano

PostPosted: Fri Mar 28, 2008 9:12 pm    Post subject:   Reply with quote  Mark this post and the followings unread

Thank you for your nice reply.

I could run kb.ck on the command environment!!
So we cannot run the program on miniAudicle? (But I can run hid/kb.ck on miniAudicle.) Where does the manual(document pdf) say about it?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 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
Music123.com - Customer Appreciation Sale Extended! - Save Up To $80 Off Your Order - Sale Ends Soon!

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003, 2004, 2005, 2006 and 2007 by electro-music.com