Upcoming Petri-Foo Non-Session-Support

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

Post Reply
james=jwm//art@net
Established Member
Posts: 32
Joined: Sun Apr 13, 2008 1:51 pm
Location: Canterbury, England
Contact:

Upcoming Petri-Foo Non-Session-Support

Post by james=jwm//art@net »

Hi,

I've been working on support in Petri-Foo for Non-Session-Manager and am fairly pleased with how it's looking. I'll be making a new Petri-Foo release in the next few days but if there's any non-session fans out there looking for a new toy to add and don't mind checking git branches out please take a look:

Code: Select all

git clone https://github.com/jwm-art-net/Petri-Foo.git
cd Petri-Foo
git checkout nsm-support
cmake .
make
sudo make install
Cheers.
James.
studio32

Re: Upcoming Petri-Foo Non-Session-Support

Post by studio32 »

Ah good to see interest in NSM! :)

I don't use petri-foo, but might test it

Do you use the C or C++ 'wrapper' to add nsm? Afaik there is example code in the c++ yoshimi patch and an C example in non-daw code.

edit: it seems to work ok after a short test. Afaik you implemented the saving 'restrictions' which are written in the api docs also. So it would be possible to export the session to another machine.
http://non.tuxfamily.org/nsm/API.html
Good job :)
james=jwm//art@net
Established Member
Posts: 32
Joined: Sun Apr 13, 2008 1:51 pm
Location: Canterbury, England
Contact:

Re: Upcoming Petri-Foo Non-Session-Support

Post by james=jwm//art@net »

I'm using the C nsm.h wrapper (obtained from the next branch of the non-daw git repo). Unlike the Yoshimi patch jack session is still supported too, and I've put the same (or similiar) restrictions on that too, so would be interested to hear if you think that works.

I'm not sure how to handle the external-to-session sample files however. A Petri-Foo bank file (a 'dish' file) is XML and only stores the path to a sample*. So at present you would have to manually copy samples and the bank file and probably manually edit the XML to point to the copied samples.

Perhaps an 'import samples to session' menu item which would copy any samples used by a bank into the session directory and automatically update the patch to use them instead. Then sharing of the NSM session would work, or sharing of a bank saved within an NSM session

Thanks,
James.

edit: *but otherwise yes, the save restrictions are implemented.
brummer

Re: Upcoming Petri-Foo Non-Session-Support

Post by brummer »

Hi James

I'm not a nsm user, but anyhow, I checked out your git and try the branch nsm-support.
The build fail here with:

Code: Select all

Linking C executable petri-foo
CMakeFiles/petri-foo.dir/session.c.o: In function `session_poll_nsm_events':
session.c:(.text+0x7a7): undefined reference to `lo_server_wait'
CMakeFiles/petri-foo.dir/session.c.o: In function `session_init':
session.c:(.text+0xa39): undefined reference to `lo_address_get_protocol'
session.c:(.text+0xc25): undefined reference to `lo_server_wait'
collect2: ld returned 1 exit status
make[2]: *** [gui/petri-foo] Fehler 1
make[1]: *** [gui/CMakeFiles/petri-foo.dir/all] Fehler 2
make: *** [all] Fehler 2
witch properly wouldn't surprise you. Yep, I haven’t NSM installed. :)
I just wonder if you would make the build with NSM support optional /configure depend for your release?

Otherwise, the master branch build fine here. Also petri-foo run nice.
The sample editor is great, a lot of fun to extract some samples for a loop from a "longer" file, and play them on the keyboard.

greets
hermann
james=jwm//art@net
Established Member
Posts: 32
Joined: Sun Apr 13, 2008 1:51 pm
Location: Canterbury, England
Contact:

Re: Upcoming Petri-Foo Non-Session-Support

Post by james=jwm//art@net »

Hi Hermann,
brummer wrote:Hi James

I'm not a nsm user, but anyhow, I checked out your git and try the branch nsm-support.
The build fail here with:

Code: Select all

Linking C executable petri-foo
CMakeFiles/petri-foo.dir/session.c.o: In function `session_poll_nsm_events':
session.c:(.text+0x7a7): undefined reference to `lo_server_wait'
CMakeFiles/petri-foo.dir/session.c.o: In function `session_init':
session.c:(.text+0xa39): undefined reference to `lo_address_get_protocol'
session.c:(.text+0xc25): undefined reference to `lo_server_wait'
collect2: ld returned 1 exit status
make[2]: *** [gui/petri-foo] Fehler 1
make[1]: *** [gui/CMakeFiles/petri-foo.dir/all] Fehler 2
make: *** [all] Fehler 2
witch properly wouldn't surprise you. Yep, I haven’t NSM installed. :)
I just wonder if you would make the build with NSM support optional /configure depend for your release?
Actually it does surprise me because you shouldn't need NSM installed :-) There is only one file from NSM that is required and that is nsm.h which is included in the Petri-Foo source. The only external dependency is liblo which I have made optional. Maybe your system doesn't like the way I've gone about telling CMake it needs to link to liblo. Several popular packages in Linux Audio (Ardour*, qJackctl, dssi, jack_capture) depend on liblo so I may aswell make liblo a required dependency rather than optional.

Could you try this patch out and let me know if it works for you?

Code: Select all

diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 6b13e04..6d07aac 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -7,16 +7,13 @@ include_directories (
     ${GTK2_INCLUDE_DIRS}
     ${LIBGNOMECANVAS2_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIRS}
+    ${LIBLO_INCLUDE_DIRS}
     )
 
 link_directories (
     ${GTK2_LIBRARY_DIRS}
     )
 
-if (HAVE_LIBLO)
-    link_libraries(lo)
-endif (HAVE_LIBLO)
-
 add_definitions (
     ${GTK2_CFLAGS_OTHER}
     )
@@ -24,6 +21,6 @@ add_definitions (
 add_executable(petri-foo ${PETRI_FOO_SOURCES})
 
 
-target_link_Libraries(petri-foo petrifoo petrifui pthread phin )
+target_link_Libraries(petri-foo petrifoo petrifui pthread phin lo)
 
 install (TARGETS petri-foo DESTINATION ${BINDIR})
Cheers,
James.

PS glad you enjoyed the version which worked.
brummer

Re: Upcoming Petri-Foo Non-Session-Support

Post by brummer »

Hi James

Unfortunately no,
my liblo version is 0.23-2.2

cmake .
-- Building for Release, flags: -O2
-- Found pkg-config /usr/bin/pkg-config
-- Found jack 1.9.8
-- Found alsa 1.0.25
-- Found sndfile 1.0.25
-- Found secret rabbit code 0.1.8
-- Found glib2 2.32.0
-- Found gtk2 2.24.10
-- Found libgnomecanvas2 2.30.3
-- Found libxml2 2.7.8
-- Found liblo 0.23, support for NSM will be built
-- Configuring done
-- Generating done

but it seems that liblo is missing in the linker flags, make VERBOSE=1 gives me the following flags

Code: Select all

 -ljack -lsndfile -lasound -lsamplerate -lxml2 -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lgnomecanvas-2 -lart_lgpl_2 
the full build log is attached

greets
hermann
Attachments
build_log.bz2
build-log
(3.16 KiB) Downloaded 78 times
james=jwm//art@net
Established Member
Posts: 32
Joined: Sun Apr 13, 2008 1:51 pm
Location: Canterbury, England
Contact:

Re: Upcoming Petri-Foo Non-Session-Support

Post by james=jwm//art@net »

Well it's partially linked..

Try this:

Code: Select all

sed -i "s/link_libraries(m)/link_libraries(m lo)/" CMakeLists.txt
Which distro are you using?

Thanks!
brummer

Re: Upcoming Petri-Foo Non-Session-Support

Post by brummer »

using debian/sid 32bit

Well, I have checked my lo/lo_lowlevel.h file and indeed, the missing declarations wasn't in. So I updated my liblo installation to v0.26.
In the moment I have no Idea why liblo wasn't updated during my dist-upgrades, anyhow, sorry for the noise, nice work.

Petri-Foo with Non-Session-Support builds now fine here.

greets
hermann
studio32

Re: Upcoming Petri-Foo Non-Session-Support

Post by studio32 »

james=jwm//art@net wrote:I'm using the C nsm.h wrapper (obtained from the next branch of the non-daw git repo). Unlike the Yoshimi patch jack session is still supported too, and I've put the same (or similiar) restrictions on that too, so would be interested to hear if you think that works.

I'm not sure how to handle the external-to-session sample files however. A Petri-Foo bank file (a 'dish' file) is XML and only stores the path to a sample*. So at present you would have to manually copy samples and the bank file and probably manually edit the XML to point to the copied samples.

Perhaps an 'import samples to session' menu item which would copy any samples used by a bank into the session directory and automatically update the patch to use them instead. Then sharing of the NSM session would work, or sharing of a bank saved within an NSM session.
Afaik the idea of nsm is that all the files needed are in the session folder, so then the sample would be automatically copied to the nsm session dir?!? Afaik import to session is meant for session files.
james=jwm//art@net
Established Member
Posts: 32
Joined: Sun Apr 13, 2008 1:51 pm
Location: Canterbury, England
Contact:

[ann] out now petri-foo 0.1.85

Post by james=jwm//art@net »

bumpity bump:

Code: Select all

Petri-Foo, the fork of the soft-sampler known as Specimen, has a new
release, 0.1.85, available:

http://sourceforge.net/projects/petri-foo/files/Source/petri-foo-0.1.85.tar.bz2/download


This new release brings two and a half new features with it:


(1.0) Non Session Management support
(2.0) 'Full Save' functionality
(2.5) Import



(1.0) NSM support can only be built if the system has liblo installed.
      If liblo (the lightweight OSC implementation) is _not_ installed
      petri-foo will be built _without_ NSM support.

(2.0) "Full Save" functionality increases the portability of Petri-Foo's
      'dish files'. A dir is created (the bank dir) containing the dish
      file along with symlinks to external samples used. the bank dir
      can then be archived using `tar -h`.

      To use full save, just select 'full save as' instead of 'save as'
      from the file menu. Selecting 'save' will do the right thing after
      doing so.

(2.5) The import function is very self explanatory: it loads a dish file
      without deleting the existing patches.



http://sourceforge.net/projects/petri-foo/files/Source/petri-foo-0.1.85.tar.bz2/download


Further resources:
http://petri-foo.sourceforge.net
https://sourceforge.net/tracker/?group_id=404816
http://lists.sourceforge.net/lists/listinfo/petri-foo-devel
http://github.com/jwm-art-net/Petri-Foo


Cheers,
James.

Post Reply