Synthesising a midi file with aeolus

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Synthesising a midi file with aeolus

Francesco Ariis
Hello audio users,
    this is a "I have a .mid and I want an .ogg", Aeolus edition.

Longer version: I use Aeolus organ emulator with my midi keyboard and
it works like a charm.
Today I wanted to grab a midi file and make Aeolus play it, recording
the result in an ogg. I managed to do it but boy it was cumbersome;
here is what I did:

    1. aeolus -A
    2. aconnet 14 128 # midi through to aeolus
    3. fire up alsamixer and switch CAPTURE from Front Mic to Stereo Mix
    4. arecord foobar.wav
    5. aplaymidi -p 14 somemidi.mid

Lots of plumbing to do! I am particularly not happy with step 4 (alsamixer)
because I have to do it manually and I cannot just put it in a bash
file.

So I ask to you: "is there a simpler way"? Thanks in advance

                                            -Francesco
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Synthesising a midi file with aeolus

Jeanette C.
May 20 2017, Francesco Ariis has written:

> Hello audio users,
>    this is a "I have a .mid and I want an .ogg", Aeolus edition.
...
>    1. aeolus -A
>    2. aconnet 14 128 # midi through to aeolus
>    3. fire up alsamixer and switch CAPTURE from Front Mic to Stereo Mix
>    4. arecord foobar.wav
>    5. aplaymidi -p 14 somemidi.mid
...
> So I ask to you: "is there a simpler way"? Thanks in advance
Hi Francesco,
Why do you need to connect the MIDI through to Aeolus. Aeolus uses
sequencer ports and so does aplaymidi:
aplaymidi -p 128:0 file.mid
If you want/need ALSA as the audio system, the amixer command can change
mixer settings on the commandline, this can be scripted.

If, on the other hand, you are willing/able to use JACK, the whole thing
becomes very simple, you can set Aeolus to use JACK output (option -J )
and then use a simple tool like jack_capture, ecasound or similar to
record the audio of Aeolus. If your recording tool can render .ogg
directly, fine, otherwise you can use oggenc to convert it and even
automatically tag it, if you can deduce some tagging info from the call
to your script.

HTH.

Best wishes,

Jeanette

--------
When you need someone, you just turn around and I will be there <3
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Synthesising a midi file with aeolus

d.adler
In reply to this post by Francesco Ariis
On 20.05.2017 12:22, Francesco Ariis wrote:

> Hello audio users,
>     this is a "I have a .mid and I want an .ogg", Aeolus edition.
>
> Longer version: I use Aeolus organ emulator with my midi keyboard and
> it works like a charm.
> Today I wanted to grab a midi file and make Aeolus play it, recording
> the result in an ogg. I managed to do it but boy it was cumbersome;
> here is what I did:
>
>     1. aeolus -A
>     2. aconnet 14 128 # midi through to aeolus
>     3. fire up alsamixer and switch CAPTURE from Front Mic to Stereo
> Mix
>     4. arecord foobar.wav
>     5. aplaymidi -p 14 somemidi.mid
>
> Lots of plumbing to do! I am particularly not happy with step 4
> (alsamixer)
> because I have to do it manually and I cannot just put it in a bash
> file.
>
> So I ask to you: "is there a simpler way"? Thanks in advance

Not exactly simpler, though scriptable. For sure there's many ways to do
this, here's one example that uses Jack for MIDI and audio.
The only manual step involved is to select stops in aeolus, though that
could be automated by selecting a preset via MIDI (haven't tried that
part).

# start aeolus without the -A option (defaults to Jack)
aeolus &
# start a jack-MIDI aware smf file player like jpmidi or jack-smf-player
from jack-smf-utils
jack-smf-player -n foo.mid &
# give a little time for ports to show up
sleep 5
# using ecasound as a jack-aware command-line recorder
ecasound -i jack -o foo.ogg &
sleep 1
# ==== make connections in jack
# == midi
jack_connect 'jack-smf-player:midi_out' 'aeolus:Midi/in'
# == audio
jack_connect 'aeolus:out.L' 'ecasound:in_1'
jack_connect 'aeolus:out.R' 'ecasound:in_2'
# not required but you might want to listen
jack_connect 'aeolus:out.L' 'system:playback_1'
jack_connect 'aeolus:out.R' 'system:playback_2'
sleep 1
# make sure to locate transport TL to zero
echo locate 0 | jack_transport
# start jack_transport
echo play | jack_transport
# ..recording..

best,
  -david
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Synthesising a midi file with aeolus

Francesco Ariis
In reply to this post by Francesco Ariis
Thanks Jeanette and David,
    great tips, I'll get my script up and working soon
-F
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Synthesising a midi file with aeolus

d.adler
In reply to this post by d.adler
On 21.05.2017 14:14, Kjetil Matheussen wrote:
...
>
> By using jack_capture instead of ecasound, this should be enough:
>
> jack_capture --jack-transport
> jack-smf-player -n foo.mid &
> sleep 5
> echo locate 0 | jack_transport
> echo play | jack_transport

I also had jack_capture in mind first, it always stopped though whenever
a sleep command finished that had been issued after it.  Thus, being
lazy, I used something else instead of investigating this.
It turns out that jack_capture's --no-stdin option does the magic.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Synthesising a midi file with aeolus

Kjetil Matheussen-2
In reply to this post by Francesco Ariis

On <a href="tel:21.05.2017%2014" value="+12105201714">21.05.2017 14:14, Kjetil Matheussen wrote:
...
>
> By using jack_capture instead of ecasound, this should be enough:
>
> jack_capture --jack-transport
> jack-smf-player -n foo.mid &
> sleep 5
> echo locate 0 | jack_transport
> echo play | jack_transport

I also had jack_capture in mind first, it always stopped though whenever
a sleep command finished that had been issued after it.  Thus, being
lazy, I used something else instead of investigating this.
It turns out that jack_capture's --no-stdin option does the magic.


That's interesting. Maybe it has something to do with the piping.

Another alternative would be to open
jack_capture in a new terminal. Then you also
avoid cluttering the terminal with text output
from both jack_capture and jack-smf-player:

xterm -e jack_capture --jack-transport &
jack-smf-player -n foo.mid &
sleep 5
echo locate 0 | jack_transport
echo play | jack_transport



_______________________________________________
Linux-audio-user mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-user