Greetings:<br><br>Ardour just does audio. No wonder trying to feed it MIDI was a massive fail for me.:)<br><br>I was able to startup ZyAddSubFx and connect its intput to my MIDI keyboard output via Jack. Physical keyboard controlled software synth. I then connected ZyAddSubFx output to a particular Ardour track for input...and record. This was a major step forward in understanding for me. I then connected my MIDI keyboard to Rosegarden...and was able to record.<br>
<br>Friggin&#39; amazing!<br><br>Thank you so much for helping me over these hurdles!<br><br>Regards,<br>Jay.<br><br><div class="gmail_quote">On Mon, Jul 19, 2010 at 8:04 AM, Pablo <span dir="ltr">&lt;<a href="mailto:pablo.fbus@gmail.com">pablo.fbus@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Neil Jensen escribió:<br>
<div class="im">&gt; Hi All,<br>
&gt;<br>
&gt; Along this subject line, I too have been struggling with audio<br>
&gt; connections for jack.<br>
&gt; In particular I want to either use Ardour, QTrackter, Muse, and<br>
&gt; Rosegarden.<br>
&gt;<br>
&gt; When I connect my midi keyboard,m-audio 88es, to these applications I<br>
&gt; can get them to play and imported audio file track, but can&#39;t get it to<br>
&gt; record AND play my keyboard.<br>
&gt;<br>
&gt; I do have Qsynth and ZyAddSubFx hooked up to jack to  get sound from the<br>
&gt; keyboard just to use it.<br>
&gt;<br>
&gt; Can anyone either make a dummy proof diagram or flow chart on how to get<br>
&gt; this running?<br>
&gt;<br>
&gt; I would be so grateful.<br>
&gt;<br>
</div>Hi Neil, It is hard to make a diagram but I will try to explain and put<br>
some basic workflow examples.<br>
 I think you are almost there. Please, forgive my poor English, I<br>
sometimes lack the words.<br>
I hope someone can explain it better than me.<br>
<br>
Qsynth and Zynadd are software synths. You connect midi to them and they<br>
output audio. If you connect your midi keyboard to their<br>
inputs in the alsa tab and you connect synths&#39; audio outputs to<br>
&quot;system_playbacks&quot; in the audio tab,<br>
 you have sound when you play the midi keyboard. So far so good.<br>
