PlanetZ@scopeusers.com

Scope Users Community
It is currently Thu Nov 23, 2017 1:02 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Combox: how can I fill the list programmatically
PostPosted: Sat Oct 29, 2016 4:12 pm 
Offline

Joined: Sun Nov 08, 2015 4:28 pm
Posts: 244
I'm designing an external MIDI-In module and I want to be able to select any available MIDI-Ins from the ComboBox. In order to do that, I need to fill the ComboBox with available MIDI-In devices. Anyone knows, how to accomplish that?


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Sun Oct 30, 2016 11:08 pm 
Offline

Joined: Sun Nov 08, 2015 4:28 pm
Posts: 244
I'm giving up, because the interface from pep to scopefx is here not campatible.


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Mon Oct 31, 2016 1:42 am 
Offline

Joined: Wed Nov 07, 2001 4:00 pm
Posts: 413
Location: London, U.K.
When I was mulling something similar before, my plan was to build the UI outside of Scope (using Juce) and then just launching it from within Scope (similar to how ScopeSync works)


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Mon Oct 31, 2016 3:29 am 
Offline

Joined: Sun Nov 08, 2015 4:28 pm
Posts: 244
Attachment:
ext midi.png
ext midi.png [ 10.92 KiB | Viewed 712 times ]

That was my first approach, but it can't be used as surface. I found a way to work around this. If you want to know, just send me the usual email.


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Mon Oct 31, 2016 8:26 am 
Offline
User avatar

Joined: Mon Mar 01, 2010 12:37 am
Posts: 310
It would be great if you could post your workaround here and/or in the SDK Wiki.
Might come in handy one day. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Mon Oct 31, 2016 3:37 pm 
Offline

Joined: Sun Nov 08, 2015 4:28 pm
Posts: 244
Here you are:
1. Add to your module, which includes 1 or more ComboBoxes (CB), 3 pads for each CB: input 'index' and outputs 'max' and 'selected string'.
2. Add a 'SingleLineText' from Design/Surfaces and connect the 'Str'-Pad to 'selected string'
3. Add a TextFader from Design/surface/controls. In the pad list go to vars and create pad for 'max'. Connect 'value' to 'index' and 'max' to 'max'.

If proper programmed, you can select by using the taxt fader (move pressed mosue left/right within the field).

Proper program can look like:

int sel = asyncIn[INPAD_INDEX]->itg;
if (sel < extMidiGUI->midiOutputList->getNumItems())
{
extMidiGUI->midiOutputList->setSelectedItemIndex(sel, true);
extMidiGUI->setMidiOutput(sel);
}
String::CharPointerType item = extMidiGUI->midiOutputList->getItemText(extMidiGUI->midiOutputList->getSelectedItemIndex()).getCharPointer();
asyncOut[OUTPAD_SELECTION].str = (char *)item.getAddress();
asyncOut[OUTPAD_MAX].itg = extMidiGUI->midiOutputList->getNumItems();


Top
 Profile  
Reply with quote  
 Post subject: Re: Combox: how can I fill the list programmatically
PostPosted: Thu Nov 03, 2016 10:19 am 
Offline
User avatar

Joined: Mon Mar 01, 2010 12:37 am
Posts: 310
Thanks, DragonSF!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  

Donate to help support this community


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group