Building upon what I learned back in April about mixing, I've managed to
get all my inputs into the same formats for output. I've made some
developments in getting stuff to correctly play individually, but mixing
is still beyond me.
playaiff()
Waits for semaphore audio_empty, then gets mutex. Then fills bleepbuffer
with 2-channel, 16-bit, 44100Hz float audio data from an AIFF chunk.
When the buffer is full, it puts up the audio_full semaphore and releases
the mutex. While there are still data to process, the global
bleep_playing is true. A thread is spawned for this whenever an AIFF
chunk must be played. It terminates when the chunk is done playing.
playmusic()
Calls either playmod() or playogg() depending on what kind of chunk has
been passed to it. Those two functions are the same as playaiff() except
they handle MODs or OGGs. While there are still data to process, the
global music_playing is true. A thread is spawned for this whenever a MOD
or OGG chunk must be played. It terminates when the chunk is done
playing.
mixer()
Waits for the audio_full semaphore, then gets mutex. If bleep_playing is
true and music_playing is false, convert bleepbuffer (floats) to
shortbuffer (shorts) and play shortbuffer with ao_play(). If
bleep_playing is false and music_playing is true, convert musicbuffer
(floats) to shortbuffer (shorts) and play shortbuffer with ao_play().
If both bleep_playing and music_playing are true, then step through
bleepbuffer[i] and add musicbuffer[i]. Convert bleepbuffer to shorts and
play shortbuffer. A thread is spawned for this on startup and runs until
the main thread terminates.
Now, the trouble.
If I start music in the form of a MOD chunk, then play an AIFF, I get a
distorted mix and then the music keeps going on cleanly. Subsequent AIFF
plays perform the same whether or not the MOD is playing.
If I start music in the form of an OGG chunk, then play an AIFF, I get a
distorted mix, then a harsh screech for a few more seconds, and then maybe
a segfault.
What is wrong with my mixer?
Here's the latest code:
https://github.com/DavidGriffith/frotz/blob/ao-curses/src/curses/ux_audio.c
These libraries are necessary: install libao, libvorbis, libncurses,
libmodplug, and libsamplerate.
Test program is at http://661.org/if/story.zblorb
There are three buttons: red, green, and blue. Pressing these will cause
an AIFF to play. There is a Commodore 64 that plays an OGG. The Amiga
will play a MOD. Pressing the "off" button will turn off all sounds.
Just turning off the music maker won't work. That's another problem for
which I do not need assistance.
Red button: 2-channel, 16-bit, 44100Hz
Green button: 1-channel, 8-bit, 11025Hz
Blue button: 1-channel, 8-bit, 11025Hz
Tests are as follows:
! Pressing red, green, or blue buttons results in different noises.
> PRESS RED BUTTON
You press the red button.
! quit and restart
> TURN ON COMMODORE 64
You turn on the Commodore 64 and it immediately begins playing the tune
from the game Sanxion.
! At this point, pressing one of the colored buttons will cause a
! distorted mix and usually a segfault.
! quit and restart
> TURN ON AMIGA
You turn on the Commodore Amiga and it immedately begins playing an old
time MOD file.
> PRESS BLUE BUTTON
You press the blue button.
! Here there is a distorted mix that runs a bit slower than it should.
! When the noise produced by the colored button completes, the MOD file
! music continues with no more distortion. Pressing a colored button
! again will result in the same distortion and then the MOD continues as
! before.
--
David Griffith
dave(a)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?
Hi.
As I live in London, I would like to offer my skills and abilities as a software developer to a company nearby.
What companies/start-ups would you recomand?
Please email me for details.
P.S. No recruitment agencies, please.
Thank you.
Paul Nasca, creator of ZynAddSubFX and Paulstretch
http://www.paulnasca.com
Hey,
Here's to all southerners for whom the so called Summer'15 didn't
made much sense...
Beg your pardon yet and again, but it's that time of year when
grapefruit is about ripening, pretty fast and maybe late, at least on
the northern hemisphere. No worries: harvesting has already been carried
away. So it's your call now, wether it makes for ugly bad wine or,
pretty good vinegar...
"Quickly, bring me a beaker of wine so that I may wet my mind and say
something clever." --Aristophanes
never mind,
Qtractor 0.7.1 (meson dope beta) is released!
Now, for the clueless:
Qtractor [1] is an audio/MIDI multi-track sequencer application
written in C++ with the Qt framework [2]. Target platform is Linux,
where the Jack Audio Connection Kit (JACK [3]) for audio and the
Advanced Linux Sound Architecture (ALSA [4]) for MIDI are the main
infrastructures to evolve as a fairly-featured Linux desktop audio
workstation GUI, specially dedicated to the personal home-studio.
And for the ones who can aptly tell a TL;DR apart from a hangover:
Besides the incidental bug-fixes and proverbial business-as-usual
stance for this dot release, the most probable and hopefully significant
news about it, is that this will the last to build against Qt4 by
default. The time has come to move on up to Qt5. Remember that a Qt5
build is and has been possible already for ages now but somewhat
relegated on a subpar status due to the once lack of support for all
non-Qt5 LV2 plug-ins GUIs out there. Not anymore! Starting from this
very release onwards there's this so called <em>native</em> LV2 GTK2 and
X11 UI support on Qt5. Also thriving, drobilla's libsuil is being
updated to par just that as well. So things are all aligning up nigh.
A special note to the voluntary packager: if you choose, for any
reason you may find commendable, to build, package and distribute a Qt5
build (via ./configure --enable-qt5 ...) please be sure that every LV2
plug-ins around that take Qt as its UI framework are also build,
packaged and distributed on the same premises, otherwise they might just
fail and crash Qtractor [1] on show. Among those are of course the one
comprised by the 'Vee One Suite', namely synthv1 [9], samplv1 [10] and
drumkv1 [11], of course.
Also as a(nother) side note: It has been for quite some time there's
an alternate github.com [7] repository which is kept in sync with the
sf.net one [8]. However, this doesn't mean that the Qtractor [1] project
is about to migrate to brand new hosting whatsoever: the original
upstream source code repository is, will be, as ever was, always kept
somewhere else still in this world and universe. It's a Git [12] world
out nowadays and as the mottos says, --everything-is-local,
--distributed-is-the-new-centralized ;)
Enjoy.
Website:
http://qtractor.sourceforge.net
Project page:
http://sourceforge.net/projects/qtractor
Downloads:
http://sourceforge.net/projects/qtractor/files
- source tarball:
http://www.rncbc.org/archive/qtractor-0.7.1.tar.gz
- source package (openSUSE 13.2):
http://www.rncbc.org/archive/qtractor-0.7.1-19.rncbc.suse132.src.rpm
- binary packages (openSUSE 13.2):
http://www.rncbc.org/archive/qtractor-0.7.1-19.rncbc.suse132.i586.rpmhttp://www.rncbc.org/archive/qtractor-0.7.1-19.rncbc.suse132.x86_84.rpm
- wiki (help wanted!):
http://sourceforge.net/p/qtractor/wiki/
Weblog (upstream support):
http://www.rncbc.org
License:
Qtractor [1] is free, open-source Linux Audio [5] software,
distributed under the terms of the GNU General Public License (GPL [6])
version 2 or later.
Change-log:
- Fixed an ages old MIDI track/channel instrument mapping (bank,
program) issue that prevented normal all-shut-up messages from being
sent to MIDI output buses/ports on playback stop.
- Messages standard output capture has been improved again, now in both
ways a non-blocking pipe may get.
- Fixed port on MIDI 14-bit controllers input caching.
- Fixed false value readings on the MIDI clip editor (aka. piano-roll)
tool-tips, when dragging a note velocity or controller value outside the
acceptable nominal range (eg. 0-127).
- Added LV2_BUF_SIZE__nominalBlockLength option support (patch by falktx
aka. Filipe Coelho, thanks).
- Fixed wrong initial tempo/time-signature display when session is
loaded from command line.
- LV2 plug-in UI GTK2 and X11 in Qt5 host native support added.
- Transport/Auto Backward feature now honoring (auto return) to same
current location precedence as Transport/Backward.
- Single/unique application instance control adapted to Qt5/X11 (cf.
configure --enable-xunique).
- MIDI Tools/Transpose, Resize duration display format (frames, time or
BBT) have been fixed.
- Build fix for Qt5.5 (patch by KaOS, thanks).
- MIDI Tools/Quantize et al. are tentatively being corrected to take
event times as relative to THE beginning of session, instead of MIDI
clip start location.
References:
[1] Qtractor - An audio/MIDI multi-track sequencer
http://qtractor.sourceforge.net
[2] Qt framework, C++ class library and tools for
cross-platform application and UI development
http://qt.io/
[3] JACK Audio Connection Kit
http://jackaudio.org
[4] ALSA, Advanced Linux Sound Architecture
http://www.alsa-project.org/
[5] Linux Audio consortium of libre software for audio-related work
http://linuxaudio.org
[6] GPL - GNU General Public License
http://www.gnu.org/copyleft/gpl.html
[7] Qtractor Git repository on github.comhttp://github.com/rncbc/qtractor
[8] Qtractor Git repository on sourceforge.nethttp://git.code.sf.net/p/qtractor/code
[9] synthv1 - an old-school polyphonic synthesizer
http://synthv1.sourceforge.net/
[10] samplv1 - an old-school polyphonic sampler
http://samplv1.sourceforge.net/
[11] drumkv1 - an old-school drum-kit sampler
http://drumkv1.sourceforge.net/
[12] Git distributed version control system
http://git-scm.com
See also:
http://www.rncbc.org/drupal/node/960
Enjoy && have fun.
--
rncbc aka. Rui Nuno Capela
Hello all,
This qmidiarp release dares to come about a year after the last one...and yet
again: not much new stuff, but some more bugs squeeeezed, thanks to some
courageous reporters. And, after all, it's a lifesign isn't it? In other
words, updating is of course highly recommended.
Have fun with QMidiArp 0.6.2, below are the list of changes and links
Frank
-----
qmidiarp-0.6.2 (2015-10-06)
Fixed Bugs
o Arp: Regression: Latch mode caused the first note playing on
forever and other annoyances (Bug #12 reported by Alois Cochard)
o Seq: Small position error of the helper tick line relative to the
notes placed
o Seq: Note length values saved to file were not correct and had no
correct default (Bug #14 reported by Steve Grace)
o LV2 Seq and Lfo: Display was not correct when diminishing resolution
or length in plugin UI
Minor improvement
o LV2 Seq: Vertical zoom values are part of the controls and therefore
saved in presets as well
-----
QMidiArp is a MIDI arpeggiator, phrase generator and controller LFO for JACK
and ALSA. It can run multiple synchronized arpeggiators, LFOs and step
sequencers. The modules are also available as LV2 plugins with Qt user
interface. All in all it is a handy live tool.
Website
http://qmidiarp.sourceforge.net/
Download
http://sourceforge.net/projects/qmidiarp/files/qmidiarp/0.6.2/qmidiarp-0.6.…
There is now also a github repo that will be kept in sync with the sf repo for
the time being
https://github.com/emuse/qmidiarp
Hi all,
When I change the track routing in ardour I get a small click in the main
audio. Examples would be when routing drum tracks through a sub-group, or
changing the side chain input to a compressor. Is this expected behaviour
or is this due to a configuration problem with jack?
Thanks
Andy
Saw this announced on the Linux Musicians site, thought it may be of
interest to some folks here. (Sorry if it's a repost).
https://www.coursera.org/course/audio
Instructors are professors Xavier Serra and Julius O. Smith III, two
very well-known DSP worthies.
Course syllabus :
Week 1: Introduction; basic mathematics
Week 2: Discrete Fourier transform
Week 3: Fourier transform properties
Week 4: Short-time Fourier transform
Week 5: Sinusoidal model
Week 6: Harmonic model
Week 7: Sinusoidal plus residual modeling
Week 8: Sound transformations
Week 9: Sound/music description
Week 10: Concluding topics; beyond audio signal processing
Best,
dp
Hi!
Alexander Carot contacted me to spread the news:
Starting in April 2016, three research assistant positions (PhD
candidates welcome) will be available within the Soundjack project. If
interested, please contact Prof. Carôt (a.carot(a)inf.hs-anhalt.de).
(copy-pasted from <http://www.soundjack.eu/jobs.html>)
I've been told one is TV-L13, the other is 75% and the third is 50%
(money equivalent can be found here [0])
The project will be about making music in a distributed environment,
contract will last three years (no idea if extendible).
Working from home is negotiable and even considered part of the project.
Candidates are expected to speak English, German is explicitly NOT
required.
Feel free to forward to interested parties.
Cheers
[0]
https://de.wikipedia.org/wiki/Tarifvertrag_f%C3%BCr_den_%C3%B6ffentlichen_D…
Hello,
I want to propose the follow flag for raptor in liblrdf library:
#if RAPTOR_VERSION >= 20000
raptor_world_set_flag(world, RAPTOR_WORLD_FLAG_WWW_SKIP_INIT_FINISH, 1);
#endif
before raptor_world_open() is called (explicitly or implicitly),
for example after raptor_new_world() in lrdf_init().
That flag avoids to call curl_global_init() (not thread-safe) in
raptor_www_init() and curl_global_cleanup() in raptor_www_finish().
Rare but possible (I'm lucky), if raptor is compiled with curl support,
I have experienced the follow crash during Rosegarden startup:
#0 0x00007ffff0a84f39 in lh_insert () from /lib64/libcrypto.so.1
#1 0x00007ffff0a087ba in OBJ_NAME_add () from /lib64/libcrypto.so.1
#2 0x00007ffff0a94cf8 in OpenSSL_add_all_ciphers () from /lib64/libcrypto.so.1
#3 0x00007ffff0a94cae in OPENSSL_add_all_algorithms_noconf () from /lib64/libcrypto.so.1
#4 0x00007ffff1acf20c in ?? () from /usr/lib64/libcurl.so.4
#5 0x00007ffff1ad605a in curl_global_init () from /usr/lib64/libcurl.so.4
#6 0x00007ffff22cc0fa in raptor_www_init () from /usr/lib64/libraptor2.so.0
#7 0x00007ffff22c9ef0 in raptor_world_open () from /usr/lib64/libraptor2.so.0
#8 0x00007ffff22c63f1 in raptor_new_uri () from /usr/lib64/libraptor2.so.0
#9 0x00007ffff5d26701 in lrdf_read_file_intl () from /usr/lib64/liblrdf.so.2
#10 0x00007ffff5d27626 in lrdf_read_file () from /usr/lib64/liblrdf.so.2
#11 0x00000000004d8d79 in Rosegarden::LADSPAPluginFactory::discoverPlugins() ()
The code is a simple lrdf_init, for-loop of lrdf_read_file, lrdf_cleanup,
and curl seems useless to read/manipulate rdf files for LADSPA plugins.
I have recompiled raptor without curl support
--with-www=xml
to use libxml, so the only work in raptor_www_init() is to set
world->www_initialized = 1;
without the call for curl_global_init().