Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gdpd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IVMI
Gdpd
Commits
1e366750
Commit
1e366750
authored
2 years ago
by
Florent Berthaut
Browse files
Options
Downloads
Patches
Plain Diff
Fixed windows cross-compiling and updated readme
parent
bbac9e80
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+65
-5
65 additions, 5 deletions
README.md
SConstruct
+2
-2
2 additions, 2 deletions
SConstruct
demo/project.godot
+1
-1
1 addition, 1 deletion
demo/project.godot
src/rtaudio/RtAudio.os
+0
-0
0 additions, 0 deletions
src/rtaudio/RtAudio.os
update.sh
+2
-2
2 additions, 2 deletions
update.sh
with
70 additions
and
10 deletions
README.md
+
65
−
5
View file @
1e366750
# gdpd
# gdpd
Godot add-on for loading and processing Pure Data patches
gdpd is a Godot add-on for loading and processing Pure Data patches.
# Using
In a script,
1.
Initalize gdpd
```
python
onready
var
gdpd
=
load
(
"
res://addons/gdpd/bin/gdpd.gdns
"
).
new
()
```
2.
Initialize the audio inputs and outputs
```
python
#retrieve the list of available input and outputs
var
inps
=
_gdpd
.
get_available_input_devices
()
var
outs
=
_gdpd
.
get_available_output_devices
()
#initialise the first ones
_gdpd
.
init_devices
(
inps
[
0
],
outs
[
0
])
```
4.
Load a patch
```
python
var
patch
=
ProjectSettings
.
globalize_path
(
"
res://patch.pd
"
)
var
patch_name
=
patch
.
split
(
"
/
"
)[
-
1
]
var
patch_dir
=
patch
.
trim_suffix
(
patch_name
)
gdpd
.
openfile
(
patch_name
,
patch_dir
)
```
5.
Send a message to the patch
```
python
#send message to [receive from_godot] with one symbol
_gdpd
.
start_message
(
1
)
_gdpd
.
add_symbol
(
"
hello
"
)
_gdpd
.
finish_list
(
"
from_godot
"
)
```
6.
Subscribe and receive messages from the patch
```
python
func
_ready
:
#listen to messages sent with [send to_godot]
_gdpd
.
subscribe
(
"
to_godot
"
)
func
_process
:
while
_gdpd
.
has_message
()
:
#msg is an array with the list of symbols/floats sent to to_godot
var
msg
=
_gdpd
.
get_next
()
print
(
"
got message from pd
"
,
msg
)
```
For a full working example, open the Godot project in the demo folder.
# Compiling
# Compiling
## Compiling
on
GNU/Linux
## Compiling
for
GNU/Linux
-
Install the following packages :
-
Install the following packages :
-
scons
-
scons
...
@@ -14,16 +73,17 @@ Godot add-on for loading and processing Pure Data patches
...
@@ -14,16 +73,17 @@ Godot add-on for loading and processing Pure Data patches
-
cd gdpd
-
cd gdpd
-
./update.sh linux
-
./update.sh linux
## Compiling
on
Windows
## C
ross-c
ompiling
for
Windows
on GNU/Linux
-
Open the Windows Powershell
-
Install the following packages :
-
mingw-64
-
Type the following commands :
-
Type the following commands :
-
git clone https://gitlab.univ-lille.fr/ivmi/gdpd.git
-
git clone https://gitlab.univ-lille.fr/ivmi/gdpd.git
-
cd gdpd
-
cd gdpd
-
./update.sh windows
-
./update.sh windows
## Compiling
on
Mac OSX
## Compiling
for
Mac OSX
## Compiling for Android (/ Oculus Quest)
## Compiling for Android (/ Oculus Quest)
...
...
This diff is collapsed.
Click to expand it.
SConstruct
+
2
−
2
View file @
1e366750
...
@@ -10,9 +10,9 @@ env = Environment(ENV = os.environ)
...
@@ -10,9 +10,9 @@ env = Environment(ENV = os.environ)
opts
.
Add
(
EnumVariable
(
'
target
'
,
"
Compilation target
"
,
'
release
'
,
[
'
d
'
,
'
debug
'
,
'
r
'
,
'
release
'
]))
opts
.
Add
(
EnumVariable
(
'
target
'
,
"
Compilation target
"
,
'
release
'
,
[
'
d
'
,
'
debug
'
,
'
r
'
,
'
release
'
]))
opts
.
Add
(
EnumVariable
(
'
platform
'
,
"
Compilation platform
"
,
''
,
[
''
,
'
windows
'
,
'
x11
'
,
'
linux
'
,
'
osx
'
]))
opts
.
Add
(
EnumVariable
(
'
platform
'
,
"
Compilation platform
"
,
''
,
[
''
,
'
windows
'
,
'
x11
'
,
'
linux
'
,
'
osx
'
]))
opts
.
Add
(
EnumVariable
(
'
p
'
,
"
Compilation target, alias for
'
platform
'"
,
''
,
[
''
,
'
windows
'
,
'
x11
'
,
'
linux
'
,
'
osx
'
]))
opts
.
Add
(
EnumVariable
(
'
p
'
,
"
Compilation target, alias for
'
platform
'"
,
''
,
[
''
,
'
windows
'
,
'
x11
'
,
'
linux
'
,
'
osx
'
]))
opts
.
Add
(
BoolVariable
(
'
use_llvm
'
,
"
Use the LLVM / Clang compiler
"
,
'
no
'
))
opts
.
Add
(
BoolVariable
(
'
use_llvm
'
,
"
Use the LLVM / Clang compiler
"
,
'
yes
'
))
opts
.
Add
(
BoolVariable
(
'
use_mingw
'
,
"
Use the MingW for cross-compiling
"
,
'
no
'
))
opts
.
Add
(
BoolVariable
(
'
use_mingw
'
,
"
Use the MingW for cross-compiling
"
,
'
no
'
))
opts
.
Add
(
PathVariable
(
'
target_path
'
,
'
The path where the lib is installed.
'
,
'
GdpdExample
/addons/gdpd/bin/
'
))
opts
.
Add
(
PathVariable
(
'
target_path
'
,
'
The path where the lib is installed.
'
,
'
demo
/addons/gdpd/bin/
'
))
opts
.
Add
(
PathVariable
(
'
target_name
'
,
'
The library name.
'
,
'
libgdpd
'
,
PathVariable
.
PathAccept
))
opts
.
Add
(
PathVariable
(
'
target_name
'
,
'
The library name.
'
,
'
libgdpd
'
,
PathVariable
.
PathAccept
))
# Local dependency paths, adapt them to your setup
# Local dependency paths, adapt them to your setup
...
...
This diff is collapsed.
Click to expand it.
demo/project.godot
+
1
−
1
View file @
1e366750
...
@@ -14,7 +14,7 @@ _global_script_class_icons={
...
@@ -14,7 +14,7 @@ _global_script_class_icons={
[application]
[application]
config/name="Gd
pdExample
"
config/name="Gd
Pd
"
run/main_scene="res://Main.tscn"
run/main_scene="res://Main.tscn"
run/low_processor_mode=true
run/low_processor_mode=true
config/icon="res://icon.png"
config/icon="res://icon.png"
...
...
This diff is collapsed.
Click to expand it.
src/rtaudio/RtAudio.os
+
0
−
0
View file @
1e366750
No preview for this file type
This diff is collapsed.
Click to expand it.
update.sh
+
2
−
2
View file @
1e366750
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
git config
--global
url.
"https://"
.insteadOf git://
git config
--global
url.
"https://"
.insteadOf git://
git submodule update
--init
--recursive
git submodule update
--init
--recursive
cd
src/godot-cpp
cd
src/godot-cpp
scons
platform
=
$1
generate_bindings
=
yes
target
=
release
scons
platform
=
$1
generate_bindings
=
yes
target
=
release
use_mingw
=
yes
cd
../..
cd
../..
scons
platform
=
$1
target
=
release
scons
platform
=
$1
target
=
release
use_mingw
=
yes
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment