Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikeocom/qt_with_juce_example
Example project shows how to use Qt and JUCE library together
https://github.com/nikeocom/qt_with_juce_example
audio-player cpp juce juce-application qml qt qt5
Last synced: 2 months ago
JSON representation
Example project shows how to use Qt and JUCE library together
- Host: GitHub
- URL: https://github.com/nikeocom/qt_with_juce_example
- Owner: nikeocom
- Created: 2019-11-14T22:56:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-30T14:25:35.000Z (about 5 years ago)
- Last Synced: 2024-08-04T02:09:43.245Z (6 months ago)
- Topics: audio-player, cpp, juce, juce-application, qml, qt, qt5
- Language: C++
- Size: 3.08 MB
- Stars: 21
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-juce - qt_with_juce_example
README
# How to
First, you need to generate project in Projucer:
![Alt text](tutorial/projucer.png?raw=true "Audio application")And now you have a generated code like this:
![Alt text](tutorial/generated_folder.png?raw=true "Genereted sources and XCode project")# Dependecies
For example, i used XCode project. And now you need to get frameworks and defines from project
![Alt text](tutorial/frameworks.png?raw=true "Frameworks")
![Alt text](tutorial/defines.png?raw=true "Defines")# Qt Creator
For using a JUCE code in Qt project you need to add all sources, defines and set path to JUCE modules in project:
```
# Path to JUCE modules
INCLUDEPATH += /path/to/JUCE/modules# Juce defines
DEFINES += JUCE_APP_VERSION=1.0.0 \
JUCE_APP_VERSION_HEX=0x10000 \
JucePlugin_Build_VST=0 \
JucePlugin_Build_VST3=0 \
JucePlugin_Build_AU=0 \
JucePlugin_Build_AUv3=0 \
JucePlugin_Build_RTAS=0 \
JucePlugin_Build_AAX=0 \
JucePlugin_Build_Standalone=0 \
JucePlugin_Build_Unity=0 \
JUCE_USE_MP3AUDIOFORMAT=1 \
```For Android you can find defines in CMakeLists.txt
```
add_definitions("-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=16" "-DJUCE_PUSH_NOTIFICATIONS=1" "-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY=\"com/roli/juce/JuceActivity\"" "-DJUCER_ANDROIDSTUDIO_7F0E4A25=1" "-DJUCE_APP_VERSION=1.0.0" "-DJUCE_APP_VERSION_HEX=0x10000")
```For OS X:
```
# Add framework for JUCE
LIBS += -framework Foundation
LIBS += -framework UIKit
LIBS += -framework AudioToolBox
LIBS += -framework CoreAudio
LIBS += -framework CoreAudioKit
LIBS += -framework CoreMIDI
LIBS += -framework Accelerate
LIBS += -framework Carbon
LIBS += -framework Cocoa
LIBS += -framework IOKit
```(for other system you need to add special for OS libs)
## Now JUCE code is added and we can compile it. But!
### For full functionality you must run JuceApplication:
1. Inherrit from ```JUCEApplication```
2. Call:
```
juce::JUCEApplicationBase* juce_CreateApplication();
juce::JUCEApplicationBase* juce_CreateApplication() { return new YourJuceApplicationClass();
```
3. Initialise JUCE GUI (order is required):
```
// Need for MessageManager
initialiseJuce_GUI();
// for isStandalone() == true
juce::JUCEApplicationBase::createInstance = &juce_CreateApplication;
```