IVMI-builder
(work in progress)
IVMI-builder is a free-software framework that facilitates the design of Immersive Virtual Musical Instruments. It relies on the Godot game engine and the PureData audio programming language.
Prerequisites
- PureData from https://puredata.info
- Godot 4.x from https://godotengine.org/, with OpenXR activated
- If you want to be able to integrate the audio when releasing your instrument (e.g. in a binary or as an app), install the Gdpd addon
A first example
Scene creation
Patch creation
Design process
Release
Creating your instrument
Godot IvmiScene
The root of your scene must extend from the IvmiScene class/script. Attach a script to it and start it with :
extends IvmiScene
func _ready() :
super._ready()
func _process(delta) :
super._process(delta)
Then your scene tree can look like :
- Main (with attached script extending IvmiScene)
- XROrigin
- XRCamera
- XRController
- MeshInstance
- XROrigin
You can also directly attach the script extending IvmiScene to the ARVROrigin node.
IvmiScene provides a number of settings to help you design immersive instruments , such as :
- Pd Mode
- Pd Patch
- XR Mode
- ...
Godot IvmiNode
IVMI-node are the main components of any IVMI instruments. IVMI-node contains IVMI-properties. By inheriting IVMI-node.gd you are able to define a specific behavior/feedback for each IVMI-property change that occur within the node. You can for example write a code that change the size of the node's mesh when the node is selected.
extends IvmiNode
func _ready():
# Call default IvmiNode constructor
super._ready()
# Optionally define a node type
_set_ivmi_type("my_node")
# Add custom properties with array of values
_add_property("selected", [0])
# Properties are sent by default, optionnally deactivate sending
_properties["selected"].set_listen(false)
func process(delta) :
# Call default IvmiNode processing, required for updates
super._process(delta)
func _set_property(prop, vals) :
# Call default properties handling
super._set_property(prop, vals)
# Handle custom properties
match prop:
"selected":
get_node("MeshInstance").scale.x = 2.0*vals[0]+1.0
IvmiProperty
IvmiProperties are composed of :
- A name : A string
- Values : An array of values (floats, ints, bools, strings, ...)
Each property change is sent to Pure Data, when their _listen variable is set to true, which is the case by default.
# Add a new property
_add_property("radius", [1])
# Retrieve property values
radius = _get_property("radius")[0]
# Set a property
set_property("radius",[0.5])
PureData ivmi_scene
PureData ivmi_node
PureData ivmi_property
Rendering
Mono
SteamVR headsets
TODO
Android based headset
TODO