Skip to content

Commit

Permalink
[sh4lt] Implementation of input and output devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Bouillot committed Aug 1, 2024
1 parent 14a88c8 commit 4d27d42
Show file tree
Hide file tree
Showing 16 changed files with 834 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@
[submodule "cmake/Deployment/Linux/Flatpak/shared-modules"]
path = cmake/Deployment/Linux/Flatpak/shared-modules
url = https://github.com/flathub/shared-modules
[submodule "3rdparty/sh4lt"]
path = 3rdparty/sh4lt
url = https://gitlab.com/sh4lt/sh4lt
7 changes: 4 additions & 3 deletions 3rdparty/3rdparty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ endfunction()

include(3rdparty/dspfilters.cmake)
include(3rdparty/gamma.cmake)
include(3rdparty/r8brain.cmake)
include(3rdparty/mimalloc.cmake)
include(3rdparty/snappy.cmake)
include(3rdparty/libsimpleio.cmake)
include(3rdparty/mimalloc.cmake)
include(3rdparty/r8brain.cmake)
include(3rdparty/sh4lt.cmake)
include(3rdparty/shmdata.cmake)
include(3rdparty/snappy.cmake)
include(3rdparty/sndfile.cmake)
1 change: 1 addition & 0 deletions 3rdparty/sh4lt
Submodule sh4lt added at db0f81
41 changes: 41 additions & 0 deletions 3rdparty/sh4lt.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
if(NOT UNIX)
return()
endif()

if(EMSCRIPTEN OR BSD)
return()
endif()

if(SCORE_USE_SYSTEM_LIBRARIES)
find_package(sh4lt GLOBAL)
else()
add_library(sh4lt STATIC
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/cfollower.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/clogger.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/cshtype.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/c/cwriter.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/follower.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/infotree/information-tree.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/infotree/json-serializer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/infotree/key-val-serializer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/file-monitor.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/reader.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/sysv-sem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/sysv-shm.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/unix-socket-client.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/unix-socket-protocol.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/unix-socket-server.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/ipcs/unix-socket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/jsoncpp/jsoncpp.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/shtype/shtype-from-gst-caps.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/shtype/shtype.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/time.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/utils/any.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/utils/bool-log.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/utils/safe-bool-log.cpp"
"${CMAKE_CURRENT_LIST_DIR}/sh4lt/sh4lt/writer.cpp"
)

# target_compile_options(sh4lt PUBLIC -DSH4LT_VERSION_STRING="1.3.60" )
target_include_directories(sh4lt PUBLIC "${CMAKE_CURRENT_LIST_DIR}/sh4lt")
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[**ossia score**](https://ossia.io) is a ***sequencer*** for audio-visual artists, designed to create ***interactive*** shows.

Sequence **OSC, MIDI, DMX, sound, video** and more, between multiple software and hardware. Create ***interactive*** and ***intermedia*** scores, ***script*** and ***live-code*** with JavaScript, [ISF Shaders](https://isf.video), [Faust](https://faust.grame.fr), PureData or C++. Leverage IoT protocols such as CoAP or MQTT, interact with joysticks, Wiimotes, Leapmotions, Web APIs and BLE sensors and integrate programs from a wealth of creative programming languages such as [Structure Synth](https://structuresynth.sourceforge.net/), [Context-Free Art](https://www.contextfreeart.org/) and [Bytebeat](https://dollchan.net/bytebeat/). Load any kind of audio or video format and process visuals through Spout, Syphon, NDI or Shmdata.
Sequence **OSC, MIDI, DMX, sound, video** and more, between multiple software and hardware. Create ***interactive*** and ***intermedia*** scores, ***script*** and ***live-code*** with JavaScript, [ISF Shaders](https://isf.video), [Faust](https://faust.grame.fr), PureData or C++. Leverage IoT protocols such as CoAP or MQTT, interact with joysticks, Wiimotes, Leapmotions, Web APIs and BLE sensors and integrate programs from a wealth of creative programming languages such as [Structure Synth](https://structuresynth.sourceforge.net/), [Context-Free Art](https://www.contextfreeart.org/) and [Bytebeat](https://dollchan.net/bytebeat/). Load any kind of audio or video format and process visuals through Spout, Syphon, NDI, Shmdata or Sh4lt.

Free, open source and runs on desktop, mobile, web and embedded, down to Raspberry Pi Zero 2.

Expand Down
1 change: 1 addition & 0 deletions ci/tarball.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" >
rm -rf 3rdparty/quickcpplib/doc
rm -rf 3rdparty/quickcpplib/pcpp
rm -rf 3rdparty/shmdata/doc
rm -rf 3rdparty/sh4lt/doc
rm -rf 3rdparty/snappy/third_party
rm -rf 3rdparty/snappy/testdata
rm -rf 3rdparty/DSPFilters/DSPFiltersDemo
Expand Down
2 changes: 1 addition & 1 deletion cmake/Deployment/Linux/ossia-score.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<li>Leverage IoT protocols such as CoAP or MQTT for industrial-grade automation.</li>
<li>Interact with joysticks, Wiimotes, Leapmotions, Web APIs and BLE sensors.</li>
<li>Integrate programs from a wealth of creative programming languages such as Structure Synth, Context-Free Art and Bytebeat.</li>
<li>Load any kind of audio or video format and process visuals through Spout, Syphon, NDI or Shmdata.</li>
<li>Load any kind of audio or video format and process visuals through Spout, Syphon, NDI, Shmdata or Sh4lt.</li>
</ul>
</description>
<launchable type="desktop-id">io.ossia.score.desktop</launchable>
Expand Down
1 change: 1 addition & 0 deletions cmake/ScoreFeatureCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ if(UNIX AND NOT APPLE AND NOT WIN32 AND NOT EMSCRIPTEN)
score_assert_plugin(score-plugin-lv2)
score_assert_feature(pipewire)
score_assert_feature(shmdata)
score_assert_feature(sh4lt)
score_assert_feature(v4l2)
endif()

Expand Down
1 change: 1 addition & 0 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ if(NOT _score_license_written)
AddLicenseFile(license_text rubberband "${OSSIA_3RDPARTY_FOLDER}/rubberband/COPYING")
AddLicenseFile(license_text servus "${OSSIA_3RDPARTY_FOLDER}/Servus/LICENSE.txt")
AddLicenseFile(license_text shmdata "${CMAKE_SOURCE_DIR}/3rdparty/shmdata/LICENSE.md")
AddLicenseFile(license_text sh4lt "${CMAKE_SOURCE_DIR}/3rdparty/sh4lt/LICENSE.md")
AddLicenseFile(license_text span "${OSSIA_3RDPARTY_FOLDER}/span/LICENSE_1_0.txt")
AddLicenseFile(license_text spout "${CMAKE_SOURCE_DIR}/3rdparty/Spout/LICENSE")
AddLicenseFile(license_text syphon "${CMAKE_SOURCE_DIR}/3rdparty/Syphon-Framework/License.txt")
Expand Down
3 changes: 2 additions & 1 deletion src/lib/core/presenter/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ AboutDialog::AboutDialog(QWidget* parent)
"Based on https://github.com/HBPVIS/Servus\n", servus_LICENSE};

map["shmdata"] = License{"https://gitlab.com/sat-metalab/shmdata", shmdata_LICENSE};
map["sh4lt"] = License{"https://gitlab.com/sh4lt/sh4lt", sh4lt_LICENSE};
#if defined(_WIN32)
map["Spout"] = License{"https://spout.zeal.co/", spout_LICENSE};
#endif
Expand Down Expand Up @@ -262,7 +263,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[=, m = std::move(map)](const QString& currentText) {
auto& lic = m.at(currentText);
license->setPlainText(lic.url + "\n\n" + lic.header + "\n" + lic.license);
});
});
#endif
}

Expand Down
19 changes: 19 additions & 0 deletions src/plugins/score-plugin-gfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,25 @@ if(TARGET shmdata)
list(APPEND SCORE_FEATURES_LIST shmdata)
endif()

if(TARGET sh4lt)
target_sources(${PROJECT_NAME}
PRIVATE
Gfx/Sh4lt/Sh4ltInputDevice.hpp
Gfx/Sh4lt/Sh4ltInputDevice.cpp
Gfx/Sh4lt/Sh4ltOutputDevice.hpp
Gfx/Sh4lt/Sh4ltOutputDevice.cpp
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
sh4lt
)
target_compile_definitions(${PROJECT_NAME}
PRIVATE
SCORE_HAS_SH4LT
)
list(APPEND SCORE_FEATURES_LIST sh4lt)
endif()

if(APPLE)
find_library(QuartzCore_FK QuartzCore)
find_library(AppKit_FK AppKit)
Expand Down
Loading

0 comments on commit 4d27d42

Please sign in to comment.