Ardour MIDI Kludge (AMK)

View: New views
14 Messages — Rating Filter:   Alert me  

Ardour MIDI Kludge (AMK)

by Carlo Capocasa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,

I have created a kludge to support MIDI recording and playback and
limited editing in Ardour 2.

It is a small Jack client that converts incoming MIDI events into
single-sample impulses that can be recorded and played back as audio by
Ardour.

I haven't tested it much yet, but it does seem to work. It would be nice
to know if it compiles under other distributions, and if it performs
"good enough for now".

It can be downloaded here: http://carlocapocasa.com/tech/amk.zip

Carlo

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Parent Message unknown Re: Ardour MIDI Kludge (AMK)

by Ralf Mardorf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Carlo Capocasa wrote:
>It would be nice to know if it compiles under other distributions

1. 64 Studio 3.0-beta3 (based on Hardy)

spinymouse-sudo@64studio:~$ jackd -Rc h -dalsa -dhw:0 -r96000 -p512 -n2
-Xseq
jackdmp 1.9.3

spinymouse-sudo@64studio:/root/amk$ uname -rvm
2.6.31.5-rt18 #1 SMP PREEMPT RT Sun Nov 8 23:44:41 CET 2009 x86_64
spinymouse-sudo@64studio:/root/amk$ ls amk -l
-rwxr-xr-x 1 spinymouse-sudo audio 94903 2009-11-09 02:46 amk
spinymouse-sudo@64studio:/root/amk$ ./amk

amk was shown by QjackCtl, there were no messages when compiling and no
messages when running amk, I didn't launch Ardour

2. openSUSE 11.2 RC 1

spinymouse11.2@suse11-2:~> jackd -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq
jackdmp 1.9.3

spinymouse11.2@suse11-2:~/amk> uname -rvm
2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64
spinymouse11.2@suse11-2:~/amk> ls amk -l
-rwxr-xr-x 1 spinymouse11.2 audio 98903 2009-11-09 03:18 amk
spinymouse11.2@suse11-2:~/amk> ./amk

amk was shown by QjackCtl, there were no messages when compiling and no
messages when running amk, I didn't launch Ardour

It seems to be fine with 64 Studio 3.0-beta3 and Suse 11.2 RC 1 :). I've
got no time to test it with Ardour.

Cheers,
Ralf

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Carlo Capocasa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Ralf,

yep, no messages means it compiles and runs properly.

Thanks for testing! Really appreciate it.

Carlo

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Raphaël Doursenaud :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carlo Capocasa a écrit :

> Hi everyone,
>
> I have created a kludge to support MIDI recording and playback and
> limited editing in Ardour 2.
>
> It is a small Jack client that converts incoming MIDI events into
> single-sample impulses that can be recorded and played back as audio by
> Ardour.
>
> I haven't tested it much yet, but it does seem to work. It would be nice
> to know if it compiles under other distributions, and if it performs
> "good enough for now".
>
> It can be downloaded here: http://carlocapocasa.com/tech/amk.zip
>
> Carlo
>

Hi,

Compiles and runs here without a message _but_ I don't see the MIDI input!

- --
Raphaël Doursenaud
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkr38zEACgkQaZKmNAdXaVVzyQCfdBoIqqxr+O9p75AFidIk0gnN
QQcAn3JZ+wejq90tBc4/MlzbVw5bSIA7
=qUnJ
-----END PGP SIGNATURE-----
_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Carlo Capocasa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for testing!

> Compiles and runs here without a message _but_ I don't see the MIDI input!

AMK currently does not support Jack MIDI, only ALSA MIDI.

Carlo

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Parent Message unknown Re: Ardour MIDI Kludge (AMK)

by Paul Davis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 9, 2009 at 9:18 PM, Bernt Hansson <bernt@...> wrote:

> Not building on FreeBSD 7.2
>
> jack.h and the .h files is in /usr/local/include/jack
>
> %./build.sh
> amk.cxx:27:18: error: jack.h: No such file or directory
> amk.cxx:28:24: error: ringbuffer.h: No such file or directory
> amk.cxx:29:20: error: thread.h: No such file or directory

you don't appear to have jack correctly  installed. what is the output
of: pkg-config --modversion jack
_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Parent Message unknown Re: Ardour MIDI Kludge (AMK)

by Paul Davis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 9, 2009 at 9:29 PM, Bernt Hansson <bernt@...> wrote:

> Paul Davis:
>>
>> On Mon, Nov 9, 2009 at 9:18 PM, Bernt Hansson <bernt@...>
>> wrote:
>>
>>> Not building on FreeBSD 7.2
>>>
>>> jack.h and the .h files is in /usr/local/include/jack
>>>
>>> %./build.sh
>>> amk.cxx:27:18: error: jack.h: No such file or directory
>>> amk.cxx:28:24: error: ringbuffer.h: No such file or directory
>>> amk.cxx:29:20: error: thread.h: No such file or directory
>>
>> you don't appear to have jack correctly  installed. what is the output
>> of: pkg-config --modversion jack
>
>
> %pkg-config --modversion jack
> 0.116.2

then amk's build script is broken.
_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Droscy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Goodmorning, I'v tryed your amk on Debian/squeeze with kernel 2.6.30-2-686.
No building error or warning and seems to work correctly. As soon as I manage to reconfigure kernel with real-time patch I'll try amk again.

Required package on Debian to build amk:
- libasound2-dev
- libjack-dev


Bye
Simone


_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Parent Message unknown Re: Ardour MIDI Kludge (AMK)

by Nedko Arnaudov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bernt Hansson <bernt@...> writes:

> Not building on FreeBSD 7.2
>
> jack.h and the .h files is in /usr/local/include/jack
>
> %./build.sh

try replacing this line:

g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread -ljack

with this line:

g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread `pkg-config --cflags --libs jack`

packages are (usually) in stalled in /usr/local on BSDs
but gcc does not search /usr/local for includes and libraries by default

--
Nedko Arnaudov <GnuPG KeyID: DE1716B0>


_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

attachment0 (194 bytes) Download Attachment

Re: Ardour MIDI Kludge (AMK)

by Carlo Capocasa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have updated the package accordingly.

> try replacing this line:
>
> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread -ljack
>
> with this line:
>
> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread `pkg-config --cflags --libs jack`

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Peter Geirnaert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The updated package builds nice on AVLinux2rc2.2 (didn't try the first one)

I extracted the package, clicked on build.sh, then clicked on the resulting amk executable,
started Ardour,
'disconnect' the 'input' of a track,
then 'edit' the input and choose tab 'amk' > out, and do the same with the output of that track, but choose 'amk' > in.
The second output of the track has to be removed for the MIDI to work.


I recorded some MIDI drums using a hi hat foot controller (=many cc#10 messages), but when I want to play the recorded data, I get lots of the same error in the terminal where I launched amk:
RtMidiOut::sendMessage: event parsing error!

When I just record a few notes, they are played like I recorded them, no errors.

The mute function of the midi-audio track also doesn't stop the midi from being sent (or I'm using it wrong)

I'll test if it can record and send sysex messages later ...

Thanks already!
Peter

On Tue, Nov 10, 2009 at 10:45 AM, Carlo Capocasa <theman@...> wrote:
I have updated the package accordingly.

> try replacing this line:
>
> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread -ljack
>
> with this line:
>
> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread `pkg-config --cflags --libs jack`

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org


_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Bernt Hansson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Carlo Capocasa said the following on 2009-11-10 10:45:
> I have updated the package accordingly.
>
>> try replacing this line:
>>
>> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread -ljack
>>
>> with this line:
>>
>> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread `pkg-config --cflags --libs jack`

Don't you put to much time on this! It's more of a test for me.
If it works it works, if not no big deal.

I've changed build.sh and get this

amk.cxx:27:18: error: jack.h: No such file or directory
amk.cxx:28:24: error: ringbuffer.h: No such file or directory
amk.cxx:29:20: error: thread.h: No such file or directory
amk.cxx:38: error: expected constructor, destructor, or type conversion
before '*' token
amk.cxx:39: error: expected constructor, destructor, or type conversion
before '*' token
amk.cxx:40: error: expected constructor, destructor, or type conversion
before '*' token
amk.cxx:42: error: expected constructor, destructor, or type conversion
before '*' token
amk.cxx:43: error: expected constructor, destructor, or type conversion
before '*' token
amk.cxx: In function 'void* midithread_out_start(void*)':
amk.cxx:53: error: 'midiqueue_out' was not declared in this scope
amk.cxx:53: error: 'jack_ringbuffer_read_space' was not declared in this
scope
amk.cxx:54: error: 'jack_ringbuffer_read' was not declared in this scope
amk.cxx: In function 'void cleanup()':
amk.cxx:69: error: 'client' was not declared in this scope
amk.cxx:69: error: 'jack_client_close' was not declared in this scope
amk.cxx: In function 'void midiin_callback(double, std::vector<unsigned
char, std::allocator<unsigned char> >*, void*)':
amk.cxx:91: error: 'midiqueue_in' was not declared in this scope
amk.cxx:91: error: 'jack_ringbuffer_write' was not declared in this scope
amk.cxx: At global scope:
amk.cxx:96: error: 'jack_nframes_t' was not declared in this scope
amk.cxx:96: error: expected primary-expression before 'void'
amk.cxx:96: error: initializer expression list treated as compound
expression
amk.cxx:97: error: expected ',' or ';' before '{' token
amk.cxx:74: warning: 'void signal_handler(int)' defined but not used

And so on.

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

Re: Ardour MIDI Kludge (AMK)

by Nedko Arnaudov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bernt Hansson <bernt@...> writes:

>>> try replacing this line:
>>>
>>> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread -ljack
>>>
>>> with this line:
>>>
>>> g++ -Wall -D__LINUX_ALSASEQ__ -o amk amk.cxx RtMidi.cpp -lasound -lpthread `pkg-config --cflags --libs jack`
>
> I've changed build.sh and get this
>
> amk.cxx:27:18: error: jack.h: No such file or directory
Please show the output of this command:

pkg-config --cflags --libs jack

--
Nedko Arnaudov <GnuPG KeyID: DE1716B0>


_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org

attachment0 (194 bytes) Download Attachment

Re: Ardour MIDI Kludge (AMK)

by Carlo Capocasa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> I recorded some MIDI drums using a hi hat foot controller (=many cc#10
> messages), but when I want to play the recorded data, I get lots of the
> same error in the terminal where I launched amk:
> RtMidiOut::sendMessage: event parsing error!

Okay so there seems to be a CC bug... I'll have a look at that.

> When I just record a few notes, they are played like I recorded them, no
> errors.

So notes seem to work! That's great.

> The mute function of the midi-audio track also doesn't stop the midi
> from being sent (or I'm using it wrong)

As far as I can tell muting the audio track should stop the audio from
getting to AMK, hence muting its MIDI out... I'll have a look at that too.

> I'll test if it can record and send sysex messages later ...

Thank you for that! However as of now, there is no Sysex support.

Carlo

_______________________________________________
Ardour-Users mailing list
ardour-users@...
http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org