Quantcast
Channel: beginners - openFrameworks
Viewing all 4929 articles
Browse latest View live

Play midi file with clock out

$
0
0

@simonblackmore wrote:

Hi all,

I would like to be able to play a midifile and a clock out in the same way as you might do in Ableton or Logic.

Does anyone have a tried an tested way of doing this.

So far I can…
Send a clock out with ofXMidi no problem.
Play a file out with ofxThreadedMidiPlayer no problem.

I am just not quite sure how to run them both together in a sensible way. You could run them seperately I guess but what if the song changes tempo.

Has anyone got anygood ideas on this?

Many thanks
Simon

Posts: 1

Participants: 1

Read full topic


I want to make this like messagebox

Simple Switching with of Objects

$
0
0

@JDeut wrote:

Hi all -
I’m new to OF and new to C++, so I’m working slowly through the book.

Generally, I like to learn by figuring out little modifications to the examples provided.

For example 1_ii_b Bursting_Rect_Brush, I’d like to be able to do two things:

  1. Stop the color from refreshing when the mouse is not pressed.

  2. Randomly toggle between ofDrawRect and ofDrawCircle. The ofDrawRect is located inside of a For loop. I’m imagining there is a way to create an array of modules and some kind of “choose” method, so that each iteration of the For loop makes a selection. I just have no idea how to do this.

Any suggestions?

Posts: 2

Participants: 2

Read full topic

ofBackgroundGradient() messing with video recording

$
0
0

@Okliis wrote:

Hi all,
It seems that using ofBackgroundGradient() with ofxVideoRecorder doesnt work:

It functions normally when I use ofBackground() in the fbo, however I get a blank screen when I use the gradient method.

Has anyone ever experienced this? More importantly, what other methods can I use to achieve a background gradient in my sketch, that wouldn’t freak out the fbo?

Just a heads up, I’m working in 3D and my camera orbits around the primitive, so the GL_QUADS method that has been posted in a previous thread doesn’t really work for my purposes.

Any help would be appreciated!

Posts: 2

Participants: 1

Read full topic

ofPolyline arcs rendering with "corners"/divots with line width greater than 1

$
0
0

@a__ wrote:

I’m trying to draw empty circles with strokes thicker than 1px. Using ofPolyline but it’s rendering with these weird little divots in its 4 “corners”:

    ofPoint pos = ofPoint(100, 100);
    int rad = 40;

    ofSetColor(255, 0, 0);
    ofNoFill();
    ofSetLineWidth(5);

    ofPolyline circle;
    circle.arc(pos, rad, rad, 0, 360, 360);
    circle.close();
    circle.draw();

If I increase the stroke width and give it some transparency you can see it’s sort of flipping over itself or rendering in 2 pieces:

What’s causing this? How can I draw a simple circle with >1 stroke width with reasonable code complexity?

Posts: 4

Participants: 3

Read full topic

[Solved] Displaying special characters with ofTrueTypeFont

$
0
0

@samuset wrote:

Hi, I’m having a bit of a problem with displaying special characters with my fonts usign ofTrueTypeFont.

This is what I want displayed:

fontSemibold.drawString( "aáúőű–", 100, 40 );
fontBold.drawString( "aáúőű–", 100, 80 );
fontItalic.drawString( "aáúőű–", 100, 120 );

What is displayed instead:

And yes, the fonts have those characters in their sets. And yes, the source files are in UTF-8 encoding. I’m using OF v0.10.1.

This is the entire code:

void ofApp::setup()
{
    fontSemibold.load( "semibold.otf", 24, true, true );
    fontBold.load( "bold.otf", 24, true, true );
    fontItalic.load( "italic.otf", 24, true, true );
}

void ofApp::draw()
{
    ofSetColor( 0 );
    ofDrawRectangle( 0, 0, ofGetWidth(), ofGetHeight() );
    
    ofSetColor( 255 );
    fontSemibold.drawString( "aáúőű–", 100, 40 );
    fontBold.drawString( "aáúőű–", 100, 80 );
    fontItalic.drawString( "aáúőű–", 100, 120 );
}

Posts: 2

Participants: 1

Read full topic

What is a good way to put background color for codes?

$
0
0

@Koji_Kanao wrote:

I’m generating a shader code and displaying it.
But sometimes it’s not readable, so I would like to put black as a background color for shader code.

code for displaying shader code
shader.begin();
...
ofDrawRectangle(0,0, ofGetWidth(), ofGetHeight());
shader.end();

