Swami: SoundFont Editor
Contingut
Documentació
- The Art of Soundfont (www.virtualorgan.com/FileLib/TheArtOfSoundfont.PDF) Fitxer:TheArtOfSoundfont.PDF
- Introduction to SoundFonts: http://smurf.sourceforge.net/sfont_intro.php
- How to build a back of soundfonts (amb Vienna): http://www.tweakheadz.com/SoundFont_Secrets.html
- The Secrets of Great Sounding Samples: http://www.tweakheadz.com/Sampling_Tips.html
- What are Software Samplers?: http://www.tweakheadz.com/software_samplers.htm
- README_SWAMI.txt (és el README del CVS del Swami): Fitxer:README SWAMI.txt
Swami Instrument Editor
Ve del projecte Smurf, i és l'equivalent en el món Linux del Vienna (món Windows).
Per instal.lar el Swami Instrument Editor:
$ sudo apt-get install swami
o millor instal.lar-ho des de les fonts, i així tinc la documentació oficial:
http://swami.resonance.org/trac/wiki/SwamiInstall
A l'instal.lar-lo sobre el Jaunty Desktop em dóna un error al fer el ./configure:
checking for GUI... configure: error: Package requirements (gtk+-2.0 >= 2.6 librsvg-2.0 >= 2.8 libgnomecanvas-2.0 >= 2.0) were not met: No package 'librsvg-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GUI_CFLAGS and GUI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
Ho he solucionat amb el synaptic, reinstal.lant el paquet librsvg2-2, i instal.lant el paquet librsvg2-dev, i fent:
export PKG_CONFIG_PATH=/usr/bin/pkg-config echo $PKG_CONFIG_PATH
Envio un mail a jgreen@users.sourceforge.net:
Sorry for asking you directly, but you suggest to do that in the instructions INSTALL file of swami. I'm trying to install swami from sources directly. I can execute swami from Ubuntu Studio or installing directly in Ubuntu Desktop (apt-get install swami), but the screenshots in http://swami.resonance.org/trac/screenshots are quite diferent and fancy. In the other hand, I want a step-by-step or how-to manual to swami. Apparently this exist in /doc from CVS (sgml format?). I have a Ubuntu Studio Jaunty (clean installation). In my first attempt, ./configure fails: checking for GUI... configure: error: Package requirements (gtk+-2.0 >= 2.6 librsvg-2.0 >= 2.8 libgnomecanvas-2.0 >= 2.0) were not met: No package 'librsvg-2.0' found I reinstalled librsvg2-2 and installed librsvg2-dev, and set export PKG_CONFIG_PATH=/usr/bin/pkg-config, and this solves my problem. No configure has just one error: config.status: WARNING: 'po/Makefile.in.in' seems to ignore the --datarootdir setting ... config.status: error: po/Makefile.in.in was not created by intltoolize. make has de same error, but finishes successfully, and make install finishes successfully. Apparently everything was OK, but I can't found swami nowhere. In the other hand, I want to ask if exist a how-to or step-by-step introducing swami. PD. Now I realize that README file has an introductory explanation. Thanks in advance, Joan Quintana
Puc trobar mostres gratuïtes d'instruments a http://freewavesamples.com/
En qualsevol cas, torno a instal.lar el swami des del repositoris d'Ubuntu. Si crido swami des de la consola, se m'obre la versió 0.9.4 (GUI antiga). Si obro des del menú d'aplicacions, tinc la GUI nova (versió 2.0.0). I és que per invocar-lo per la consola no és swami sinó swami-2
Pas a pas: crear un soundfont per al xaphoon
L'objectiu és crear un soundfont de prova, joan_xap_rec_har.sf2, que constarà de tres instruments: el xaphoon, una flauta dolça, i una harmònica.
Creem les mostres
Amb el Edirol i el micròfon, creo les mostres. Les mostres hauran de tenir un bon nivell de senyal. Això ho comprovaré quan estigui en el swami. Per a mi, el Do Central (60) és el C4. Però ja veurem que el criteri del swami és dir-li C3.
Recorder (flauta) arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_C4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_E4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_G4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_C5_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_E5_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX recorder_G5_L.wav xaphoon arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_C4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_E4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_G4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_C5_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_E5_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX xaphoon_G5_L.wav harmònica arecord -r 44100 -f cd -t wav -D plughw:UA25EX harmonica_C4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX harmonica_E4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX harmonica_G4_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX harmonica_C5_L.wav arecord -r 44100 -f cd -t wav -D plughw:UA25EX harmonica_E5_L.wav
Per comprovar que funciona:
$ aplay -v -D plughw:UA25EX foobar.wav
Swami: afegim les mostres
Segueixo una filosofia bottom-top: primer importo les samples. Després creo els instruments. Associo els instruments a les samples. Després creo els presets (programes MIDI). Associo els instruments als presets.
El README diu:
To add zones to an Instrument hold down the CTRL key and select the samples you want to be added (SHIFT works too for selecting a range of items). (Fer Ctrl-C, copiar). Then "Right Click" the Instrument you want to add the samples to. Select "Paste" from the pop up menu. A zone will be created for each Sample (or Instrument zone) you selected. This same procedure can be applied to Presets using Instruments as zones. To create a "Global Zone", "Right Click" on the Preset or Instrument you want to create the zone under. Select "Global Zone" from the pop up menu. Global Zones are used to set "Default" generator (and modulator) parameters that the other zones don't already have set.
primer de tot afegeixo les samples. El primer que he de fer és dir per a cada mostra quina és la nota arrel. Per exemple, si una mostra l'he anomenat C4, la nota arrel és 60. Aleshores veuré com en la pestanya FFTune m'apareix C3 (el swami té un altre criteri).
He d'editar les samples. Les mostres han de tenir un bon nivell de senyal, i he d'eliminar el silenci al principi.
Em falta solucionar tot el tema d'editar una sample, que no s'entén bé com és la usabilitat. Evidentment, en l'inici del sample no ha d'haver-hi cap silenci.
Notes: les mostres que he agafat en primera instància, comparats amb els nivells d'altres mostres que puc veure en altres soundfonts, són molt baixes. Per tant, he d'aconseguir unes mostres amb suficient nivell. Recordar també que de moment estic grabant les mostres per un sol canal (L). Solució: es tracta de tocar més fort, i augmentar la sensibilitat del micròfon amb el botó SENS de l'Edirol.
- Compte perquè hi ha un lio. El swami considera que el Do Central (midi=60) és el C3, quan molta documentació li assigna el C4. L'assignació de les octaves és, doncs, relativa. Jo mantinc el meu criteri que el Do Central (60) és el C4 (vol dir quarta octava). Per a una mostra de Do Central, en la pestanya FTune del swami, quan fa l'anàlisi espectral de les mostres, li assigna C3 (que és el criteri que el swami pren). Per tant, és correcte, i només és una qüestió de notació.
- Note: The MIDI specification only defines note number 60 as "Middle C", and all other notes are relative. The absolute octave number designations shown here are based on Middle C = C4, which is an arbitrary assignment.
- Make sure all your wave files have their gain optimized.
- Tuning is probably the biggest problem with SoundFonts. Get it right at the sample level.
Otherwise you will be retuning all your instruments that use the ill-tuned sample. While the SF2 format allows for micro adjustments to tuning you will get pissed when you find you always have to retune a certain sample 15-30 times at the instrument level because you neglected to do it at the beginning. Always keep a synth fired up as reference for tuning. A typical piano patch works well.
- Loop nearly all your samples.
Swami: afegim els instruments
Creo tres instruments: xaphoon, recorder i harmonica. Selecciono les mostres de xaphoon, i faig Ctrl-C. Selecciono l'instrument xaphoon, i faig paste: les mostres s'han d'associar a aquest instrument. El mateix per als altres.
Aleshores, per a cada instrument, he d'editar les zones. Això es fa molt fàcilment amb el ratolí. A cada mostra li assigno la seva zona preferencial. Les notes extremes les hauré de fer anar fins als extrems.
- Make sure you have enough samples to cover the entire keyboard. Perhaps the only troublesome part of the sf2 format is that samples do not stretch as far as they do on a professional sampler. For example, if your sample has a root note of C3, and you try to stretch it to cover the keyboard, you will find that the sample will detune at and play the same out of tune pitch at about A6 and higher.
- for high quality instrument emulations, you may need a sample every 4-12 notes, depending on the instrument you are emulating.
Swami: afegim els presets
Creo tres Melodic Presets, un per a cada instrument. Selecciono un instrument (Ctrl-C), i amb el botó dret faig paste en el preset, i aleshores ja queda associat l'instrument al preset. El mateix per als altres.
Ja puc gravar el fitxer. Molt de compte al gravar perquè no és gens intuïtiu. Gravaré el fitxer a /home/joan/soundfonts/joan/joan_xap_rec_har.sf2
provant el soundfont
Finalment, provem el nostre soundfont:
$ fluidsynth -a jack -m alsa_seq /home/joan/soundfonts/joan/joan_prova.sf2 > channels > settings
Obro el vkeybd, i en el Jack estableixo una connexió del vkeybd al fluidsynth. Associo el fluidsynth a la tarja de so (system). Ja puc escoltar. Amb el vkeybd puc seleccionar el canal i el program list, i així puc escoltar les tres veus. Recordem que: canal 0 amb programa 0; canal 1 amb programa 1; canal 2 amb programa 2.
swami v2.0
S'està treballant intensament en la versió 2.0 (octubre 2010), amb moltes millores. Es pot baixar la versió des del subversion, però no m'ha sortit la compilació de la llibreria libinstpatch.
Swami 2.0 is currently under development and has not yet been officially released. These instructions are provided for those who wish to preview and test the current development code.
$ sudo apt-get install subversion build-essential automake libtool gtk-doc-tools libgtk2.0-dev libaudiofile-dev python-gtk2-dev librsvg2-dev libgnomecanvas2-dev libglade2-dev fftw3-dev $ mkdir swami20 $ cd swami20 $ svn co https://swami.svn.sourceforge.net/svnroot/swami/trunk/libinstpatch $ svn co https://swami.svn.sourceforge.net/svnroot/swami/trunk/swami
Finalment ja ha sortit la versió 2.0:
I'm am extremely happy to announce the release of Swami 2.0.0 "Sounds of Celebration" and libinstpatch 1.0.0. This is the result of an 8+ year development cycle and marks the first release in the Swami 2.0 series. While this should be considered a beta release, it is well underway to being a powerful instrument editor and manager. Features: - Support for SoundFont format including 24 bit samples - FluidSynth soft synthesizer for audio synthesis - GTK2 based program with GObject oriented libraries for use in other applications - Loop finder and FFTune plugin for semi automated looping and sample tuning - Overlapping loop point viewer to help with creating seamless loops Currently semi functional: - Python binding. - Other instrument formats (DLS and GigaSampler), still rather incomplete though. Credits for this release: - Christian Collins for his generous contribution, testing, feature requests and support in getting this released! - Ebrahim Mayat for his continued testing on Mac OSX. - Luis Garrido for the Loop Finder algorithm and interest in this feature. - Element Green for everything else.
Instal.lació
S'ha d'instal.lar la llibreria libinstpatch-1.0.0.tar.gz i l'aplicació pròpiament dit: swami-2.0.0.tar.gz
$ tar xvzf libinstpatch-1.0.0.tar.gz $ cd libinstpatch-1.0.0/ $ ./autogen.sh $ ./configure $ make $ sudo make install
$ tar xvzf swami-2.0.0.tar.gz $ cd swami-2.0.0/ $ ./configure $ make ... /usr/bin/ld: widgets/.libs/libwidgets.a(combo-box.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC $ ./configure --with-pic $ make /usr/bin/ld: widgets/.libs/libwidgets.a(combo-box.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
Envio un mail al desenvolupador:
I think I likely fixed the issue you were having. If you are wiling to checkout the latest from subversion I just committed some changes to swami which should fix that build issue. There was a static library being linked with the final swamigui library. I removed that so that it just builds the object files into libswamigui instead of first linking them in a static library and then into the final shared library. Thanks for reporting this! Element On Tue, Oct 26, 2010 at 11:15 AM, Element Green <element1green@gmail.com> wrote: > Hello Juan, > > On Tue, Oct 26, 2010 at 4:48 AM, Joan Quintana <joan_quintana@yahoo.com> wrote: >> Josh, >> thanks for this new-awaited release of Swami. >> >> I'm trying to compile. libinstpatch compilation was perfect, but swami-2.0.0: >> >> $ ./configure --with-pic >> $ make >> /usr/bin/ld: widgets/.libs/libwidgets.a(combo-box.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC >> >> I think is something related with my 64 bits system (Ubuntu 10.04 Desktop 64 bits). >> > > > From doing a search on the Internet, it does indeed seem to be 64 bit > related. I know I've futzed around with -fPIC in the past. I'm not > yet sure the proper way to fix this in the build system. Could you > send me the config.log from the swami build folder? It might be that > swami/src/swamigui/widgets/.libs/libwidgets.a is not getting built > with -fPIC. > > >> My intention is to use swami to create a soundfont for the zambomba instrument (http://es.wikipedia.org/wiki/Zambomba), and then to build a zambomba midi controller. It's just a funny project. >> > > > That sounds like an interesting instrument to create a SoundFont from > :) Are you going to distribute it when you're done? I'd like to hear > it. > > >> Joan Quintana >> www.joanillo.org >> > > Cheers, > Element Green >
Finalment m'ho instal.lo del SVN, i compila bé.
cd ~/swami-2.0.0b # Example location to checkout source code into svn co https://swami.svn.sourceforge.net/svnroot/swami/trunk/libinstpatch svn co https://swami.svn.sourceforge.net/svnroot/swami/trunk/swami $ sudo apt-get install subversion build-essential automake libtool gtk-doc-tools libgtk2.0-dev libsndfile1-dev python-gtk2-dev librsvg2-dev libgnomecanvas2-dev libglade2-dev fftw3-dev
Build and install libInstPatch library:
cd libinstpatch # Append the version number if building from a source archive ./autogen.sh # Only needed when building from SVN ./configure make sudo make install
Build and install Swami:
cd ../swami # Append the version number if building from a source archive ./autogen.sh # Only needed when building from SVN ./configure make sudo make install
I ara executo però dóna un error:
$ swami swami: error while loading shared libraries: libswamigui.so.0: cannot open shared object file: No such file or director lt-swami: error while loading shared libraries: libinstpatch-1.0.so.0: cannot open shared object file: No such file or directory
Aquest error és genèric de compilació de Linux.
A fairly typical scenario when installing software that does not come fro the distribution package manager is to install an application and find that it cannot find a library necessary to run, although the library is definitely installed. I recently ran into this issue when compiling spine on an old Debian Sarge system.
$ whereis libswamigui* libswamigui: /usr/local/lib/libswamigui.a /usr/local/lib/libswamigui.la /usr/local/lib/libswamigui.so libswamigui: /usr/local/lib/libswamigui.a /usr/local/lib/libswamigui.la /usr/local/lib/libswamigui.so libswamigui: /usr/local/lib/libswamigui.a /usr/local/lib/libswamigui.la /usr/local/lib/libswamigui.so libswamigui.so: /usr/local/lib/libswamigui.so.0 /usr/local/lib/libswamigui.so libswamigui.so.0.0: /usr/local/lib/libswamigui.so.0.0.0
Les llibreries es troben i els softlinks estan ben fets:
$ cd /usr/local/lib/ $ ls -la libswamigui* -rw-r--r-- 1 root root 3851092 2010-10-26 23:42 libswamigui.a -rwxr-xr-x 1 root root 1633 2010-10-26 23:42 libswamigui.la lrwxrwxrwx 1 root root 20 2010-10-26 23:42 libswamigui.so -> libswamigui.so.0.0.0 lrwxrwxrwx 1 root root 20 2010-10-26 23:42 libswamigui.so.0 -> libswamigui.so.0.0.0 -rwxr-xr-x 1 root root 1641919 2010-10-26 23:42 libswamigui.so.0.0.0
The problem was that I did not have the mysql library directory included in /etc/ld.so.conf or /etc/ld.so.conf.d. To fix the problem, I added the mysql library path to /etc/ld.so.conf and re-ran ldconfig using sudo. #/etc/ld.so.conf/usr/local/lib/sasl2 /usr/local/lib /lib /usr/lib /usr/lib/atlas /usr/local/mysql-5.0.45-linux-i686/lib
El meu problema és que en el fitxer /etc/ld.so.conf, no sé perquè, no hi ha les entrades genèriques (només hi havia include /etc/ld.so.conf.d/*.conf):
/usr/local/lib /lib /usr/lib
Les fico i faig:
$ sudo ldconfig
ldconfig(8) ldconfig(8)
NAME
ldconfig - configure dynamic linker run-time bindings
i ja puc executar swami sense problemes.
Instal.lació novembre 2013
sudo add-apt-repository ppa:jgreen-users/element sudo apt-get update sudo apt-get install swami
creat per Joan Quintana Compte, maig 2009, octubre 2010, novembre 2013