We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › How to use proMIDI and controlP5 in same sketch
Page Index Toggle Pages: 1
How to use proMIDI and controlP5 in same sketch? (Read 654 times)
How to use proMIDI and controlP5 in same sketch?
Aug 11th, 2008, 1:32pm
 
While trying to use proMIDI and controlP5 in my sketch i get the following error:

Type "Controller" is imported on demand from package "promidi" and package "controlP5".

I tried using:

myMidiController = new promidi.Controller(c, v);

but i still get the error. who knows ho to work around?
Re: How to use proMIDI and controlP5 in same sketc
Reply #1 - Aug 11th, 2008, 3:47pm
 
The problem is that you also need to change the imports so instead of import promidi.*; you have to import only the needed classes except Controller.

import promidi.MidiIO;
import promidi.Note;
...


For the next release of promidi I changed the class names to avoid such conflicts.
Re: How to use proMIDI and controlP5 in same sketc
Reply #2 - Aug 11th, 2008, 3:55pm
 
thanks for your reply. but damn: i need to send controller values...
i guess it wouldn't be trivial to change (rename classes) in either controlP5 or proMIDI myself?
Re: How to use proMIDI and controlP5 in same sketc
Reply #3 - Aug 11th, 2008, 4:31pm
 
You can use both, you just have to use the full name for both types of Controller for all instances, e.g.

promidi.Controller myMidiController = new promidi.Controller(c, v);

etc.. so you have to use the full name when defining the variables, as well as when creating objects.
Re: How to use proMIDI and controlP5 in same sketc
Reply #4 - Aug 11th, 2008, 9:57pm
 
Thanks a bunch JohnG!
Page Index Toggle Pages: 1