I know it's possible for a sequencer to send MIDI events to ALSA early with a timestamp and ALSA will wait until the specified time to deliver the event. Is it possible to ask ALSA to also deliver these events early along with that timestamp? I've looked all over the ALSA documentation but I can't find any evidence that this is an option.
Hello fellow audio developers,
I've started writing a software synthesizer in C++ (using SDL2 for
now) for kicks and giggles and ran into the problem of having the
event loop thread that listens for keyboard events communicate with
the audio callback.
Are there any recommendations for how to pass real-time events (note
on, note off, etc) to such an audio callback? I figured, this is
already a solved problem and that I could benefit from your
experiences. Maybe you know of some nice open-source C++ queue
implementation that is suitable in such a situation.
I could use some kind of "channel" (thread-safe bounded buffer
implemented using mutexes and condition variables) but I'm not sure
whether this is a good idea in this situation since the audio callback
function should avoid unnecessary delays.
I've also looked into LV2. If I implemented the synthesizer as LV2
plugin, I would get around having to solve the inter-thread
communication problem because it's the plugin host's responsibility.
But to be honest I've found this API to be a bit intimidating and I'm
not familiar with any LV2 host that would allow me to test such a
plugin. Any recommendations? Ardour?
Thanks in advance!
Dear Linux Audio Developers/ Users/ LAC organizers,
the wiki has seen a major overhaul:
http://minilac.linuxaudio.org/
Please head over, enjoy the first stage of the schedule and read updated
information!
As we're using the wiki to keep track, who is coming (and more
importantly how many are coming), please also sign up, if you're only a
guest and not explicitely doing an event!
We hope you find all the required information. If you think something is
missing, please add it to the wiki or contact us (in case you can't)!
See you in Berlin in April!
Best,
David
--
David Runge
Schreinerstraße 11
10247 Berlin
http://sleepmap.de
Hello there,
I have just released JackSharp and NAudio.Jack 0.1.0.
JackSharp is a C# wrapper around the Jack API for .NET and Mono.
NAudio.Jack is a pair of implementations of IWavePlayer and IWaveIn to
use JackSharp with the .NET audio framework NAudio.
I have tested it on Windows 8.1 and Debian sid (i386 and amd64).
These are available on NuGet:
https://www.nuget.org/packages/JackSharp/https://www.nuget.org/packages/Naudio.Jack/
Development is done on Github:
https://github.com/residuum/JackSharp
Best regards,
Thomas
--
"Ich komme aus dem Staunen nicht heraus."
"Dann bleib halt drin, du Seppel"
(Dietmar Dath - Die Abschaffung der Arten)
http://www.residuum.org/
Hello,
I have started developing JackSharp, a .NET/Mono binding for libjack. It
has been tested on Windows 8.1 and Debian GNU/Linux sid amd64 and i386,
but should work on other platforms as well.
https://github.com/residuum/JackSharp
Not every API call is implemented yet, especially the transport API has
not been used, currently there are two main client classes:
Client: Use this to create a client with audio and MIDI ports and add a
function to the process event.
Controller: class for managing port connections. If you want to build a
replacement for QJackCtl et al, then use this.
This repository also contains a wrapper for NAudio.
Of course, this has not been tested or used in real software, so this is
still pre-alpha. And I am willing to change the API, as well as take
pull requests.
Thanks for looking into the code and using it,
Thomas
--
"When one's home has a really excellent computer capable of reaching
other computers anywhere in the Galaxy, one scarcely needs to budge."
(Janov Pelorat in: Isaac Asimov - Foundation's Edge)
http://www.residuum.org/
Dear developers and users,
the "Open Source Audio Meeting Cologne" takes places monthly since June
2014 in Cologne, Germany.
It is a community meeting: linux and open source audio enthusiasts,
user, musicians and developers connect, share, discuss and help each other.
But the meeting is also a monthly "mini linux audio conference". While
not really a formal conference we have talks and demonstrations each
time that deal with musical, technical or scientific aspects of
everything music and audio with free and open source software and hardware.
Regular attendance is close to 10 people for regular meetings and more
for special meetings, for example when we have invited speakers and
"guest-stars".
I would like any of you to be such an invited star. If you are in the
area (or willing to make a trip) it would be fantastic to have you here
and give us a talk or demonstration about YOUR topic. Be it your music,
your software or anything that you work with or on.
You can answer me in private or publicly, your choice.
If you are interested here is some more condensed information:
-The time frame for a talk or demo is from 30 minutes to 2 hours for
such an event.
-Dates for 2016 (all Wednesdays, all 7pm): March 16th, April 20th, Mai
18th, June 15th, July 20th, August 17th, September 21st, October 19th,
November 16th
-The language can be English or German
-The place is Heliostrasse 6a, 50825 Cologne Germany and has very good
public transportation nearby and is therefore easy to get to.
-While we have no money to offer you can get a place to sleep for the
night and food.
-We provide the option to record your talk on video and upload it (or
simply send it to you, if you prefer)
Website: http://cologne.linuxaudio.org
It would be fantastic to hear from you!
Yours,
Nils Gey
Hi,
I'm new to audio programming, and new to LV2 and LVTK. I managed to
build the LVTK examples from sources. Now I'm trying to figure out how I
can send a simple text message from my UI to the plugin (it will be used
for speech synthesis).
First question: In the ttl, can I just add an atomPort with a type other
than sequence, like this:
[
a atom:AtomPort ,
lv2:InputPort ;
lv2:index 3;
lv2:symbol "text";
lv2:name "Text";
atom:bufferType atom:String ;
]
Second question: How do I send a string over this port? I suppose I need
to wrap it into an LV2_Atom_String somehow. However, I always end up
receiving MIDI data in my plugin.
Third question: In a Synth plugin, how do I handle events other than
MIDI note on and off (which have both their own specialized methods)?
Which method should I overwrite to react on the strings coming in over
my atomPort?
Any pointer to a solution would be nice!
Best wishes,
Ulrich
Hi all,
This is my first post here. I’m note new to audio programming or linux, but I haven’t done much in terms of combining the two. Most of my audio programming has been on os x.
Currently working on some realtime convolution with lots of channels and low latency requirements, but I am running into some unexpected cpu-spikes and hope some of you might have an idea of possible causes.
I’m processing 32 sample-blocks at 48KHz but roughly every 0,6 seconds I get a large spike in cpu usage. This cannot possibly be explained by my algorithm, because the load should be pretty stable.
I am measuring cpu load by getting the time with clock_gettime(CLOCK_MONOTONIC_RAW, timespec*) at the beginning and end of each callback. When converted to a percentage my cpu load hovers somewhere between 40 an 50% most of the time, but more or less every 900 callbacks (0.8 seconds there is a spike of more than 100%.
I am not doing any IO, mallocing or anything else that could block. My threads are SCHED_FIFO with max priority (I have 4 threads on 4 cores).
The only explanation I can come up with is that my threads are somehow pre-empted even though there are realtime threads. Is that even possible? And is there a way to check this? Besides pre-emption maybe my caches are severely thrashed but i find that unlikely as it seems to happen on all 4 cores simultaneously.
I’m running (more or less default install, no additional services run-in) Linux Mint 17.3 with a 3.19.0-42-lowlatency kernel on a core i7-6700 with hyperthreading/turbo disabled.
I remember reading somewhere that realtime threads cannot run more than .95s every second. That would be very bad if it actually meant my threads are blocked run for a period of 50ms straight…
Anyone have any thoughts on possible causes?
best,
Fokke