ofPushMatrix();
ofSetColor(255);
codeFont.drawString(fsCode, ofGetWidth()*.1, ofGetHeight()*.1);
ofPopMatrix();

Could anyone tell me a good way to do that?

Thank you in advance,

Posts: 3

Participants: 2

Read full topic

I want to show all image files from dragged in window

$
0
0

@bemoregt wrote:

Hi, All.

I want to show all image files from dragged in window.
But this code just show one image.

What’s wrong to me?

#include “testApp.h”
//--------------------------------------------------------------
void testApp::setup(){

img1.load("/Users/mun/Desktop/aa.png");

}

//--------------------------------------------------------------
void testApp::update(){

}

//--------------------------------------------------------------
void testApp::draw(){

ofSetColor(255);
img1.draw(0,0, 512, 512);
ofSleepMillis(100);

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
if( dragInfo.files.size() > 0 ){
for(int i = 0; i < dragInfo.files.size(); i++){
img1.load(dragInfo.files[i]);
img1.update();
update();
ofLog() << dragInfo.files[i] << endl;
}// for
}// if
}

Thanks.

Posts: 2

Participants: 2

Read full topic


ofNode efficient set position, scale and orientation

$
0
0

@NickHardeman wrote:

What is the most efficient way to set all three? If I call setPosition(), setScale() and then setOrientation(), it works as expected, but the createMatrix function is called for each of those functions. Any advice on how to reduce calls to the createMatrix function? Something like
set( vec3 pos, vec3 scale, quat orientation) would be helpful.

Thanks!
Nick

Posts: 3

Participants: 2

Read full topic

Telegram group - openFrameworks

$
0
0

@dimitre wrote:

it would be great to have a general Telegram group for openFrameworks.
I think it is more dynamic than Slack, more IRC like.
What do you think?

Posts: 1

Participants: 1

Read full topic

[SOLVED] Xcode linker error related to ofxGui

$
0
0

@diatrevolo wrote:

Migrating an application from 0.9.8 to 0.10.1. I resolved a bunch of other issues, and now am down to just one family of problems. It seems the linker can’t find certain implementations…below is a subset of the error, any ideas would be greatly appreciated. Thanks!

UPDATE
I ran the project generator to regenerate the project file, and the problem disappeared.