<br>
Now, Rosegarden, Qtractor and Muse have midi tracks (audio tracks as<br>
well but let&#39;s focus on midi<br>
first). So, they are midi sequencers. You can write midi notes on them<br>
with keyboard/mouse, in matrix or notation editors, depending on the<br>
program / your needs. You can also record notes on a midi track by means<br>
of your midi keyboard. But this is no sound, this is MIDI, it transmits<br>
event messages, such as pitch , note on, note off... To get sound of a<br>
midi track you need, again, a synth, something that translates MIDI<br>
events to actual sound. It is the same case as your midi keyboard. It<br>
doesn&#39;t make sounds by itself.<br>
<br>
To get sound of a midi track in these programs you need one of these:<br>
<br>
- A synth plugin, e.g., a DSSI plugin.<br>
- A external software synth<br>
- A external hardware synth<br>
<br>
In the first case, you &quot;plug&quot; the instrument inside the application.<br>
In Rosegarden you right click on a track and choose &quot;synth plugin&quot;. Then<br>
go to instrument parameters and push the &quot;No synth&quot; button and load the<br>
synth plugin, such as hexter, fluidsynth (with a soundfont loaded)...<br>
This way you have sound from the master outputs of Rosegarden.<br>
<br>
In the second case, you route the midi track to the external synth, say<br>
Zynaddsubfx.<br>
In Rosegarden, go to Studio -&gt; Manage MIDI Devices and, in the top left<br>
window, MIDI playback, add a new device and call it Zynadd (for<br>
example). You also can rename the existing default &quot;General MIDI<br>
device&quot;. Above all, connect it to Zynaddsubfx, which you will see in the<br>
right column as an availabe output. Close that window. Right click on a<br>
track and choose Zynadd, you have 16 channels. Choose the same channel<br>
in Rosegarden and zynaddsubfx. This is an &quot;alsa midi&quot; connection and you<br>
can check it in the alsa tab of qjackctl (in fact, you can make the<br>
connection there as well).<br>
<br>
Ardour2 only has audio tracks, so you can&#39;t connect your midi keyboard<br>
to it, to record or play notes.<br>
<br>
Workflow examples:<br>
<br>
1. You want to record in ardour the sound from your midi keyboard<br>
connected to zynaddsubfx, and hear (monitor) the sound at the same time:<br>
<br>
In qjackctl, connect (alsa) the midi keyboard to zynadd, connect (audio)<br>
the output of zynadd to the input of an ardour track (add a track<br>
first). To hear what you are playing, either connect zynadd&#39;s outs to<br>
system_playbacks, or<br>
choose in ardour: options, monitoring, ardour does monitoring.<br>
<br>
<br>
2. You want to record the notes from your midi keyboard to a midi track<br>
in Rosegarden, while you listen to the sounds through whatever synth,<br>
then you want make some corrections in the midi track, via<br>
keyboard/mouse and once it is OK, you want to record the result to ardour:<br>
<br>
In Rosegarden, Studio -&gt; Manage MIDI Devices, bottom left window, rename<br>
(if you wish) the capture device to &quot;88es&quot; or whatever,  and  connect<br>
the keyboard that you will see as an available midi input on the bottom<br>
right window. Arm the midi track to record (yellow button) and record.<br>
To hear what you are recording, you need to apply the above explained<br>
(either a synth plugin or an external soft synth). Once you have made<br>
the corrections to the midi track, you can record it to ardour. If you<br>
have used a external soft synth, disconnect (audio tab) rosegarden<br>
master outputs to ardour, you only want the synth connected to ardour.<br>
If you have used a synth plugin, then connect rosegarden master outputs<br>
to ardour audio track inputs.<br>
<br>
<br>
Computer music is not a piece of cake and, in Linux it is a bit more<br>
involved because of its modular approach (there are exceptions but it is<br>
a bit like: one program, one task.  As opposed to integrated musical<br>
environments alà Windows/Mac). However, once you understand the basics<br>
(and learn some tricks and workarounds) you can make up your own<br>
workflow with the several and good tools you have. I mentioned ardour<br>
because I use it and it is &quot;the&quot; linux multitrack recorder, but for home<br>
recording it can be overkilling. You have audio tracks in Rosegarden  /<br>
qtractor / Muse as well.<br>
<br>
<br>
I recommend these URL&#39;s:<br>
<br>
<a href="http://wiki.linuxmusicians.com/doku.php" target="_blank">http://wiki.linuxmusicians.com/doku.php</a><br>
(linuxmusicians wiki, newbies section)<br>
<br>
<a href="http://www.linuxmusicians.com/" target="_blank">http://www.linuxmusicians.com/</a><br>
(the forum, where linuxmusicians of all countries and distros meet)<br>
<br>
<a href="http://lievenmoors.github.com/" target="_blank">http://lievenmoors.github.com/</a><br>
(a series of lectures on Linux &amp; Audio)<br>
<br>
Also, <a href="http://www.ardour.org" target="_blank">www.ardour.org</a>, <a href="http://www.rosegardenmusic.org" target="_blank">www.rosegardenmusic.org</a>, <a href="http://www.rncbc.org" target="_blank">www.rncbc.org</a>, and in<br>

