Re: [LAD] GuitarSynth now as lv2/vst ..
Am 29.04.2015 um 13:50 schrieb Gerald: Hi The lv2 version of GuitarSynth is working, thanks to falktx's DPF. Get it from https://github.com/geraldmwangi/GuitarSynth-DPF.git if you like. I'll release (post to LAU) it with bugfixes on the weekend. Lg Gerald ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev Hi Gerald Nice Project For your README/ build instruction you should add the following commands before make: cd ./GuitarSynth-DPF git submodule init git submodule update regards hermann ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
[LAD] mixing music and sound effects using libao
I've been playing around with libsndfile, libvorbisfile, libmodplug, and libao to provide background music and sound effects for a game engine. I have a solid handle on making one noise at a time, but I don't understand mixing. At first I thought I would have to write my own mixer and handle the channels, sample rate, and sample size issues myself. I really don't want to have to do that. Then I noticed in the libao documentation that nothing says that I cannot spawn two threads, each of which calls ao_open_live() and ao_play() on different sound files. Indeed, the docs for ao_initialize() seem to suggest this can be done with the statement that it be called in the main thread. I tried this and it works so erratically that I'm not sure libao was written with this in mind. I get these results in order of likelihood: 1) Segmentation fault 2) *** glibc detected *** ./threadtest7: malloc(): memory corruption (fast): 0x01bc5390 *** Bus error 3) *** glibc detected *** ./threadtest7: double free or corruption (out): 0x018ba2e0 *** 4) A bit of the first file, then the second file. 5) Only the second file. 6) Both files messily mixed with a zipping noise. (very rare) Is libao in fact intentionally capable of doing this? If not, what are my options for mixing music and sound effects? I really don't want to use SDL_mixer for a variety of reasons, chiefly because my program is terminal-only. Virtual beer if you can guess what the program is. -- David Griffith d...@661.org A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] mixing music and sound effects using libao
Am 30.04.2015 um 10:41 schrieb d...@661.org: I've been playing around with libsndfile, libvorbisfile, libmodplug, and libao to provide background music and sound effects for a game engine. I have a solid handle on making one noise at a time, but I don't understand mixing. At first I thought I would have to write my own mixer and handle the channels, sample rate, and sample size issues myself. I really don't want to have to do that. Then I noticed in the libao documentation that nothing says that I cannot spawn two threads, each of which calls ao_open_live() and ao_play() on different sound files. Indeed, the docs for ao_initialize() seem to suggest this can be done with the statement that it be called in the main thread. I tried this and it works so erratically that I'm not sure libao was written with this in mind. I get these results in order of likelihood: 1) Segmentation fault 2) *** glibc detected *** ./threadtest7: malloc(): memory corruption (fast): 0x01bc5390 *** Bus error 3) *** glibc detected *** ./threadtest7: double free or corruption (out): 0x018ba2e0 *** 4) A bit of the first file, then the second file. 5) Only the second file. 6) Both files messily mixed with a zipping noise. (very rare) Is libao in fact intentionally capable of doing this? If not, what are my options for mixing music and sound effects? I really don't want to use SDL_mixer for a variety of reasons, chiefly because my program is terminal-only. Virtual beer if you can guess what the program is. Hi It seems libao is able to do this. Attached is the example code from the libao side, roughly hacked in a second thread to play to signals simultaneous. Works stable here. regards hermann /* * * ao_example.c * * Written by Stan Seibert - July 2001 * * Legal Terms: * * This source file is released into the public domain. It is * distributed without any warranty; without even the implied * warranty * of merchantability or fitness for a particular * purpose. * * Function: * * This program opens the default driver and plays a 440 Hz tone for * one second. * * Compilation command line (for Linux systems): * * gcc -o ao_example ao_example.c -lao -ldl -lm -lpthread * */ #include stdio.h #include string.h #include ao/ao.h #include math.h #include pthread.h #define BUF_SIZE 4096 /* struct to hpold info for second thread */ struct pass_ptr { ao_device *device2; ao_sample_format format2; }; /* function called by second thread */ void *play2(void *play_ptr) { char *buffer2; int buf_size2; int sample2; float freq2 = 120.0; int i2; struct pass_ptr *play = (struct pass_ptr*) play_ptr; /* -- Fill buffer -- */ buf_size2 = play-format2.bits/8 * play-format2.channels * play-format2.rate; buffer2 = calloc(buf_size2, sizeof(char)); for (i2 = 0; i2 play-format2.rate; i2++) { sample2 = (int)(0.75 * 32768.0 * sin(2 * M_PI * freq2 * ((float) i2/play-format2.rate))); /* Put the same stuff in left and right channel */ buffer2[4*i2] = buffer2[4*i2+2] = sample2 0xff; buffer2[4*i2+1] = buffer2[4*i2+3] = (sample2 8) 0xff; } /* play from second thread */ ao_play(play-device2, buffer2, buf_size2); } int main(int argc, char **argv) { ao_device *device; ao_sample_format format; int default_driver; char *buffer; int buf_size; int sample; float freq = 360.0; int i; int default_driver2; pthread_t play2_thread; struct pass_ptr play_ptr; /* -- Initialize -- */ fprintf(stderr, libao example program\n); ao_initialize(); /* -- Setup for default driver -- */ default_driver = ao_default_driver_id(); memset(format, 0, sizeof(format)); format.bits = 16; format.channels = 2; format.rate = 44100; format.byte_format = AO_FMT_LITTLE; /* -- Open first device -- */ device = ao_open_live(default_driver, format, NULL /* no options */); if (device == NULL) { fprintf(stderr, Error opening device.\n); return 1; } memset(play_ptr.format2, 0, sizeof(play_ptr.format2)); play_ptr.format2.bits = 16; play_ptr.format2.channels = 2; play_ptr.format2.rate = 44100; play_ptr.format2.byte_format = AO_FMT_LITTLE; /* -- Open second device -- */ play_ptr.device2 = ao_open_live(default_driver, play_ptr.format2, NULL /* no options */); if (play_ptr.device2 == NULL) { fprintf(stderr, Error opening device2.\n); return 1; } /* create second thread to play, pass struct pointer with device and format info */ if(pthread_create(play2_thread, NULL, play2, play_ptr)) { fprintf(stderr, Error creating thread\n); return 1; } /* -- Fill buffer with stuff -- */ buf_size = format.bits/8 * format.channels * format.rate; buffer = calloc(buf_size, sizeof(char)); for (i = 0; i format.rate; i++) { sample = (int)(0.75 * 32768.0 * sin(2 * M_PI * freq * ((float) i/format.rate))); /* Put the same stuff in left and right channel */ buffer[4*i] = buffer[4*i+2] = sample
[LAD] [ANN] Vee One Suite 0.6.2 - A fifth beta release
Howdy, The 'Vee One Suite' of 'old-school' software instruments, aka. the 'gang of three' have bumped over another tiny notch: synthv1 [1], as one polyphonic synthesizer, samplv1 [2], a polyphonic sampler and drumkv1 [3], as one drum-kit sampler, are now being released to the masses. Again ;) There's no big audible changes, if any at all, yet this fifth beta release is rather a probale bug fix drumkv1 LV2 on Ardour. Anyway, it's all gone as follows: - Sample file path mapping has been fixed for LV2 plugin state restoration, which were preventing Ardour to reload any of the saved session or preset sample files in particular (re. drumkv1 only). - Custom knob/dial behavior mode options are now introduced: linear and angular (aka. radial) as far to avoid abrupt changes on first mouse click (still the default behavior). - Fixed for some strict tests for Qt4 vs. Qt5 configure builds. We're still available in dual form, as business as usual: - a pure stand-alone JACK [4] client with JACK-session, NSM [5] (Non Session management) and both JACK MIDI and ALSA [6] MIDI input support; - a LV2 [7] instrument plug-in. Enough to tell, the Vee One Suite are free and open-source Linux Audio software, distributed under the terms of the GNU General Public License (GPL) [8] version 2 or later. As always, have (lots of) fun :) **synthv1 - an old-school polyphonic synthesizer [1]** synthv1 0.6.2 (fifth official beta) is now released! synthv1 is an old-school all-digital 4-oscillator subtractive polyphonic synthesizer with stereo fx. LV2 URI: http://synthv1.sourceforge.net/lv2 website: http://synthv1.sourceforge.net downloads: http://sourceforge.net/projects/synthv1/files - source tarball: http://download.sourceforge.net/synthv1/synthv1-0.6.2.tar.gz - source package: http://download.sourceforge.net/synthv1/synthv1-0.6.2-21.rncbc.suse132.src.rpm - binary packages: http://download.sourceforge.net/synthv1/synthv1-0.6.2-21.rncbc.suse132.i586.rpm http://download.sourceforge.net/synthv1/synthv1-0.6.2-21.rncbc.suse132.x86_84.rpm **samplv1 - an old-school polyphonic sampler [2]** samplv1 0.6.2 (fifth official beta) is now released! samplv1 is an old-school polyphonic sampler synthesizer with stereo fx. LV2 URI: http://samplv1.sourceforge.net/lv2 website: http://samplv1.sourceforge.net downloads: http://sourceforge.net/projects/samplv1/files - source tarball: http://download.sourceforge.net/samplv1/samplv1-0.6.2.tar.gz - source package: http://download.sourceforge.net/samplv1/samplv1-0.6.2-21.rncbc.suse132.src.rpm - binary packages: http://download.sourceforge.net/samplv1/samplv1-0.6.2-21.rncbc.suse132.i586.rpm http://download.sourceforge.net/samplv1/samplv1-0.6.2-21.rncbc.suse132.x86_84.rpm **drumkv1 - an old-school drum-kit sampler [3]** drumkv1 0.6.2 (fifth official beta) is now released! drumkv1 is an old-school drum-kit sampler synthesizer with stereo fx. LV2 URI: http://drumkv1.sourceforge.net/lv2 website: http://drumkv1.sourceforge.net downloads: http://sourceforge.net/projects/drumkv1/files - source tarball: http://download.sourceforge.net/drumkv1/drumkv1-0.6.2.tar.gz - source package: http://download.sourceforge.net/drumkv1/drumkv1-0.6.2-17.rncbc.suse132.src.rpm - binary packages: http://download.sourceforge.net/drumkv1/drumkv1-0.6.2-17.rncbc.suse132.i586.rpm http://download.sourceforge.net/drumkv1/drumkv1-0.6.2-17.rncbc.suse132.x86_84.rpm References: [1] synthv1 - an old-school polyphonic synthesizer http://synthv1.sourceforge.net/ [2] samplv1 - an old-school polyphonic sampler http://samplv1.sourceforge.net/ [3] drumkv1 - an old-school drum-kit sampler http://drumkv1.sourceforge.net/ [4] JACK Audio Connection Kit http://jackaudio.org/ [5] NSM, Non Session Management http://non.tuxfamily.org/nsm/ [6] ALSA, Advanced Linux Sound Architecture http://www.alsa-project.org/ [7] LV2, Audio Plugin Standard, the extensible successor of LADSPA http://lv2plug.in/ [8] GNU General Public License http://www.gnu.org/copyleft/gpl.html See also: http://www.rncbc.org/drupal/node/886 Enjoy keep the fun ;) -- rncbc aka. Rui Nuno Capela ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] mixing music and sound effects using libao
Am 01.05.2015 um 00:17 schrieb d...@661.org: On Thu, 30 Apr 2015, Hermann Meyer wrote: Am 30.04.2015 um 10:41 schrieb d...@661.org: I've been playing around with libsndfile, libvorbisfile, libmodplug, and libao to provide background music and sound effects for a game engine. I have a solid handle on making one noise at a time, but I don't understand mixing. At first I thought I would have to write my own mixer and handle the channels, sample rate, and sample size issues myself. I really don't want to have to do that. Then I noticed in the libao documentation that nothing says that I cannot spawn two threads, each of which calls ao_open_live() and ao_play() on different sound files. Indeed, the docs for ao_initialize() seem to suggest this can be done with the statement that it be called in the main thread. I tried this and it works so erratically that I'm not sure libao was written with this in mind. I get these results in order of likelihood: 1) Segmentation fault 2) *** glibc detected *** ./threadtest7: malloc(): memory corruption (fast): 0x01bc5390 *** Bus error 3) *** glibc detected *** ./threadtest7: double free or corruption (out): 0x018ba2e0 *** 4) A bit of the first file, then the second file. 5) Only the second file. 6) Both files messily mixed with a zipping noise. (very rare) Is libao in fact intentionally capable of doing this? If not, what are my options for mixing music and sound effects? I really don't want to use SDL_mixer for a variety of reasons, chiefly because my program is terminal-only. Virtual beer if you can guess what the program is. Hi It seems libao is able to do this. Attached is the example code from the libao side, roughly hacked in a second thread to play to signals simultaneous. Works stable here. This has trouble opening the second device: ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave Error opening device2. I'm using Debian Wheezy amd64 without Pulseaudio. Maybe Debian's default setup for ALSA is wrong? There are no /etc/asound.conf or ~/.asoundrc files. Well, here is debian/sid with pulse/jack running. Indeed, it didn't work with plain ALSA, . . ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev
Re: [LAD] mixing music and sound effects using libao
On Thu, 30 Apr 2015, Hermann Meyer wrote: Am 30.04.2015 um 10:41 schrieb d...@661.org: I've been playing around with libsndfile, libvorbisfile, libmodplug, and libao to provide background music and sound effects for a game engine. I have a solid handle on making one noise at a time, but I don't understand mixing. At first I thought I would have to write my own mixer and handle the channels, sample rate, and sample size issues myself. I really don't want to have to do that. Then I noticed in the libao documentation that nothing says that I cannot spawn two threads, each of which calls ao_open_live() and ao_play() on different sound files. Indeed, the docs for ao_initialize() seem to suggest this can be done with the statement that it be called in the main thread. I tried this and it works so erratically that I'm not sure libao was written with this in mind. I get these results in order of likelihood: 1) Segmentation fault 2) *** glibc detected *** ./threadtest7: malloc(): memory corruption (fast): 0x01bc5390 *** Bus error 3) *** glibc detected *** ./threadtest7: double free or corruption (out): 0x018ba2e0 *** 4) A bit of the first file, then the second file. 5) Only the second file. 6) Both files messily mixed with a zipping noise. (very rare) Is libao in fact intentionally capable of doing this? If not, what are my options for mixing music and sound effects? I really don't want to use SDL_mixer for a variety of reasons, chiefly because my program is terminal-only. Virtual beer if you can guess what the program is. Hi It seems libao is able to do this. Attached is the example code from the libao side, roughly hacked in a second thread to play to signals simultaneous. Works stable here. This has trouble opening the second device: ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave Error opening device2. I'm using Debian Wheezy amd64 without Pulseaudio. Maybe Debian's default setup for ALSA is wrong? There are no /etc/asound.conf or ~/.asoundrc files. -- David Griffith d...@661.org A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? ___ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev