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' 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"><<a href="mailto:pablo.fbus@gmail.com">pablo.fbus@gmail.com</a>></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">> Hi All,<br>
><br>
> Along this subject line, I too have been struggling with audio<br>
> connections for jack.<br>
> In particular I want to either use Ardour, QTrackter, Muse, and<br>
> Rosegarden.<br>
><br>
> When I connect my midi keyboard,m-audio 88es, to these applications I<br>
> can get them to play and imported audio file track, but can't get it to<br>
> record AND play my keyboard.<br>
><br>
> I do have Qsynth and ZyAddSubFx hooked up to jack to get sound from the<br>
> keyboard just to use it.<br>
><br>
> Can anyone either make a dummy proof diagram or flow chart on how to get<br>
> this running?<br>
><br>
> I would be so grateful.<br>
><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' audio outputs to<br>
"system_playbacks" 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'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'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 "plug" the instrument inside the application.<br>
In Rosegarden you right click on a track and choose "synth plugin". Then<br>
go to instrument parameters and push the "No synth" 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 -> 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 "General MIDI<br>
device". 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 "alsa midi" 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'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'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 -> Manage MIDI Devices, bottom left window, rename<br>
(if you wish) the capture device to "88es" 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 "the" 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'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 & 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>
><br>
> On Sun, 2010-07-18 at 23:47 -0500, jay gallivan wrote:<br>
><br>
>> On Sat, Jul 17, 2010 at 6:34 PM, Pablo <<a href="mailto:pablo.fbus@gmail.com">pablo.fbus@gmail.com</a>> wrote:<br>
>> jay gallivan escribió:<br>
>> > Thanks for your reply. I'm a total newbie to all of this.<br>
>><br>
>> Hi Jay,<br>
>><br>
>><br>
>> Greetings. Long couple of days growing my understanding of audio on<br>
>> Linux. I've worked with micros since 1981, UNIX since 1988 and Linux<br>
>> since 1996. I've never had to pay attention to audio before now. Is<br>
>> this what happens when computer people find themselves in a band?<br>
>> That's how I came to this. I play bass. It's tough to get the the<br>
>> three of us together. So, the plan was to record the leader - who does<br>
>> the singing and plays acoustic guitar - so i could practice. The<br>
>> X-Station was lying around (bought for one of the kids years ago) and<br>
>> I have 'extra' Linux boxes. So, the adventure began....<br>
>><br>
>> Pulseaudio is a linux sound system (audio server) desktop<br>
>> oriented and<br>
>> Jack (Jack Audio Connection Kit) is another one, oriented<br>
>> towards music<br>
>> production (low latency, anything to anywhere connections...).<br>
>> Both use<br>
>> the alsa drivers (jack can also use the ffado drivers for<br>
>> firewire audio<br>
>> devices but this is not your case) but apart from that, they<br>
>> are very<br>
>> different beasts.<br>
>><br>
>> ALSA had been just another four letter word to me. No more.<br>
>><br>
</div></div>Alsa is a lot of things at the same time and depending on the context,<br>
"alsa" 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>
>><br>
>><br>
>><br>
>> Timidity is a default midi server. It can do jack, but it<br>
>> doesn't by<br>
>> default. In a musical environment timidity is not as used as<br>
>> qsynth for<br>
>> example, which is "jackified" by default. But you must load a<br>
>> soundfont<br>
>> in qsynth.<br>
>><br>
>> I'm beginning to get the idea of MIDI. Another protocol. In Rosegarden<br>
>> I can seen MIDI message flow. That's helpful in the same way that<br>
>> looking at network packet traces are helpful. "Oh. So that's what's<br>
>> going on."<br>
>><br>
>><br>
>> In order to use Rosegarden (the audio part) you need the jack<br>
>> audio<br>
>> server and forget about pulseaudio interfaces (once jack takes<br>
>> hold of<br>
>> your soundcard, pulseaudio is useless, and, hopefully,<br>
>> harmless). You<br>
>> launch the server by means of a graphical front-end called<br>
>> qjackctl<br>
>> (Jack Control in the sound and video menu). First, you press<br>
>> "setup" to<br>
>> configure the jack audio server. In the interface field you<br>
>> select your<br>
>> usb audio card (you will see a generic usb-audio or similar, I<br>
>> guess).<br>
>> Then press start to activate jack.<br>
>><br>
>> Pulseaudio drops out of the picture but the motherboard audio i/o<br>
>> still seems to be there. This appears to be the path to my external<br>
>> speakers for monitoring. So that would be something like....<br>
>> Ardour/Rosegarden -> Jack -> ALSA -> chips -> speakers?<br>
>><br>
</div></div>Yes!<br>
<br>
Jackified audio apps -> Jack -> ALSA driver -> hardware audio device -> analog in / outs -> micros / speakers<br>
<br>
For firewire audio cards:<br>
<br>
Jackified audio apps -> Jack -> FFADO driver (firewire) -> hardware audio device -> analog in / outs -> micros / speakers<br>
<div class="im"><br>
<br>
<br>
<br>
>><br>
>> If jack does not start, this is the first problem you should<br>
>> solve (more<br>
>> below).<br>
>><br>
>> I had quite a bit of trouble with Jack. First, a very slow box - eight<br>
>> years old. I moved to a newer box - maybe three years old - and found<br>
>> i had way to little ram. 1GB. Went to 2GB today and things are much<br>
>> better - with Jack grabbing 1.5GB. Ouch! Do i need to get more?<br>
>><br>
>><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'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'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 "music" user where<br>
pulseaudio is permanently killed or completely removed...<br>
<div class="im"><br>
>><br>
>> If it starts, then the jack audio clients, like rosegarden,<br>
>> and many<br>
>> more (most music oriented programs are jack-aware by default)<br>
>> will show<br>
>> their ports in the connect window, audio tab, when you launch<br>
>> them.<br>
>> The MIDI tab stands for jack MIDI which is not used by<br>
>> Rosegarden<br>
>> nowadays. The alsa tab refers to alsa sequencer or alsa MIDI.<br>
>> It has<br>
>> nothing to do with jack but it is there for convenience<br>
>> because several<br>
>> synths and sequencers use the alsa sequencer for MIDI and jack<br>
>> for<br>
>> audio. Some newer ones use jack MIDI and jack audio but not<br>
>> Rosegarden.<br>
>> This explains that you could capture midi in Rosegarden<br>
>> despite the jack<br>
>> server was not active.<br>
>><br>
>><br>
>> So both ALSA and Jack do MIDI? Can you point me to some data flow<br>
>> diagrams?<br>
>><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>
>><br>
>><br>
>> Also, take into account that Rosegarden does not make sounds<br>
>> by itself<br>
>> and it has not any default synth that makes it work out of the<br>
>> box.. It<br>
>> needs either a software synth plugin or an external synth,<br>
>> either<br>
>> software (say, qsynth, zynaddsubfx...) or hardware. But this<br>
>> is a<br>
>> second step. The first step is jack setup.<br>
>><br>
>><br>
>> I'm do have Jack running in RT mode. The Ubuntu Studio installation<br>
>> installed a preemptive kernel. First time I've ever needed that! I did<br>
>> come across some documentation describing what you outlined. That<br>
>> certainly caused me concern re memory.<br>
>><br>
>> In order to have jack working in realtime mode (recommended)<br>
>> you need,<br>
>> as a user, some priorities that you can check in a terminal<br>
>> with:<br>
>><br>
>> ulimit -r (this is realtime priority for the user)<br>
>> ulimit -l (this is memlock limit for the user)<br>
>><br>
>> You need the first one at ninety-something and the second one,<br>
>> unlimited<br>
>> or a reasonable amount of your RAM, in kB. In turn, to gain<br>
>> these<br>
>> privileges, there must be a file called:<br>
>><br>
>> /etc/security/limits.d/audio.conf<br>
>><br>
>> with the relevant lines. So please, do a:<br>
>><br>
>> cat /etc/security/limits.d/audio.conf<br>
>><br>
>> and you must have something like:<br>
>><br>
>> @audio - rtprio 99<br>
>> @audio - memlock unlimited<br>
>><br>
>> Now you (you the user) have to belong to the "audio" group.<br>
>> Check in a<br>
>> terminal with:<br>
>><br>
>> groups<br>
>><br>
>> If you see audio (between others) you are done. If you don't,<br>
>> you must do:<br>
>><br>
>> sudo adduser user audio<br>
>><br>
>> where "user" is your login name. Then reboot and you will have<br>
>> the<br>
>> system prepared to use jack<br>
>> (check again with the ulimit commands)<br>
>><br>
>><br>
>><br>
>> ><br>
>> > I don't see anything in Patchbay. In PulseAudio Manager I<br>
>> see<br>
>> > X-Station analong stero as a sink and the same as sources<br>
>> for stereo<br>
>> > and stereo monitor.<br>
>><br>
>><br>
>> Just don't use pulseaudio.<br>
>> ><br>
>> > When I connect (via Connect) X-Station to Timidity I am able<br>
>> to play<br>
>> > the keyboard and hear the results via my computer's<br>
>> speakers. And I<br>
>> > can record and playback via Rosegarden when I connect<br>
>> X-Station to<br>
>> > Rosegarden.<br>
>><br>
>> Don't use timidity unless you do it jack-aware.<br>
>><br>
>> ><br>
>> > I've tried Audacity on my Windows XP box and I've been able<br>
>> to<br>
>> > pickup/record from the X-Station audio ports - though merged<br>
>> into a<br>
>> > single track for some reason.<br>
>> ><br>
>> > So it seems that the X-Station is doing what it's supposed<br>
>> to do. But<br>
>> > that (some component of ) Ubuntu Studio is dropping the<br>
>> X-Station<br>
>> > audio. Any thoughts on that?<br>
>><br>
>> See above.<br>
>><br>
>> Cheers! Pablo<br>
>><br>
>> So here's where things now stand. I bought an Alesis iO2 with a view<br>
>> to being able to capture the mic and guitar at the same time. I've<br>
>> been able to demonstrate that to myself by using the Puluseaudio<br>
>> volume controller and the Sound Recorder application. Sound Recorder<br>
>> created an ogg file which I then converted to wav. I was able to read<br>
>> the file into Ardour. Then I ran out of weekend.<br>
>><br>
>> Right now I'm in a good place: I can make the recording I need to<br>
>> make. But I've also discovered a whole new area of interest! I've<br>
>> always like Linux - and avoided MS and Apple. It's wonderful to see<br>
>> how much amazing work has been done!<br>
>><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'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>
>> Thanks very much for taking the time to reply.<br>
>><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>