오픈 프레임 웍스와 자신의 미디 생성 된 실시간 영상을 만들기

Do you want to create a simple desktop app that generates realtime animations using MIDI data? Then you're in the right place and Liam Lacey is here to show how using openFrameworks.  

수행하는 뮤지션으로, 연주에서 예상 영상을 통합하는 것은 고객의 경험을 향상시키는 확실한 방법입니다. 등이, 일을 위해 설계된 많은 비디오 자키와 프로젝션 매핑 소프트웨어 응용 프로그램이 있습니다 Resolume 경기장 또는 ArKaos GrandVJ 아티스트가 트리거 할 수 있도록, 제어 비디오, 그래픽 및 실시간 애니메이션뿐만 아니라, 음악을 동기화. 이러한 애플리케이션의 대부분은 이미 도시에서 MIDI를 사용하는 음악에 매우 유용하게 MIDI를 사용하여 제어 될 수있다. 그러나, MIDI 통합은 종종 매우 제한적이며, 당신은 정확하게 당신이 원하는 방법을 영상을 제어 할 수 없습니다. 이 주위에 한 가지 방법은 사용자 정의 소프트웨어 응용 프로그램을 작성하는 것입니다

이 튜토리얼에서, 나는

Resolume Arena 4 projection mapping software 

Resolume 아레나 4 프로젝션 매핑 소프트웨어.

우리가 여기에서 사용하게 될 플랫폼이라고 오픈 프레임 웍스 (자주의 약칭)을

Live Visuals at Roskilde Festival 2014, Denmark, by Johan Bichel Lindegaard, partly made using openFrameworks

요한 Bichel Lindegaard으로 로스 킬레 페스티벌 2014, 덴마크, 라이브 비주얼은, 부분적으로 오픈 프레임 웍스를 사용했다.

우리가 시작하기 전에, 우리가 만드는 것입니다 무엇의 간단한 예입니다

당신이 필요합니다 무엇 :

Step 1—Installing your IDE

첫째로 당신은 당신의 IDE를 설치해야합니다. OS X에서 엑스 코드를 설치하면 간단합니다

Step 2—Installing openFrameworks and ofxMidi

의 설치하려면 컴퓨터에있는 위치에 폴더의 다운로드를 이동합니다. ofxMidi를 설치하려면, 당신의 폴더 내에 애드온 디렉토리에 다운로드 ofxMidi 폴더를 이동합니다.

Step 3—Setting up the oF Project

당신이 당신의 응용 프로그램을 개발할 수 있도록 다음 당신은 당신의 IDE에 대한 프로젝트를 설정해야합니다. 당신의 사용이 작업을 수행하려면

  1. 설정
  2. 확인
  3. 확인
  4. 클릭
  5. 클릭

openFrameworks Project Generator application

오픈 프레임 웍스 프로젝트 발전기 응용 프로그램입니다.

이제 새로 생성 된 프로젝트의 오픈 프레임 웍스 / 응용 프로그램 /의 myapps 디렉토리에 새 폴더가 있어야합니다.

Step 4—Adding the Code

다음으로 새로 생성 된 프로젝트를 열고 몇 가지 코드를 추가해야합니다 :

  1. 당신의 IDE 응용 프로그램 (엑스 코드 또는 코드 :: 블록)를 엽니 다.
  2. 가다
  3. 프로젝트 파일 (엑스 코드에 대한 .xcodeproj 파일이나 코드 :: 블록에 대한 .workspace)을 선택하고 클릭
  4. IDE에서 다음 프로젝트 이름에 아이콘이 있어야 왼쪽 열 / 창으로 이동합니다. 삼각형을 클릭하거나

The Xcode (left image) and Code::Blocks (right image) project navigator where you will find the source code files

엑스 코드 (왼쪽 이미지) 및 코드 :: 블록 (오른쪽 이미지) 소스 코드 파일을 찾을 프로젝트 네비게이터.

  1. 다운로드 는 여기에서이 프로젝트에 코드를 .
  2. 새로 다운로드 한 파일의 내용을 사용하여 IDE 내 ofApp.cpp과 ofApp.h의 내용을 교체합니다. 당신이 그들을 두 번 클릭해야하지만 코드 : : 블록, 트리 뷰에서 그들에 Xcode를 단지 한 번의 클릭에서이 파일을 엽니 다.

이 프로젝트 작업에 대한 코드는이 문서의 범위를 벗어나는 비트는 방법을 가르치는, 그래서

Step 5—Building and Running the Code

당신은 당신이 소프트웨어의 조각에 코드를 구축 할 필요가 있다는 그러나 전에, 미디 영상 효과 응용 프로그램을 시도 할 준비가 거의 다 된 것입니다. 이 다음 단계를 완료하려면 다음을 수행합니다

OS X에서 엑스 코드에서 :

  1. 그리고 다음의 플레이에 좌측 상단에 툴바의 아이콘을 중지하는 드롭 다운 메뉴가
  2. 메뉴 표시 줄에서 선택
  3. 메뉴 표시 줄에서 선택
  4. 영상 효과 애플리케이션 이제 나타나야하고, 애플리케이션 파일에 작성 했어야