Undefined symbols for architecture x86_64:
  "ofxColorPicker_<float>::setShape(ofRectangle)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::setShape(float, float, float, float)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::mousePressed(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::mouseDragged(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::mouseReleased(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<float>::setValue(float, float, bool)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::setShape(ofRectangle)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::mousePressed(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::mouseDragged(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::render()", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::setValue(float, float, bool)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned char>::getColorScale()", referenced from:
      ofxColorSlider_<unsigned char>::onMinimize() in ofxSliderGroup.o
  "ofxColorPicker_<unsigned char>::render()", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<unsigned long>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned long> in ofxSlider.o
  "ofxColorPicker_<unsigned short>::getParameter()", referenced from:
      ofxColorSlider_<unsigned short>::setup(ofParameter<ofColor_<unsigned short> >, float, float) in ofxSliderGroup.o
      ofxColorSlider_<unsigned short>::changeSlider(void const*, unsigned short&) in ofxSliderGroup.o
      ofxColorSlider_<unsigned short>::getParameter() in ofxSliderGroup.o
      ofxColorSlider_<unsigned short>::onMinimize() in ofxSliderGroup.o
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::ofxColorPicker_()", referenced from:
      ofxColorSlider_<unsigned short>::ofxColorSlider_(ofParameter<ofColor_<unsigned short> >, float, float) in ofxSliderGroup.o
  "ofxColorPicker_<unsigned char>::setup(ofParameter<ofColor_<unsigned char> >, float, float)", referenced from:
      ofxColorSlider_<unsigned char>::setup(ofParameter<ofColor_<unsigned char> >, float, float) in ofxSliderGroup.o
  "ofxColorPicker_<unsigned short>::mouseReleased(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned char>::ofxColorPicker_()", referenced from:
      ofxColorSlider_<unsigned char>::ofxColorSlider_(ofParameter<ofColor_<unsigned char> >, float, float) in ofxSliderGroup.o
  "ofxInputField<unsigned long>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned long> in ofxSlider.o
  "ofxInputField<unsigned long>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<unsigned long> in ofxSlider.o
  "ofxInputField<unsigned long>::drawCursor()", referenced from:
      vtable for ofxInputField<unsigned long> in ofxSlider.o
  "ofxInputField<long long>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<unsigned long>::getParameter()", referenced from:
      vtable for ofxInputField<unsigned long> in ofxSlider.o
  "ofxInputField<double>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxColorPicker_<float>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxInputField<double>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxInputField<unsigned long long>::mouseReleased(ofMouseEventArgs&)", referenced from:
      ofxSlider<unsigned long long>::mouseReleased(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxColorPicker_<unsigned short>::generateDraw()", referenced from:
      vtable for ofxColorPicker_<unsigned short> in ofxSliderGroup.o
  "ofxInputField<double>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxInputField<unsigned short>::mousePressed(ofMouseEventArgs&)", referenced from:
      ofxSlider<unsigned short>::mousePressed(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxInputField<double>::generateDraw()", referenced from:
      ofxSlider<double>::generateDraw() in ofxSlider.o
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxColorPicker_<unsigned char>::setShape(float, float, float, float)", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<double>::drawCursor()", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxInputField<float>::getParameter()", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxColorPicker_<unsigned char>::getParameter()", referenced from:
      ofxColorSlider_<unsigned char>::setup(ofParameter<ofColor_<unsigned char> >, float, float) in ofxSliderGroup.o
      ofxColorSlider_<unsigned char>::changeSlider(void const*, unsigned char&) in ofxSliderGroup.o
      ofxColorSlider_<unsigned char>::getParameter() in ofxSliderGroup.o
      ofxColorSlider_<unsigned char>::onMinimize() in ofxSliderGroup.o
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<float>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<short>::mouseReleased(ofMouseEventArgs&)", referenced from:
      ofxSlider<short>::mouseReleased(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<float>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<unsigned int>::getParameter()", referenced from:
      vtable for ofxInputField<unsigned int> in ofxSlider.o
  "ofxInputField<float>::drawCursor()", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<unsigned long long>::getParameter()", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<unsigned long long>::render()", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<unsigned long long>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<unsigned long long>::drawCursor()", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<long long>::getParameter()", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<unsigned short>::containsValidValue() const", referenced from:
      ofxSlider<unsigned short>::render() in ofxSlider.o
      std::__1::__function::__func<ofxSlider<unsigned short>::setup(ofParameter<unsigned short>, float, float)::'lambda'(), std::__1::allocator<ofxSlider<unsigned short>::setup(ofParameter<unsigned short>, float, float)::'lambda'()>, void ()>::operator()() in ofxSlider.o
  "ofxInputField<short>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<long long>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<unsigned long long>::setup(ofParameter<unsigned long long>, float, float)", referenced from:
      ofxSlider<unsigned long long>::setup(ofParameter<unsigned long long>, float, float) in ofxSlider.o
  "ofxColorPicker_<unsigned short>::setup(ofParameter<ofColor_<unsigned short> >, float, float)", referenced from:
      ofxColorSlider_<unsigned short>::setup(ofParameter<ofColor_<unsigned short> >, float, float) in ofxSliderGroup.o
  "ofxInputField<long long>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<int>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<unsigned int>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned int> in ofxSlider.o
  "ofxInputField<int>::mouseDragged(ofMouseEventArgs&)", referenced from:
      ofxSlider<int>::mouseDragged(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<unsigned int>::render()", referenced from:
      vtable for ofxInputField<unsigned int> in ofxSlider.o
  "ofxInputField<unsigned int>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<unsigned int> in ofxSlider.o
  "ofxInputField<unsigned int>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned int> in ofxSlider.o
  "ofxColorPicker_<unsigned char>::mouseReleased(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<int>::getParameter()", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<long long>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<int>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<float>::mousePressed(ofMouseEventArgs&)", referenced from:
      ofxSlider<float>::mousePressed(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<int>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<short>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<int>::render()", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<short>::drawCursor()", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<int>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<int>::drawCursor()", referenced from:
      vtable for ofxInputField<int> in ofxSlider.o
  "ofxInputField<long long>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<long long> in ofxSlider.o
  "ofxInputField<unsigned short>::render()", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxInputField<unsigned short>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxColorPicker_<float>::setup(ofParameter<ofColor_<float> >, float, float)", referenced from:
      ofxColorSlider_<float>::setup(ofParameter<ofColor_<float> >, float, float) in ofxSliderGroup.o
  "ofxInputField<unsigned short>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxColorPicker_<float>::render()", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxInputField<unsigned short>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxInputField<unsigned short>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxInputField<double>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxInputField<unsigned short>::drawCursor()", referenced from:
      vtable for ofxInputField<unsigned short> in ofxSlider.o
  "ofxColorPicker_<unsigned char>::setShape(ofRectangle)", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<short>::getParameter()", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<short>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<short>::ofxInputField(ofParameter<short>, float, float)", referenced from:
      ofxSlider<short>::ofxSlider(ofParameter<short>, float, float) in ofxSlider.o
  "ofxInputField<short>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<unsigned char>::setValue(float, float, bool)", referenced from:
      vtable for ofxInputField<unsigned char> in ofxSlider.o
  "ofxInputField<float>::render()", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<unsigned char>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned char> in ofxSlider.o

...

  "ofxColorPicker_<float>::ofxColorPicker_()", referenced from:
      ofxColorSlider_<float>::ofxColorSlider_(ofParameter<ofColor_<float> >, float, float) in ofxSliderGroup.o
  "ofxInputField<signed char>::mouseDragged(ofMouseEventArgs&)", referenced from:
      ofxSlider<signed char>::mouseDragged(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<signed char> in ofxSlider.o
  "ofxInputField<signed char>::mouseReleased(ofMouseEventArgs&)", referenced from:
      ofxSlider<signed char>::mouseReleased(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<signed char> in ofxSlider.o
  "ofxInputField<double>::render()", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxColorPicker_<float>::generateDraw()", referenced from:
      vtable for ofxColorPicker_<float> in ofxSliderGroup.o
  "ofxColorPicker_<unsigned char>::mouseScrolled(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<unsigned char>::containsValidValue() const", referenced from:
      ofxSlider<unsigned char>::render() in ofxSlider.o
      std::__1::__function::__func<ofxSlider<unsigned char>::setup(ofParameter<unsigned char>, float, float)::'lambda'(), std::__1::allocator<ofxSlider<unsigned char>::setup(ofParameter<unsigned char>, float, float)::'lambda'()>, void ()>::operator()() in ofxSlider.o
  "ofxInputField<short>::mouseDragged(ofMouseEventArgs&)", referenced from:
      ofxSlider<short>::mouseDragged(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxColorPicker_<unsigned char>::mouseDragged(ofMouseEventArgs&)", referenced from:
      vtable for ofxColorPicker_<unsigned char> in ofxSliderGroup.o
  "ofxInputField<double>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<double> in ofxSlider.o
  "ofxInputField<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::ofxInputField(ofParameter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, float, float)", referenced from:
      ofxGuiGroup::add(ofParameter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&) in ofxGuiGroup.o
  "ofxInputField<unsigned char>::render()", referenced from:
      vtable for ofxInputField<unsigned char> in ofxSlider.o
  "ofxInputField<signed char>::containsValidValue() const", referenced from:
      ofxSlider<signed char>::render() in ofxSlider.o
      std::__1::__function::__func<ofxSlider<signed char>::setup(ofParameter<signed char>, float, float)::'lambda'(), std::__1::allocator<ofxSlider<signed char>::setup(ofParameter<signed char>, float, float)::'lambda'()>, void ()>::operator()() in ofxSlider.o
  "ofxInputField<unsigned long long>::keyPressed(ofKeyEventArgs&)", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<unsigned char>::generateDraw()", referenced from:
      ofxSlider<unsigned char>::generateDraw() in ofxSlider.o
      vtable for ofxInputField<unsigned char> in ofxSlider.o
  "ofxInputField<float>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<float>::mouseDragged(ofMouseEventArgs&)", referenced from:
      ofxSlider<float>::mouseDragged(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<unsigned int>::setup(ofParameter<unsigned int>, float, float)", referenced from:
      ofxSlider<unsigned int>::setup(ofParameter<unsigned int>, float, float) in ofxSlider.o
  "ofxInputField<float>::mouseMoved(ofMouseEventArgs&)", referenced from:
      vtable for ofxInputField<float> in ofxSlider.o
  "ofxInputField<signed char>::setup(ofParameter<signed char>, float, float)", referenced from:
      ofxSlider<signed char>::setup(ofParameter<signed char>, float, float) in ofxSlider.o
  "ofxColorPicker_<float>::getColorScale()", referenced from:
      ofxColorSlider_<float>::onMinimize() in ofxSliderGroup.o
  "ofxInputField<double>::containsValidValue() const", referenced from:
      ofxSlider<double>::render() in ofxSlider.o
      std::__1::__function::__func<ofxSlider<double>::setup(ofParameter<double>, float, float)::'lambda'(), std::__1::allocator<ofxSlider<double>::setup(ofParameter<double>, float, float)::'lambda'()>, void ()>::operator()() in ofxSlider.o
  "ofxInputField<int>::setup(ofParameter<int>, float, float)", referenced from:
      ofxSlider<int>::setup(ofParameter<int>, float, float) in ofxSlider.o
  "ofxInputField<unsigned short>::setup(ofParameter<unsigned short>, float, float)", referenced from:
      ofxSlider<unsigned short>::setup(ofParameter<unsigned short>, float, float) in ofxSlider.o
  "ofxInputField<double>::ofxInputField(ofParameter<double>, float, float)", referenced from:
      ofxSlider<double>::ofxSlider(ofParameter<double>, float, float) in ofxSlider.o
  "ofxInputField<unsigned long>::ofxInputField(ofParameter<unsigned long>, float, float)", referenced from:
      ofxSlider<unsigned long>::ofxSlider(ofParameter<unsigned long>, float, float) in ofxSlider.o
  "ofxInputField<short>::render()", referenced from:
      vtable for ofxInputField<short> in ofxSlider.o
  "ofxInputField<unsigned char>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<unsigned char> in ofxSlider.o
  "ofxInputField<unsigned long long>::charPressed(unsigned int&)", referenced from:
      vtable for ofxInputField<unsigned long long> in ofxSlider.o
  "ofxInputField<unsigned char>::mouseReleased(ofMouseEventArgs&)", referenced from:
      ofxSlider<unsigned char>::mouseReleased(ofMouseEventArgs&) in ofxSlider.o
      vtable for ofxInputField<unsigned char> in ofxSlider.o
ld: symbol(s) not found for architecture x86_64

Posts: 1

Participants: 1

Read full topic

Network Video streaming for dummies?

$
0
0

@dono wrote:

Hi everyone,

how can I easily receive an UDP or RTSP video stream, so I can process the images and then send it as another UDP or RTSP stream in (as close as possible to) realtime?

So far I looked at:
ofxGStreamer - don’t need it since I’m on linux
ofxStreamer - does not compile due to https://github.com/HalfdanJ/ofxStreamer/issues/4 and seems abandoned
ofxGstRTP - seems only capable of sending and also outdated, but I haven’t tested it
ofGstUtils - this post Gstreamer advanced utils or how to stream an OF app seems to suggest that it could be helpful, but I can’t find anything about ofGstUtils let alone what commands I would have to use to open a udp port or to extract a frame.

Now I have no idea if it even possible with a reasonable amount of work or if I should just forget about it. Is there an easy solution?

Posts: 1

Participants: 1

Read full topic

I tried to remove rebox using ofxCV's InPaint()

$
0
0

@bemoregt wrote:

Hi, All.

I tried to remove redbox using ofxCV’s InPaint() .


first: original redbox image & HSV slider panel
2nd: inRange() mask from HSV slider value
3rd: removed result.

As above, I well select the redBox, but not removed --;
What’s wrong to me?

//--------------------------------------------------------------
void ofApp::setup(){

gui.setup();
// init value, value range
gui.add(hue.setup("Hue", 90, 10, 169));
gui.add(sat.setup("Saturation", 128, 50, 205));
gui.add(val.setup("Value", 128, 50, 205));

before.load("/Users/kerbal/Desktop/crack.jpg");

src = toCv(before);

// RGB to HSV
cvtColor(src, src_hsv, COLOR_RGB2HSV);

}

//--------------------------------------------------------------
void ofApp::update(){

// make mask
Mat mask, mask2;
inRange(src_hsv, Scalar(hue-10, sat-50, val-50), Scalar(hue+10, sat+50, val+50), mask);
toOf(mask, ofmask);

// dilate mask
dilate(mask, mask2, Mat());
toOf(mask2, ofmask2);
// inpainting
Mat dst;
inpaint(src, mask2, dst, 3, INPAINT_TELEA);

toOf(dst, after);
ofmask.update();
ofmask2.update();
after.update();

}

//--------------------------------------------------------------
void ofApp::draw(){

//ofDrawCircle(ofGetWidth()/2, ofGetHeight()/2, radius);
ofSetColor(255);
before.draw(0, 0, 512, 512);
ofmask2.draw(512, 0, 512, 512);
after.draw(1024, 0, 512, 512);
gui.draw();

}

Posts: 1

Participants: 1

Read full topic

Switch console information to ‘in app’ display

$
0
0

@Sam_McElhinney_io wrote:

Hi all

I am hoping there is a really simple way of doing this, but I am unable to find it…

Is there a way to display the console print information (ofLogm, couts, other error reports) directly in the app running screen?

thanks
S

Posts: 2

Participants: 2

Read full topic

Sound manipulation/synthesis in OF

$
0
0

@skywalkerwin wrote:

So lets say I have an incoming audio line from my microphone (or something) would it be possible to alter this incoming sound with different waveforms and output those altered sounds in realtime with openframeworks? I know you can get do a FFT on the incoming audio, but can i change or adjust some of those frequencies in realtime and output it back?

Thanks!

Posts: 1

Participants: 1

Read full topic


I wan to these each classes to myObject class array

$
0
0

@bemoregt wrote:

Hi, All.

I wan to these each classes(a,b,c) to myObject class array.
So, I want to enter member using for loop.

How can?

#include “ofApp.h”

// Image class
class myObject {
public:
float width;
int id;
string filename;
ofImage img;
};

// ofSort boolean
bool sortMe(myObject & a, myObject & b){
if (a.width < b.width){
return true;
} else {
return false;
}
}

myObject a;
myObject b;
myObject c;

//--------------------------------------------------------------
void ofApp::setup(){
// enter
a.id = 0;
b.id = 1;
c.id = 2;
a.filename= “/Users/mun/Desktop/aa.png”;
b.filename= “/Users/mun/Desktop/ants.png”;
c.filename= “/Users/mun/Desktop/lena512.png”;

a.img.load(a.filename);
b.img.load(b.filename);
c.img.load(c.filename);

a.width = a.img.getWidth();
b.width = b.img.getWidth();
c.width = c.img.getWidth();

vector < myObject > objects =  {a,b,c};

// before
ofLog() << "pre sort" << endl;
for (int i = 0; i < objects.size(); i++){
    ofLog() << objects[i].id << " " << objects[i].width << endl;
}

ofSort(objects, sortMe);

// after
ofLog() << "post sort" << endl;
for (int i = 0; i < objects.size(); i++){
    ofLog() << objects[i].id << " " << objects[i].width << endl;
    image= objects[i].img;
}

kk=0;

}

Thanks.
Best,

Posts: 1

Participants: 1

Read full topic

ofLog prints unreadable messages

$
0
0

@jxa wrote:

Hi, I’m having some difficulties when reading messages printed to de console with ofLog. When running ofLogExample from examples/strings as soon as I hit “v” on my keyboard to set verbose log I get these prints:

[notice ] 5s timer: Run time is 0 seconds
[notice ] 5s timer: Run time is 5 seconds
[notice ] 5s timer: Run time is 10 seconds
[ fatal ] New log level is verbose
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[notice ] 5s timer: Run time is 15 seconds
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[verbose] 0x1003762120x7ffeefbff4300x10037621f
[notice ] 5s timer: Run time is 20 seconds

The difference I see is that [verbose] messages are printed using << operator (similar to std::cout syntax).

Any ideas how to fix this ? I’m using Xcode 10.2 on Mac. Same thing happened with previous versions.

Thanks

Posts: 1

Participants: 1

Read full topic

How to add one callback for multiple ofParameters?

$
0
0

@ricardomatias wrote:

In setup(), such as:

MAX_DEPTH and MAX_DRAW are 2 ofParameter of int and float.

    MAX_DEPTH.newListener([this](int &v) { drawAlgo(); });
    MAX_DRAW.newListener([this](float &v) { drawAlgo(); });

But these never get called.

Posts: 2

Participants: 2

Read full topic

How can I increase the font size of gui panel?

I want to monitor this python process from openframeworks using c++ watchdog

$
0
0

@bemoregt wrote:

Hi, All.

I have executed python process like this -
$ python3 infer.py

And, I want to monitor this python process from openframeworks using c++ watchdog.
When this python process killed, It must be restarted by c++ watchdog.

Is there any watchdog addons for OF which can monitor python?
How can I get this ?

Thanks in advance.
Best,
@bemoregt.

Posts: 1

Participants: 1

Read full topic

Viewing all 4929 articles
Browse latest View live


Latest Images