Search Results

Search found 11 results on 1 pages for 'openframeworks'.

Page 1/1 | 1 

  • How to add class to openframeworks project in VS2012

    - by Mr Bell
    I am normally a C# guy but trying to get into c++. I made myself a new openframeworks project by copying and pasting one of the example projects and then renaming everything to my project name. (If there is an easier way, I would love to hear it) This project has the .cpp and .h files in a sub folder called "src" which are in turn organized into virtual folders (filters???) in visual studio. How can I add a class to this project from within visual studio? If I right click on the src filter in the solution explorer and hit add class. It creates the class files at the root of the project not in the src folder. I mean it does this both in the solution explorer and where it physically places the files. This is a problem because I can't include my class files in the rest of my app, presumably because they aren't in the same folder What is the proper way to add a class file?

    Read the article

  • FMOD surround sound openframeworks

    - by user1449425
    Ok, I hope I don't mess this up, I have had a look for some answers but can't find anything. I am trying to make a simple sampler in openframeworks using the FMOD sound player in 3D mode. I can make a single instance work fine (recording a new file using libsndfilerecorder and then playing it back and moving it in surround. However I want to have 8 layers of looping audio that I can record and replace one layer at a time in a live show. I get a lot of problems as soon as I have more than 1 layer. The first part of my question relates to the FMOD 3D modes, it is listener relative, so I have to define the position of my listener for every sound (I would prefer to have head relative mode but I cannot make this work at all. Again this works fine when I am using a single player but with multiple players only the last listener I update actually works. The main problem I have is that when I use multiple players I get distortion, and often a mix of other currently playing sounds (even when the microphone cannot hear them) in my new recordings. Is there an incompatability with libsndfilerecorder and FMOD? Here I initialise the players for (int i=0; i<CHANNEL_COUNT; i++) { lvelocity[i].set(1, 1, 1); lup[i].set(0, 1, 0); lforward[i].set(0, 0, 1); lposition[i].set(0, 0, 0); sposition[i].set(3, 3, 2); svelocity[i].set(1, 1, 1); //player[1].initializeFmod(); //player[i].loadSound( "1.wav" ); player[i].setVolume(0.75); player[i].setMultiPlay(true); player[i].play(); setupHold[i]==false; recording[i]=false; channelHasFile[i]=false; settingOsc[i]=false; } When I am recording I unload the file and make sure the positions of the player that is not loaded are not updating. void fmodApp::recordingStart( int recordingId ){ if (recording[recordingId]==false) { setupHold[recordingId]=true; //this stops the position updating cout<<"Start recording Channel " + ofToString(recordingId+1)+" setup hold is true \n"; pt=getDateName() +".wav"; player[recordingId].stop(); player[recordingId].unloadSound(); audioRecorder.setup(pt); audioRecorder.setFormat(SF_FORMAT_WAV | SF_FORMAT_PCM_16); recording[recordingId]=true; //this starts the libSndFIleRecorder } else { cout<<"Channel" + ofToString(recordingId+1)+" is already recording \n"; } } And I stop the recording like this. void fmodApp::recordingEnd( int recordingId ){ if (recording[recordingId]=true) { recording[recordingId]=false; cout<<"Stop recording" + ofToString(recordingId+1)+" \n"; audioRecorder.finalize(); audioRecorder.close(); player[recordingId].loadSound(pt); setupHold[recordingId]=false; channelHasFile[recordingId]=true; cout<< "File recorded channel " + ofToString(recordingId+1) + " file is called " + pt + "\n"; } else { cout << "Sorry track" + ofToString(recordingId+1) + "is not recording"; } } I am careful not to interrupt the updating process but I cannot see where I am going wrong. Many Thanks

    Read the article

  • What is the ideal laptop for creative coding applications?

    - by Jason
    Hi, I am a creative coder using C++(cinder and OpenFrameworks) I am looking to upgrade from my MacBook, which slowed down to about 3fps this morning. My project involves particles systems and fluids reacting to audio analysis data and computer vision data in real-time. SD or HD? no biggie. I have asked many people what computer I need. Ideally, I want a MacBook Pro. But is that enough power? I've been told that I need a desktop for what I am doing though I'd rather stay portable I've been told that I should go PC linux to get the most power but I'd rather stay mac I've been told that RAM is more of bottleneck than processor speed I've been told that the Graphics Card is more important than CPU and that code optimizations such as using trees over lists, proper threading, sending tasks to the GPU make a bigger difference than the hardware!!! what's true?! what do I need? Any suggestions are greatly appreciated

    Read the article

  • Bitwise operators and converting an int to 2 bytes and back again.

    - by aKiwi
    first time user, Hi guys! So hopefully someone can help.. My background is php so entering the word of lowend stuff like, char is bytes, which are bits.. which is binary values.. etc is taking some time to get the hang of ;) What im trying to do here is sent some values from an Ardunio board to openFrameWorks (both are c++). What this script currently does (and works well for one sensor i might add) when asked for the data to be sent is.. int value_01 = analogRead(0); // which outputs between 0-1024 unsigned char val1; unsigned char val2; //some Complicated bitshift operation val1 = value_01 &0xFF; val2 = (value_01 >> 8) &0xFF; //send both bytes Serial.print(val1, BYTE); Serial.print(val2, BYTE); Apparently this is the most reliable way of getting the data across.. So now that it is send via serial port, the bytes are added to a char string and converted back by.. int num = ( (unsigned char)bytesReadString[1] << 8 | (unsigned char)bytesReadString[0] ); So to recap, im trying to get 4 sensors worth of data (which im assuming will be 8 of those serialprints?) and to have int num_01 - num_04... at the end of it all. Im assuming this (as with most things) might be quite easy for someone with experience in these concepts.. Any help would be greatly appreciated. Thanks

    Read the article

  • Test whether pixel is inside the blobs for ofxOpenCV

    - by mia
    I am doing an application of the concept of the dodgeball and need to test of the pixel of the ball is in the blobs capture(which is the image of the player) I am stucked and ran out of idea of how to implement it. I manage to do a little progress which have the blobs but I not sure how to test it. Please help. I am a newbie who in a desperate condition. Thank you. This is some of my code. void testApp::setup(){ #ifdef _USE_LIVE_VIDEO vidGrabber.setVerbose(true); vidGrabber.initGrabber(widthS,heightS); #else vidPlayer.loadMovie("fingers.mov"); vidPlayer.play(); #endif widthS = 320; heightS = 240; colorImg.allocate(widthS,heightS); grayImage.allocate(widthS,heightS); grayBg.allocate(widthS,heightS); grayDiff.allocate(widthS,heightS); ////<---what I want bLearnBakground = true; threshold = 80; //////////circle////////////// counter = 0; radius = 0; circlePosX = 100; circlePosY=200; } void testApp::update(){ ofBackground(100,100,100); bool bNewFrame = false; #ifdef _USE_LIVE_VIDEO vidGrabber.grabFrame(); bNewFrame = vidGrabber.isFrameNew(); #else vidPlayer.idleMovie(); bNewFrame = vidPlayer.isFrameNew(); #endif if (bNewFrame){ if (bLearnBakground == true){ grayBg = grayImage; // the = sign copys the pixels from grayImage into grayBg (operator overloading) bLearnBakground = false; } #ifdef _USE_LIVE_VIDEO colorImg.setFromPixels(vidGrabber.getPixels(),widthS,heightS); #else colorImg.setFromPixels(vidPlayer.getPixels(),widthS,heightS); #endif grayImage = colorImg; grayDiff.absDiff(grayBg, grayImage); grayDiff.threshold(threshold); contourFinder.findContours(grayDiff, 20, (340*240)/3, 10, true); // find holes } ////////////circle//////////////////// counter = counter + 0.05f; if(radius>=50){ circlePosX = ofRandom(10,300); circlePosY = ofRandom(10,230); } radius = 5 + 3*(counter); } void testApp::draw(){ // draw the incoming, the grayscale, the bg and the thresholded difference ofSetColor(0xffffff); //white colour grayDiff.draw(10,10);// draw start from point (0,0); // we could draw the whole contour finder // or, instead we can draw each blob individually, // this is how to get access to them: for (int i = 0; i < contourFinder.nBlobs; i++){ contourFinder.blobs[i].draw(10,10); } ///////////////circle////////////////////////// //let's draw a circle: ofSetColor(0,0,255); char buffer[255]; float a = radius; sprintf(buffer,"radius = %i",a); ofDrawBitmapString(buffer, 120, 300); if(radius>=50) { ofSetColor(255,255,255); counter = 0; } else{ ofSetColor(255,0,0); } ofFill(); ofCircle(circlePosX,circlePosY,radius); }

    Read the article

  • Cross-Platform Language + GUI Toolkit for Prototyping Multimedia Applications

    - by msutherl
    I'm looking for a language + GUI toolkit for rapidly prototyping utility applications for multimedia installations. I've been working with Max/MSP/Jitter for many years, but I'd like to add a text-based language to my 'arsenal' for tasks apart from 'content production'. (When it comes to actual media synthesis, my choices are clear [SuperCollider + MSP for audio, Jitter + Quartz + openFrameworks for video]). I'm looking for something that maintains some of the advantages of Max, but is lower-level, faster, more cross-platfrom (Linux support), and text-based. Integration with powerful sound/video libraries is not a requirement. Some requirements: Cross-platform (at least OSX and Linux, Windows is a plus) Fast and easy cross-platform GUIs with no platform-specific modification GUI code separated from backend code as much as possible Good for interfacing with external serial devices (micro-controllers) Good network support (UDP/TCP) Good libraries for multi-media (video, sound, OSC) are a plus Asynchronous synchronous UNIX integration is a plus The options that come to mind: AS3/Flex (not a fan of AS3 or the idea of running in the Flash Player) openFrameworks (C++ framework, perhaps a bit too low level [looking for fast development time] and biased toward video work) Java w/ Processing libraries (like openFrameworks, just slower) Python + Qt (is Qt appropriate for rapid prototyping?) Python + Another GUI toolkit SuperCollider + Swing (yucky GUI development) Java w/ SWT Any other options? What do you recommend?

    Read the article

  • Programming Interactivity de Joshua Noble, critique par verdavaine yan

    Bonjour, Voici ma critique du livre de Joshua Noble Programming Interactivity A Designer's Guide to Processing, Arduino, and openFrameworks Citation: Au travers de son livre Programming Interactivity, Joshua Noble propose un guide pour comprendre et développer différentes interactions avec une machine, que ce soit visuel ou physique. Le public visé est tous niveaux. Pour cela, le guide se repose sur trois frameworks :Processing : basé sur...

    Read the article

  • OpenCV: Getting and Setting Camera Settings

    - by jhaip
    I have been searching around and can't find an example of how to get and set the camera capturing settings. For example the capturing resolution, fps, color balance, etc. I have only seen examples of how to change the settings when saving the captured video but I want to be able to find all the camera's capturing modes and choose which one I want. For example, I am using the PS3eye webcam and in the test program it allows you to change the settings (320x240 at 15,30,60,120 fps, 640x480 at 15,30,60,75 fps). So is there a function in OpenCV for getting all the camera's capture modes and choosing one? I remember in OpenFrameworks there was a function to change these settings but I would like to know how to do it in OpenCV. Here is the code for OpenFrameworks with OpenCV that does sort of what I want: vidGrabber.setDeviceID( 4 ); vidGrabber.setDesiredFrameRate( 30 ); //I want this vidGrabber.videoSettings(); vidGrabber.setVerbose(true); vidGrabber.initGrabber(320,240); //And this

    Read the article

  • Which creative framework can create these games? [closed]

    - by Rahil627
    I've used a few game frameworks in the past and have run into limitations. This lead me to "creative frameworks". I've looked into many, but I cannot determine the limitations of some of them. Selected frameworks ordered from highest to lowest level: Flash, Unity, MonoGame, OpenFrameworks (and Cinder), SFML. I want to be able to: create a game that handles drawing on an iPad create a game that uses computer vision from a webcam create a multi-device iOS game create a game that uses input from Kinect Can all of the frameworks handle this? What is the highest level framework that can handle all of them?

    Read the article

  • FMOD on non-playing audio

    - by coldrising
    Hey, is there any way to get the audio spectrum of a section of a song using FMOD if it is not playing? Can I render a full song waveform using FMOD (+opengl/openframeworks/etc.) before the song is playing?

    Read the article

  • OpenGL Mipmapping: how does OpenGL decide on map level?

    - by Droozle
    Hi, I am having trouble implementing mipmapping in OpenGL. I am using OpenFrameworks and have modified the ofTexture class to support the creation and rendering of mipmaps. The following code is the original texture creation code from the class (slightly modified for clarity): glEnable(texData.textureTarget); glBindTexture(texData.textureTarget, (GLuint)texData.textureID); glTexSubImage2D(texData.textureTarget, 0, 0, 0, w, h, texData.glType, texData.pixelType, data); glTexParameteri(texData.textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(texData.textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glDisable(texData.textureTarget); This is my version with mipmap support: glEnable(texData.textureTarget); glBindTexture(texData.textureTarget, (GLuint)texData.textureID); gluBuild2DMipmaps(texData.textureTarget, texData.glTypeInternal, w, h, texData.glType, texData.pixelType, data); glTexParameteri(texData.textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(texData.textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glDisable(texData.textureTarget); The code does not generate errors (gluBuild2DMipmaps returns '0') and the textures are rendered without problems. However, I do not see any difference. The scene I render consists of "flat, square tiles" at z=0. It's basically a 2D scene. I zoom in and out by using "glScale()" before drawing the tiles. When I zoom out, the pixels of the tile textures start to "dance", indicating (as far as I can tell) unfiltered texture look-up. See: http://www.youtube.com/watch?v=b_As2Np3m8A at 25s. My question is: since I do not move the camera position, but only use scaling of the whole scene, does this mean OpenGL can not decide on the appropriate mipmap level and uses the full texture size (level 0)? Paul

    Read the article

1