general, official sites of the programs, in which you can find direct<br>
support form the devs and some advanced users.<br>
<div><div></div><div class="h5"><br>
<br>
&gt;<br>
&gt; On Sun, 2010-07-18 at 23:47 -0500, jay gallivan wrote:<br>
&gt;<br>
&gt;&gt; On Sat, Jul 17, 2010 at 6:34 PM, Pablo &lt;<a href="mailto:pablo.fbus@gmail.com">pablo.fbus@gmail.com</a>&gt; wrote:<br>
&gt;&gt;         jay gallivan escribió:<br>
&gt;&gt;         &gt; Thanks for your reply. I&#39;m a total newbie to all of this.<br>
&gt;&gt;<br>
&gt;&gt;         Hi Jay,<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Greetings. Long couple of days growing my understanding of audio on<br>
&gt;&gt; Linux. I&#39;ve worked with micros since 1981, UNIX since 1988 and Linux<br>
&gt;&gt; since 1996. I&#39;ve never had to pay attention to audio before now. Is<br>
&gt;&gt; this what happens when computer people find themselves in a band?<br>
&gt;&gt; That&#39;s how I came to this. I play bass. It&#39;s tough to get the the<br>
&gt;&gt; three of us together. So, the plan was to record the leader - who does<br>
&gt;&gt; the singing and plays acoustic guitar - so i could practice. The<br>
&gt;&gt; X-Station was lying around (bought for one of the kids years ago) and<br>
&gt;&gt; I have &#39;extra&#39; Linux boxes. So, the adventure began....<br>
&gt;&gt;<br>
&gt;&gt;         Pulseaudio is a linux sound system (audio server) desktop<br>
&gt;&gt;         oriented and<br>
&gt;&gt;         Jack (Jack Audio Connection Kit) is another one, oriented<br>
&gt;&gt;         towards music<br>
&gt;&gt;         production (low latency, anything to anywhere connections...).<br>
&gt;&gt;         Both use<br>
&gt;&gt;         the alsa drivers (jack can also use the ffado drivers for<br>
&gt;&gt;         firewire audio<br>
&gt;&gt;         devices but this is not your case) but apart from that, they<br>
&gt;&gt;         are very<br>
&gt;&gt;         different beasts.<br>
&gt;&gt;<br>
&gt;&gt; ALSA had been just another four letter word to me. No more.<br>
&gt;&gt;<br>
</div></div>Alsa is a lot of things at the same time and depending on the context,<br>
&quot;alsa&quot; refers to completely different concepts. See<br>
<a href="http://lievenmoors.github.com/" target="_blank">http://lievenmoors.github.com/</a><br>
<div><div></div><div class="h5"><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         Timidity is a default midi server. It can do jack, but it<br>
&gt;&gt;         doesn&#39;t by<br>
&gt;&gt;         default. In a musical environment timidity is not as used as<br>
&gt;&gt;         qsynth for<br>
&gt;&gt;         example, which is &quot;jackified&quot; by default. But you must load a<br>
&gt;&gt;         soundfont<br>
&gt;&gt;         in qsynth.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m beginning to get the idea of MIDI. Another protocol. In Rosegarden<br>
&gt;&gt; I can seen MIDI message flow. That&#39;s helpful in the same way that<br>
&gt;&gt; looking at network packet traces are helpful. &quot;Oh. So that&#39;s what&#39;s<br>
&gt;&gt; going on.&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         In order to use Rosegarden (the audio part) you need the jack<br>
&gt;&gt;         audio<br>
&gt;&gt;         server and forget about pulseaudio interfaces (once jack takes<br>
&gt;&gt;         hold of<br>
&gt;&gt;         your soundcard, pulseaudio is useless, and, hopefully,<br>
&gt;&gt;         harmless). You<br>
&gt;&gt;         launch the server by means of a graphical front-end called<br>
&gt;&gt;         qjackctl<br>
&gt;&gt;         (Jack Control in the sound and video menu). First, you press<br>
&gt;&gt;         &quot;setup&quot; to<br>
&gt;&gt;         configure the jack audio server. In the interface field you<br>
&gt;&gt;         select your<br>
&gt;&gt;         usb audio card (you will see a generic usb-audio or similar, I<br>
&gt;&gt;         guess).<br>
&gt;&gt;         Then press start to activate jack.<br>
&gt;&gt;<br>
&gt;&gt; Pulseaudio drops out of the picture but the motherboard audio i/o<br>
&gt;&gt; still seems to be there. This appears to be the path to my external<br>
&gt;&gt; speakers for monitoring. So that would be something like....<br>
&gt;&gt; Ardour/Rosegarden -&gt; Jack -&gt; ALSA -&gt; chips -&gt; speakers?<br>
&gt;&gt;<br>
</div></div>Yes!<br>
<br>
Jackified audio apps -&gt; Jack -&gt; ALSA driver -&gt; hardware audio device -&gt; analog in / outs -&gt; micros / speakers<br>
<br>
For firewire audio cards:<br>
<br>
Jackified audio apps -&gt; Jack -&gt; FFADO driver (firewire) -&gt; hardware audio device -&gt; analog in / outs -&gt; micros / speakers<br>
<div class="im"><br>
<br>
<br>
<br>
&gt;&gt;<br>
&gt;&gt;         If jack does not start, this is the first problem you should<br>
&gt;&gt;         solve (more<br>
&gt;&gt;         below).<br>
&gt;&gt;<br>
&gt;&gt; I had quite a bit of trouble with Jack. First, a very slow box - eight<br>
&gt;&gt; years old. I moved to a newer box - maybe three years old - and found<br>
&gt;&gt; i had way to little ram. 1GB. Went to 2GB today and things are much<br>
&gt;&gt; better - with Jack grabbing 1.5GB. Ouch! Do i need to get more?<br>
&gt;&gt;<br>
&gt;&gt;<br>
</div>Not really, although jack loves RAM. There is this infamous bug that can<br>
make that pulseaudio locks memory and jack is affected:<br>
<br>
<a href="https://bugs.launchpad.net/ubuntu/+source/jack-audio-connection-kit/+bug/491329" target="_blank">https://bugs.launchpad.net/ubuntu/+source/jack-audio-connection-kit/+bug/491329</a><br>
<br>
I really can&#39;t understand the reason why the importance is set to low.<br>
It affects lots of people with little RAM.<br>
<br>
Check what you have in /dev/shm and remove the pulse files.<br>
<br>
qjackctl suspends pulseaudio and this should be enough but this doesn&#39;t<br>
kill the pulseaudio daemon.<br>
<br>
To kill pulseaudio and make sure it does not respawn, you have to, for<br>
the music production oriented user:<br>
<br>
edit ~/.pulse/client.conf<br>
<br>
and add the line:<br>
<br>
autospawn = no<br>
<br>
or edit the system-wide  file:<br>
<br>
/etc/pulse/client.conf<br>
<br>
<br>
Then, you kill pulseaudio with:<br>
<br>
pulseaudio -k<br>
<br>
And you can always restart it with:<br>
<br>
pulseaudio --start<br>
<br>
<br>
Users find a problem when they try to play music, see youtube, etc, when<br>
jack is active, because most multimedia players are not jackified by<br>
default. There are several approaches to this issue, like: jackify the<br>
player, use the pulse-jack audio sink, use one audio card for music<br>
production and another for desktop use, log in with a &quot;music&quot; user where<br>
pulseaudio is permanently killed or completely removed...<br>
<div class="im"><br>
&gt;&gt;<br>
&gt;&gt;         If it starts, then the jack audio clients, like rosegarden,<br>
&gt;&gt;         and many<br>
&gt;&gt;         more (most music oriented programs are jack-aware by default)<br>
&gt;&gt;         will show<br>
&gt;&gt;         their ports in the connect window, audio tab, when you launch<br>
&gt;&gt;         them.<br>
&gt;&gt;         The MIDI tab stands for jack MIDI which is not used by<br>
&gt;&gt;         Rosegarden<br>
&gt;&gt;         nowadays. The alsa tab refers to alsa  sequencer or alsa MIDI.<br>
&gt;&gt;         It has<br>
&gt;&gt;         nothing to do with jack but it is there for convenience<br>
&gt;&gt;         because several<br>
&gt;&gt;         synths and sequencers use the alsa sequencer for MIDI and jack<br>
&gt;&gt;         for<br>
&gt;&gt;         audio. Some newer ones use jack MIDI and jack audio but not<br>
&gt;&gt;         Rosegarden.<br>
&gt;&gt;         This explains that you could capture midi in Rosegarden<br>
&gt;&gt;         despite the jack<br>
&gt;&gt;         server was not active.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; So both ALSA and Jack do MIDI? Can you point me to some data flow<br>
&gt;&gt; diagrams?<br>
&gt;&gt;<br>
<br>
</div>Yes, both do midi. Jack midi is rather new on the scene. Alsa midi, the<br>
alsa sequencer, has been there for ages. Ardour3 will do jack midi. Some<br>
synths do both. There is not a lot of documentation on it. Supposedly,<br>
jack midi is more precise but I am not an expert. There is an alsa to<br>
midi bridge daemon called a2jmidid to allow connections between clients<br>
of both midi implementations.<br>
<div><div></div><div class="h5"><br>
<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         Also, take into account that Rosegarden does not make sounds<br>
&gt;&gt;         by itself<br>
&gt;&gt;         and it has not any default synth that makes it work out of the<br>
&gt;&gt;         box.. It<br>
&gt;&gt;         needs either a software synth plugin or an external synth,<br>
&gt;&gt;         either<br>
&gt;&gt;         software (say, qsynth, zynaddsubfx...) or hardware.  But this<br>
&gt;&gt;         is a<br>
&gt;&gt;         second step. The first step is jack setup.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m do have Jack running in RT mode. The Ubuntu Studio installation<br>
&gt;&gt; installed a preemptive kernel. First time I&#39;ve ever needed that! I did<br>
&gt;&gt; come across some documentation describing what you outlined. That<br>
&gt;&gt; certainly caused me concern re memory.<br>
&gt;&gt;<br>
&gt;&gt;         In order to have jack working in realtime mode (recommended)<br>
&gt;&gt;         you need,<br>
&gt;&gt;         as a user, some priorities that you can check in a terminal<br>
&gt;&gt;         with:<br>
&gt;&gt;<br>
&gt;&gt;         ulimit -r (this is realtime priority for the user)<br>
&gt;&gt;         ulimit -l (this is memlock limit for the user)<br>
&gt;&gt;<br>
&gt;&gt;         You need the first one at ninety-something and the second one,<br>
&gt;&gt;         unlimited<br>
&gt;&gt;         or a reasonable amount of your RAM, in kB. In turn, to gain<br>
&gt;&gt;         these<br>
&gt;&gt;         privileges, there must be a file called:<br>
&gt;&gt;<br>
&gt;&gt;         /etc/security/limits.d/audio.conf<br>
&gt;&gt;<br>
&gt;&gt;         with the relevant lines. So please, do a:<br>
&gt;&gt;<br>
&gt;&gt;         cat /etc/security/limits.d/audio.conf<br>
&gt;&gt;<br>
&gt;&gt;         and you must have something like:<br>
&gt;&gt;<br>
&gt;&gt;         @audio - rtprio 99<br>
&gt;&gt;         @audio - memlock unlimited<br>
&gt;&gt;<br>
&gt;&gt;         Now you (you the user) have to belong to the &quot;audio&quot; group.<br>
&gt;&gt;         Check in a<br>
&gt;&gt;         terminal with:<br>
&gt;&gt;<br>
&gt;&gt;         groups<br>
&gt;&gt;<br>
&gt;&gt;         If you see audio (between others) you are done. If you don&#39;t,<br>
&gt;&gt;         you must do:<br>
&gt;&gt;<br>
&gt;&gt;         sudo adduser user audio<br>
&gt;&gt;<br>
&gt;&gt;         where &quot;user&quot; is your login name. Then reboot and you will have<br>
&gt;&gt;         the<br>
&gt;&gt;         system prepared to use jack<br>
&gt;&gt;         (check again with the ulimit commands)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         &gt;<br>
&gt;&gt;         &gt; I don&#39;t see anything in Patchbay. In PulseAudio Manager I<br>
&gt;&gt;         see<br>
&gt;&gt;         &gt; X-Station analong stero as a sink and the same as sources<br>
&gt;&gt;         for stereo<br>
&gt;&gt;         &gt; and stereo monitor.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         Just don&#39;t use pulseaudio.<br>
&gt;&gt;         &gt;<br>
&gt;&gt;         &gt; When I connect (via Connect) X-Station to Timidity I am able<br>
&gt;&gt;         to play<br>
&gt;&gt;         &gt; the keyboard and hear the results via my computer&#39;s<br>
&gt;&gt;         speakers. And I<br>
&gt;&gt;         &gt; can record and playback via Rosegarden when I connect<br>
&gt;&gt;         X-Station to<br>
&gt;&gt;         &gt; Rosegarden.<br>
&gt;&gt;<br>
&gt;&gt;         Don&#39;t use timidity unless you do it jack-aware.<br>
&gt;&gt;<br>
&gt;&gt;         &gt;<br>
&gt;&gt;         &gt; I&#39;ve tried Audacity on my Windows XP box and I&#39;ve been able<br>
&gt;&gt;         to<br>
&gt;&gt;         &gt; pickup/record from the X-Station audio ports - though merged<br>
&gt;&gt;         into a<br>
&gt;&gt;         &gt; single track for some reason.<br>
&gt;&gt;         &gt;<br>
&gt;&gt;         &gt; So it seems that the X-Station is doing what it&#39;s supposed<br>
&gt;&gt;         to do. But<br>
&gt;&gt;         &gt; that (some component of ) Ubuntu Studio is dropping the<br>
&gt;&gt;         X-Station<br>
&gt;&gt;         &gt; audio. Any thoughts on that?<br>
&gt;&gt;<br>
&gt;&gt;         See above.<br>
&gt;&gt;<br>
&gt;&gt;         Cheers! Pablo<br>
&gt;&gt;<br>
&gt;&gt; So here&#39;s where things now stand. I bought an Alesis iO2 with a view<br>
&gt;&gt; to being able to capture the mic and guitar at the same time. I&#39;ve<br>
&gt;&gt; been able to demonstrate that to myself by using the Puluseaudio<br>
&gt;&gt; volume controller and the Sound Recorder application. Sound Recorder<br>
&gt;&gt; created an ogg file which I then converted to wav. I was able to read<br>
&gt;&gt; the file into Ardour. Then I ran out of weekend.<br>
&gt;&gt;<br>
&gt;&gt; Right now I&#39;m in a good place: I can make the recording I need to<br>
&gt;&gt; make. But I&#39;ve also discovered a whole new area of interest! I&#39;ve<br>
&gt;&gt; always like Linux - and avoided MS and Apple. It&#39;s wonderful to see<br>
&gt;&gt; how much amazing work has been done!<br>
&gt;&gt;<br>
<br>
</div></div>just start jack and record to ardour directly, by connecting the right<br>
system_capture port to an audio track. If you see that ardour is<br>
overkilling for certain tasks and you want a simple jack-aware audio<br>
recorder, try with timemachine or jack_capture (jack_capture_gui2 for a<br>
graphical front-end).<br>
<br>
<a href="http://plugin.org.uk/timemachine/" target="_blank">http://plugin.org.uk/timemachine/</a><br>
<a href="http://archive.notam02.no/arkiv/src/" target="_blank">http://archive.notam02.no/arkiv/src/</a><br>
<br>
If don&#39;t want to compile, the first one is in the official repos and you<br>
can get jack_capture from the excellent ppa by Philip Johnsson:<br>
<br>
<a href="https://launchpad.net/%7Ephilip5/+archive/extra/" target="_blank">https://launchpad.net/~philip5/+archive/extra/</a><br>
<div class="im"><br>
<br>
&gt;&gt; Thanks very much for taking the time to reply.<br>
&gt;&gt;<br>
</div>You are welcome!<br>
<br>
Regards, Pablo<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Ubuntu-Studio-users mailing list<br>
<a href="mailto:Ubuntu-Studio-users@lists.ubuntu.com">Ubuntu-Studio-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-users</a><br>
</div></div></blockquote></div><br>