The Xcode IDE running the MIDI visualiser application

엑스 코드 IDE는 미디 영상 효과 응용 프로그램을 실행.

코드에서 :: Windows에서 블록 :

  1. 메뉴 표시 줄에서 선택
  2. 메뉴 표시 줄에서 선택
  3. 영상 효과 애플리케이션은 현재 (제 유틸리티 애플리케이션은 뒤에 나오는 함께) 나타나야하고, 애플리케이션 파일에 작성 했어야

The Code::Blocks IDE running the MIDI visualiser application

미디 영상 효과의 응용 프로그램을 실행하는 코드 :: 블록 IDE

축하 해요

Step 6—Using the application

미디 영상 효과 응용 프로그램을 사용하기 쉽습니다. 지침 상태로, 단순히 누르면, 컴퓨터 키보드의 숫자를 사용하고자하는 미디 입력을 선택

The MIDI visualiser application

MIDI의 영상 효과 응용

다음은이 프로젝트의 소스 코드를 다운로드

Conclusion

너무

 

Liam is the Head Of Development specialising in software development at Modal Electronics, the company behind the 002, 008, CRAFT and SKULPT synthesisers, and was previously the lead software developer at nu desine, the developers of the AlphaSphere MIDI controllers. He was also an Associate Lecturer at UWE, Bristol, UK where he gradua... Read More

Discussion

cuticulamusic
can you specify for which OS X this should work, cause I guess in 10.9 it is not working. I get tons of debugging errors like "gluBuild2DMipmaps is deprecated" use xxx instead. ???
Liam Lacey
Hey cuticulamusic,
These messages are actually just openFrameworks build warnings that can be ignored in this case, so it should still be possible to build and run the application. Is this true for you, or are they coming up as red errors that prevent you from building? With the latest version of oF (0.8.4) this project should work on OS X 10.6 and above.
cuticulamusic
Hi, I found out that I didn't " On the top toolbar on the left-hand side next to the play and stop icons there is a dropdown menu—select the ‘[project name] Debug’ option." set it right. But after doing that I got like 18 real errors. all of them "Apple Match-O Linker (id) Error". Do you have any idea what that could be? and thanks for your help already and putting up this tutorial (even tough its not working for me, haha).
Liam Lacey
Can you give examples of the exact "Apple Match-O Linker (id) Error" errors?
Xac
Tried this on OS X 10.11.1 Xcode says build failed.
Liam Lacey
Hey XacWj,
I haven't been able to test this on OS X 10.11 yet. What errors are you getting?
Bonzo
I'm so confused. You linked to a version of Code Blocks, yet the installation guide for Windows you linked to recommends another completely different version. They're nowhere near the same size and the version numbers are completely different. It asks that i 'install' it, but all i find is an install.md file which i can't open.
Bonzo
Thanks for deleting my comment, i figured out where i went wrong anyway. It would have helped if you had explained that oF and code::blocks are two separate programs.
Bonzo
So now i've done all the steps but at the end i just get the grey screen and an empty command prompt box with no instructions. The build had no errors. Any advice?
Liam Lacey
Hey Bonzo,

Code::Blocks is the piece of software used for developing software applications, whereas oF is just a library of files used to make software development a lot easier. Sorry if that wasn't clear in the tutorial.

Since releasing this tutorial there has been a newer release of oF (0.9.0), and unfortunately they no longer suggest Code::Blocks to be the best IDE to use on Windows. Also I have not yet tested this tutorial using version 0.9.0 - just 0.8.4 (which can be downloaded from http://www.openframeworks.cc/download/older.html). Which version of oF did you try this tutorial with?
Stefan Hetzel
@Liam Lacey: Thanks for the great tutorial, it was (almost) no problem to install the app :-) (Win 7 64-bit, using oF 0.8.4)
Eric
This is exactly what I've been looking for. Thank you so much!!!
Alex
Please, what portions of midi_visualizer source code gets copied into CodeBlocks. Think I'm ok with ofx files (h and C++). Does MAMA file go as well. How??
Mapt
Hi, thanks for this article. With your help, I managed to create music videos for my musical project. Here is the first one if anyone is interested :
https://youtu.be/AAL9CR8_tJ8
VoyagesLuna
Hi, thank you so much for this awesome tutorial!! It actually worked for me! On macOS Catalina 10.15.5 may 2020. Only small detail at first the build failed, it said midi thing did not have a method getPortsList and asked me if I meant getInPortList instead... I changed it for getInPortList where the error was flagged and now it is working!!

Only thing that I still need to figure out though is how can I route the midi from my song in Ableton Live to the program? Right now I am able to chose between my drum pad, my midi synth or my audio interface as MIDI input and if I chose the drumpad or the midi synth it totally works and I can see the circles on the app!

Could you share how you got the midi from your Ableton coming out in the app? Thanks!
A
For those trying to run this code in VS on Windows
change line 158 from
vector midi_port_strings = midiIn.getPortList();
to
vector midi_port_strings = midiIn.getInPortList();
If it can't compile try to switch Solution Platform from Win32 to x64 (and optionally back)

Want to join the discussion?

Create an account or login to get started!