electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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 
Live streaming at radio.electro-music.com

  host / artist show at your time
  EdisonRex Edison's Electronic Review
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
MIDI device names (feature request)
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
JJupiter



Joined: Jul 25, 2004
Posts: 4
Location: Groningen, The Netherlands

PostPosted: Mon Feb 12, 2007 7:07 am    Post subject: MIDI device names (feature request) Reply with quote  Mark this post and the followings unread

Hi,

I'm using Chuck on MacOSX, and love it!
But, because the sheer goodnes how Mac OS X handles virtual devices, I have a constant changing set of MIDI devices (depending if I have certain software running or not).

The problem that this causes, is that midi device numbers change all the time, chuck --probe gives a new list and numbering.

This means that any chuck I write (mainly concerning OSC and MIDI) is in constant flux how my devices are to be called upon.

Would it not be nice to facilitate some sort of get MIDI device number by name kind of functionallity. This would resolve the issue as the names of my MIDI devices don't change, only theyr numbering.

Please?

Thanks,
JJupiter
Back to top
View user's profile Send private message
JJupiter



Joined: Jul 25, 2004
Posts: 4
Location: Groningen, The Netherlands

PostPosted: Mon Feb 12, 2007 7:36 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm a fool, that is, I solved my own question.

All that is necessary is there in Chuck ...

Code:
MidiOut mout;
MidiIn midin;

for(0 => int i; true ; i++){
   if (!midin.open(i)) me.exit();
   if (midin.name() == "Intern in") break;
}

for(0 => int i; true ; i++){
   if (!mout.open(i)) me.exit();
   if (mout.name() == "Intern out") break;
}


Great language Chuck, me fool, should ... read ... manuals ... more ... carefully ...

J*
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: Mon Feb 12, 2007 5:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Clever! I like this, I don't think I saw the device name used for anything more advanced the printing for visual feedback before.
_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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
AmbiphonicDSP

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 through 2009 by electro-music.com - Conditions Of Use